/* TurkishExpats.ch — Layout "XXX" (based on bionetwork) */

/* ─── Variables ──────────────────────────────────────── */

:root {
    --bg:           #ffffff;
    --surface:      #fafafa;
    --surface-2:    #f4f4f5;
    --border:       #e6e6e6;
    --border-sub:   #efefef;

    --text:         #0f1115;
    --muted:        #4b5563;
    --subtle:       #8a8f98;

    /* Swiss red kept restrained — used only for small accents, not buttons. */
    --swiss:        #d4202c;

    --accent:       #1f3b6e;     /* deep, professional navy */
    --accent-h:     #15294f;
    --accent-bg:    #eef2f8;
    --accent-muted: #b9c5da;

    --dark:         #0f1f3a;
    --dark-border:  #1d3258;
    --dark-muted:   rgba(255,255,255,0.7);

    --radius:       8px;
    --radius-sm:    6px;
    --shadow:       0 1px 1px rgba(15,17,21,0.03), 0 6px 20px rgba(15,17,21,0.045);
    --max:          1100px;

    /* Page sits one step below the panels: panels stay white and float. */
    --page:         #f4f5f7;

    color-scheme: light;
}

/* Dark theme — opt-in via <html data-theme="dark">. Default stays light.
   Only the palette tokens are overridden; every component already reads them. */
[data-theme="dark"] {
    color-scheme: dark;

    --bg:           #0f1216;
    --surface:      #161922;
    --surface-2:    #1c2029;
    --border:       #2a2f3a;
    --border-sub:   #232831;

    --text:         #e7e9ee;
    --muted:        #a6adba;
    --subtle:       #7b828f;

    --accent:       #6f93d6;     /* navy lifted for contrast on dark */
    --accent-h:     #88a6e0;
    --accent-bg:    #1a2238;
    --accent-muted: #38486b;

    --shadow:       0 1px 1px rgba(0,0,0,0.4), 0 6px 20px rgba(0,0,0,0.45);

    /* Page one step deeper than surfaces, so panels visibly lift. */
    --page:         #0b0e12;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
    background: var(--page);
    color: var(--text);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }

/* ─── Layout ─────────────────────────────────────────── */

.site-shell { min-height: 100vh; }

.container {
    width: min(var(--max), calc(100% - 48px));
    margin: 0 auto;
}

.main-content { padding: 24px 0 72px; }

/* ─── Topbar ─────────────────────────────────────────── */

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 0 16px;
    margin-bottom: 10px;
    position: sticky;
    top: 0;
    z-index: 100;
}

/* The bar's background + bottom rule run edge-to-edge (full bleed), while
   the content inside keeps the container alignment. */
.topbar::before {
    content: "";
    position: absolute;
    inset: 0 calc(50% - 50vw);
    background: var(--page);
    border-bottom: 1px solid var(--border);
    z-index: -1;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-title {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.25;
}

.brand-subtitle {
    font-size: 0.74rem;
    color: var(--muted);
    margin-top: 1px;
    line-height: 1.3;
}

.topbar-actions {
    display: flex;
    gap: 2px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.topbar-link {
    padding: 6px 12px;
    border-radius: var(--radius);
    font-size: 0.82rem;
    color: var(--muted);
    transition: color 0.15s, background 0.15s;
}

.topbar-link:hover {
    color: var(--text);
    background: rgba(0,0,0,0.05);
}

.topbar-link-strong {
    background: var(--accent);
    color: #fff;
    font-weight: 600;
}

.topbar-link-strong:hover {
    background: var(--accent-h);
    color: #fff;
}

/* Theme toggle — icon-only, kept square and centred next to the text links. */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
}
.theme-toggle svg { display: block; }

/* In dark mode the default black hover wash is invisible, so lift it. */
[data-theme="dark"] .topbar-link:hover { background: rgba(255,255,255,0.08); }

.topbar-divider {
    width: 1px;
    height: 18px;
    background: var(--border);
    margin: 0 6px;
    flex-shrink: 0;
}

/* ─── Panel base ─────────────────────────────────────── */

.panel {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 32px;
    margin-bottom: 14px;
}

.panel.panel-flat {
    background: transparent;
    border: none;
    box-shadow: none;
    padding-left: 0;
    padding-right: 0;
}

.panel.panel-dark {
    background: var(--dark);
    border-color: var(--dark-border);
    box-shadow: none;
}

.panel h1, .panel h2, .panel h3 {
    margin: 0 0 6px;
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1.25;
}

.panel h1 { font-size: 1.55rem; }
.panel h2 { font-size: 1.2rem; }
.panel h3 { font-size: 1.02rem; }

.panel p {
    color: var(--muted);
    margin: 0 0 12px;
}

.panel p:last-child { margin-bottom: 0; }

.panel-error {
    border-color: #fca5a5;
    background: #fff8f8;
}

.panel-success {
    border-color: #86efac;
    background: #f0fdf4;
}

/* ─── Buttons ────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 18px;
    border-radius: var(--radius);
    font-size: 0.84rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    transition: transform 0.12s, background 0.15s, box-shadow 0.15s, border-color 0.15s, color 0.15s;
    cursor: pointer;
    white-space: nowrap;
    border: none;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 1px 2px rgba(15,17,21,0.08);
}

.btn-primary:hover {
    background: var(--accent-h);
    box-shadow: 0 2px 6px rgba(15,17,21,0.12);
}

.btn-secondary {
    background: transparent;
    color: var(--muted);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: rgba(0,0,0,0.04);
    color: var(--text);
}

.btn-danger {
    background: transparent;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.btn-danger:hover {
    background: #fef2f2;
    border-color: #fca5a5;
}

.btn-sm { padding: 7px 12px; font-size: 0.78rem; border-radius: var(--radius-sm); }

.panel-dark .btn-primary {
    background: var(--dark);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.35);
    box-shadow: none;
}
.panel-dark .btn-primary:hover { background: rgba(255,255,255,0.1); }
.panel-dark .btn-secondary { border-color: rgba(255,255,255,0.2); color: rgba(255,255,255,0.7); }
.panel-dark .btn-secondary:hover { background: rgba(255,255,255,0.08); color: #fff; }

/* ─── Hero ───────────────────────────────────────────── */

.hero-grid {
    display: grid;
    grid-template-columns: 1.5fr 0.7fr;
    gap: 14px;
    margin-bottom: 20px;
    align-items: start;
}

.hero-panel { padding-top: 36px; padding-bottom: 36px; }

.eyebrow {
    display: inline-block;
    font-size: 0.67rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 14px;
}

.hero-panel h1 {
    font-size: clamp(2rem, 4vw, 2.55rem);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.028em;
    color: var(--text);
    margin: 0 0 16px;
    max-width: 24ch;
}

.hero-text {
    font-size: 1.02rem;
    color: var(--muted);
    line-height: 1.65;
    max-width: 58ch;
    margin-bottom: 0;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.hero-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.hint {
    font-size: 0.78rem;
    color: var(--subtle);
}

/* ─── Section head ───────────────────────────────────── */

.section-head { margin-bottom: 18px; }
.section-head h2 { margin: 0 0 4px; }
.section-head p { margin: 0; font-size: 0.84rem; }

/* ─── Form system (extended, compatible with XXX) ─────── */

.form-wrap {
    max-width: 720px;
    margin: 0 auto;
}

.field-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (min-width: 720px) {
    .field-row { grid-template-columns: 1fr 1fr; }
}

.field-group { margin-bottom: 14px; }

.field-group label {
    display: block;
    font-size: 0.82rem;
    color: var(--text);
    font-weight: 600;
    margin-bottom: 6px;
    letter-spacing: -0.01em;
}

.opt { color: var(--subtle); font-weight: 500; font-size: 0.78rem; margin-left: 6px; }
.req { color: var(--accent); margin-left: 3px; }

input[type="text"], input[type="email"], input[type="password"], input[type="tel"],
input[type="url"], input[type="search"], input[type="date"], input[type="file"],
select, textarea {
    display: block;
    width: 100%;
    padding: 10px 12px;
    font-size: 15px;
    font-family: inherit;
    color: var(--text);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
    min-height: 42px;
}

textarea { min-height: 110px; resize: vertical; }

input:focus, select:focus, textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(31,59,110,0.12);
}

/* Dark theme: the base rule hard-codes a white field background, which left the
   light --text colour washed out. Give fields a dark surface in dark mode so
   typed text and placeholders stay readable. Light mode is untouched. */
[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="email"],
[data-theme="dark"] input[type="password"],
[data-theme="dark"] input[type="tel"],
[data-theme="dark"] input[type="url"],
[data-theme="dark"] input[type="search"],
[data-theme="dark"] input[type="date"],
[data-theme="dark"] input[type="file"],
[data-theme="dark"] select,
[data-theme="dark"] textarea {
    background: var(--surface-2);
    color: var(--text);
    border-color: var(--border);
}
[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
    color: var(--subtle);
    opacity: 1;
}
[data-theme="dark"] input:focus,
[data-theme="dark"] select:focus,
[data-theme="dark"] textarea:focus {
    box-shadow: 0 0 0 3px rgba(111,147,214,0.22);
}

.field-hint {
    font-size: 0.78rem;
    color: var(--subtle);
    margin: 6px 0 0;
}

.form-errors {
    background: #fff8f8;
    border: 1px solid #fca5a5;
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    margin-bottom: 14px;
}
.form-errors p { margin: 2px 0; color: #b91c1c; font-size: 0.9rem; }

.form-success {
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    margin-bottom: 14px;
}
.form-success p { margin: 0; color: #166534; font-size: 0.92rem; }

.form-submit { margin-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; }

.check-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 0.88rem;
    color: var(--muted);
}
.check-row input { margin-top: 3px; }

/* ─── Community: checkbox grid (open-to, can-help-with) ─── */
.checkbox-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px 16px;
    margin-top: 4px;
}
@media (min-width: 720px) {
    .checkbox-grid { grid-template-columns: 1fr 1fr; }
}
.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 400;
}
.checkbox-item input[type="checkbox"] { margin: 0; }

/* ─── Simple grid cards ───────────────────────────────── */
.grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}
@media (min-width: 720px) {
    .grid { grid-template-columns: 1fr 1fr; }
}

.card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.card:hover { border-color: var(--accent-muted); }
.card h3 { margin: 0 0 6px; font-size: 0.98rem; }
.card p { margin: 0; font-size: 0.88rem; line-height: 1.6; }

/* ─── Member directory card v2 ───────────────────────────
   The product unit. Pure typography — no avatars, no photo placeholders.
   One clear hierarchy (name → role·company → place·industry), a single
   status badge only when it means something, and the intro action anchored
   at the bottom. */
.member-card {
    padding: 18px;
    display: flex;
    flex-direction: column;
}
.member-head {
    display: flex;
    gap: 13px;
    align-items: flex-start;
}
/* Typographic monogram — a rounded SQUARE on purpose: it reads as a mark,
   not as a photo placeholder (the product has no profile photos). */
.member-mono {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.88rem;
    font-weight: 650;
    letter-spacing: 0.02em;
    flex: 0 0 auto;
    user-select: none;
    /* One quiet, consistent tone — premium, not playful. */
    background: var(--surface-2);
    color: var(--muted);
    border: 1px solid var(--border-sub);
}

.member-id { min-width: 0; flex: 1; }
.member-card h3 { margin: 0 0 2px; font-size: 1.05rem; font-weight: 650; letter-spacing: -0.01em; }
.member-role { margin: 0; font-size: 0.84rem; line-height: 1.45; color: var(--text); }
.member-meta { margin: 2px 0 0; font-size: 0.78rem; color: var(--subtle); }

.member-flag {
    flex: 0 0 auto;
    font-size: 0.67rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: var(--accent);
    background: var(--accent-bg);
    border: 1px solid rgba(31, 59, 110, 0.18);
    border-radius: 999px;
    padding: 3px 10px;
    white-space: nowrap;
}
[data-theme="dark"] .member-flag { border-color: var(--accent-muted); }

/* Short human summary — visible by default, the "reason to connect". */
.member-bio {
    margin: 12px 0 0;
    font-size: 0.84rem;
    line-height: 1.6;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
/* "Good to ask about" — what to approach this person with. Always present
   (skills first, profile facts as fallback). "Also into:" carries hobbies. */
.member-ask { margin: 9px 0 0; font-size: 0.8rem; line-height: 1.55; color: var(--muted); }
.member-ask-label { font-weight: 600; color: var(--text); }
.member-also { margin-top: 4px; }
.member-also .member-ask-label { color: var(--subtle); font-weight: 500; }

.member-links { font-size: 0.78rem; display: inline-flex; gap: 14px; flex-wrap: wrap; }
.member-links a { color: var(--accent); }
.member-links a:hover { text-decoration: underline; }
/* "after accepted intro" state: visible promise, no link — intro stays primary. */
.member-links .li-locked { color: var(--subtle); cursor: default; }

.member-details { margin-top: 11px; border-top: 1px solid var(--border-sub); padding-top: 8px; }
.member-details summary {
    cursor: pointer;
    list-style: none;
    font-size: 0.76rem;
    color: var(--subtle);
}
.member-details summary::-webkit-details-marker { display: none; }
.member-details summary::after { content: " +"; color: var(--accent); }
.member-details[open] summary::after { content: " \2013"; }
.member-details .md-body { margin-top: 8px; font-size: 0.8rem; color: var(--muted); }
.member-details .md-body p { margin: 0 0 5px; line-height: 1.5; }
.member-details .md-body p:last-child { margin-bottom: 0; }

.member-action {
    margin-top: auto;
    padding-top: 13px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}
.member-action .hint { font-size: 0.76rem; }
.member-cta { display: inline-flex; align-items: center; gap: 9px; }
/* Approved state: a quiet confirmation + a clear next step. */
.intro-approved { font-size: 0.76rem; font-weight: 600; color: var(--text); }
.intro-approved-link { font-size: 0.78rem; color: var(--accent); }
.intro-approved-link:hover { text-decoration: underline; }

/* Filter helper + count framing */
.mf-help { margin: 0 0 10px; font-size: 0.8rem; color: var(--subtle); }
.members-count-sub { color: var(--subtle); font-weight: 400; }
.members-privacy {
    display: block;
    margin-top: 4px;
    font-size: 0.74rem;
    color: var(--subtle);
}

/* ─── Homepage demo cards (illustrative member profiles) ──
   The real member-card component, shown as evidence on the homepage.
   Non-interactive: links and the intro button are inert spans. */
.demo-grid { margin-top: 18px; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .demo-grid { grid-template-columns: 1fr; } }
.demo-card { cursor: default; }
.demo-card .member-links span { color: var(--accent); opacity: 0.75; }
.demo-btn { pointer-events: none; opacity: 0.7; }
.demo-note {
    margin: 12px 0 0;
    font-size: 0.76rem;
    color: var(--subtle);
}

/* ─── Members filter bar + result count ─────────────────── */
.members-filter form { margin: 0; }
.mf-row {
    display: grid;
    grid-template-columns: 2fr repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
    align-items: center;
}
.mf-row input, .mf-row select { min-height: 38px; }
.mf-actions { display: flex; gap: 8px; }
@media (max-width: 900px) {
    .mf-row { grid-template-columns: 1fr 1fr; }
    .mf-row .mf-search, .mf-actions { grid-column: 1 / -1; }
}
.members-count { font-size: 0.8rem; color: var(--subtle); margin-bottom: 14px; }
.members-count strong { color: var(--text); }
.members-count a { color: var(--accent); }

.pill {
    display: inline-flex;
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: #fff;
    font-size: 0.73rem;
    color: var(--muted);
}
.pill.accent {
    color: var(--accent);
    background: var(--accent-bg);
    border-color: rgba(31,59,110,0.18);
}

/* Member primary status — a single calm pill (Open to Work / Hiring). */
.member-status {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0 0;
}

/* Trust badges — calm, factual, non-interactive. No counts, no scores. */
.trust-badges {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}
.trust-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    border-radius: 999px;
    border: 1px solid rgba(31,59,110,0.18);
    background: var(--accent-bg);
    color: var(--accent);
    font-size: 0.7rem;
    letter-spacing: 0.01em;
    cursor: default;
}

/* ─── Trust strip ─────────────────────────────────────── */
.trust-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    margin: 0 0 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.trust-item {
    padding: 14px 18px;
    border-right: 1px solid var(--border-sub);
}
.trust-item:last-child { border-right: none; }
.trust-item .trust-label {
    font-size: 0.66rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--subtle);
    margin-bottom: 4px;
}
.trust-item .trust-value {
    font-size: 0.86rem;
    color: var(--text);
    font-weight: 600;
    letter-spacing: -0.01em;
}
@media (max-width: 900px) {
    .trust-strip { grid-template-columns: 1fr 1fr; }
    .trust-item { border-bottom: 1px solid var(--border-sub); }
    .trust-item:nth-child(odd) { border-right: 1px solid var(--border-sub); }
    .trust-item:nth-child(even) { border-right: none; }
    .trust-item:nth-last-child(-n+2) { border-bottom: none; }
}

/* ─── Form section subheading (groups long forms) ─────── */
.form-section {
    margin: 22px 0 6px;
    padding-top: 14px;
    border-top: 1px solid var(--border-sub);
}
.form-section:first-of-type { border-top: none; padding-top: 0; margin-top: 4px; }
.form-section h3 {
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--subtle);
    margin: 0 0 12px;
    font-weight: 600;
}

/* ─── Callout (gentle inline reassurance, not error) ──── */
.callout {
    background: var(--accent-bg);
    border: 1px solid rgba(31,59,110,0.15);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    color: var(--muted);
    font-size: 0.85rem;
    margin: 0 0 14px;
}
.callout strong { color: var(--text); }

/* ─── Tables (admin) ───────────────────────────────────── */
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.table th, .table td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-sub);
    vertical-align: top;
}
.table th {
    background: #fafafa;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--subtle);
}
.table tr:last-child td { border-bottom: none; }

/* Rows that mix text with a button: centre everything vertically so the
   button doesn't look like it dropped below the line. */
.table-middle td { vertical-align: middle; }

/* Dark theme: tables were hardcoded white (light theme); give them the same
   surface treatment as panels so rows stay readable. */
[data-theme="dark"] .table { background: var(--surface); }
[data-theme="dark"] .table th { background: var(--surface-2); }

/* Dark theme: the remaining hardcoded-light components. Pills were white
   (light text on white = invisible); error/success boxes get dark-tinted
   equivalents with the same red/green meaning. */
[data-theme="dark"] .pill { background: var(--surface-2); }
[data-theme="dark"] .form-errors,
[data-theme="dark"] .panel-error {
    background: #2a1719;
    border-color: #7f1d1d;
}
[data-theme="dark"] .form-errors p { color: #fca5a5; }
[data-theme="dark"] .form-success,
[data-theme="dark"] .panel-success {
    background: #14241a;
    border-color: #166534;
}
[data-theme="dark"] .form-success p { color: #86efac; }

/* ─── Collapsible FAQ sections (no JS — native <details>) ── */
details.faq summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary h2 { margin: 0; }
details.faq summary::after {
    content: "+";
    font-size: 1.5rem;
    line-height: 1;
    color: var(--accent);
    flex: 0 0 auto;
}
details.faq[open] summary::after { content: "\2013"; }
details.faq > .faq-body { margin-top: 12px; }

/* ─── Footer ─────────────────────────────────────────── */

.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    color: var(--subtle);
    font-size: 0.78rem;
    padding: 20px 0 36px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}
.footer-nav { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }

/* Contact is an action, not a policy page — set it slightly apart. */
.footer-link-contact {
    margin-left: 8px;
    padding-left: 24px;
    border-left: 1px solid var(--border);
}
.footer-link { color: var(--muted); transition: color 0.15s; }
.footer-link:hover { color: var(--text); }
.footer-meta { color: var(--subtle); }

/* ─── Responsive ─────────────────────────────────────── */

@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
    .container { width: calc(100% - 24px); }
    .main-content { padding: 14px 0 56px; }
    .panel { padding: 20px; }
    .panel.panel-flat { padding-left: 0; padding-right: 0; }
    .topbar { flex-direction: column; align-items: flex-start; gap: 10px; }
    .footer { flex-direction: column; align-items: flex-start; }
    /* Tables (companies/admin) can be wider than a phone screen — let them
       scroll sideways instead of stretching the whole page. */
    .table { display: block; overflow-x: auto; }
}

/* ─── Layered depth ──────────────────────────────────────
   The dark theme used --bg for panels AND the page, so everything sat on one
   plane and the homepage read as a flat document. Panels now sit one surface
   step above the page, and cards one step above panels — depth from layering,
   not decoration. Light theme is untouched (it already had white-on-white with
   borders + shadow doing this job). */
[data-theme="dark"] .panel { background: var(--surface); }
[data-theme="dark"] .panel.panel-flat { background: transparent; }
[data-theme="dark"] .card { background: var(--surface-2); }
[data-theme="dark"] .trust-strip { background: var(--surface); }
[data-theme="dark"] .trust-item .trust-value { color: var(--text); }

/* A single, faint navy bloom behind the hero — anchors the page opening
   without imagery. closest-side: the gradient reaches zero before the box
   edges, so it can never produce a visible seam. */
.hero-grid { position: relative; }
.hero-grid::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse closest-side at 28% 40%, rgba(31,59,110,0.07), transparent);
    pointer-events: none;
    z-index: -1;
}
[data-theme="dark"] .hero-grid::before {
    background: radial-gradient(ellipse closest-side at 28% 40%, rgba(111,147,214,0.11), transparent);
}

/* ─── GitHub-style density for the registration form ────────────────────
   Scoped to .gh-dense so the rest of the public site keeps its airy spacing. */
.gh-dense { padding: 18px 20px; }
.gh-dense .section-head { margin-bottom: 10px; }
.gh-dense .section-head h2 { font-size: 1rem; }
.gh-dense .section-head p { font-size: .78rem; }
.gh-dense .form-section {
    margin: 14px 0 4px; padding-top: 12px;
}
.gh-dense .form-section h3 { font-size: .68rem; margin-bottom: 8px; }
.gh-dense .field-group { margin-bottom: 9px; }
.gh-dense .field-row { gap: 9px; }
.gh-dense .field-group label { font-size: .76rem; margin-bottom: 3px; }
.gh-dense input[type="text"], .gh-dense input[type="email"],
.gh-dense input[type="password"], .gh-dense input[type="tel"],
.gh-dense input[type="url"], .gh-dense select, .gh-dense textarea {
    min-height: 34px; padding: 6px 10px; font-size: 13.5px; border-radius: 6px;
}
.gh-dense textarea { min-height: 64px; }
.gh-dense .field-hint { font-size: .72rem; margin-top: 3px; }
.gh-dense .callout { font-size: .78rem; padding: 9px 12px; margin-bottom: 10px; }
.gh-dense .checkbox-item { font-size: 13px; }
.gh-dense .checkbox-grid { gap: 4px 16px; }
.gh-dense .btn { padding: 7px 14px; font-size: .8rem; }
.gh-dense details.form-acc summary { padding: 9px 14px; font-size: .85rem; }
.gh-dense details.form-acc > .acc-body { padding: 6px 14px 12px; }
.gh-dense .vis-badge { font-size: .64rem; }

/* ─── Collapsible form sections (registration — progressive disclosure) ──
   Native <details>: zero JS (CSP-safe). Collapsed by default; the form is
   completable without ever opening one. */
details.form-acc {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    margin: 0 0 10px;
}
details.form-acc summary {
    cursor: pointer; list-style: none;
    display: flex; align-items: center; gap: 10px;
    padding: 12px 16px;
    font-weight: 600; font-size: .92rem; color: var(--text);
}
details.form-acc summary::-webkit-details-marker { display: none; }
details.form-acc summary::after {
    content: "+"; font-size: 1.25rem; line-height: 1;
    color: var(--accent); margin-left: auto; flex: 0 0 auto;
}
details.form-acc[open] summary::after { content: "\2013"; }
details.form-acc summary .acc-sub {
    font-weight: 400; font-size: .74rem; color: var(--subtle);
}
details.form-acc > .acc-body {
    padding: 8px 16px 16px;
    border-top: 1px solid var(--border-sub);
}

/* ─── Conditional availability (only when "looking") ───────────────────
   Pure CSS, no JS (CSP-safe). The availability field is hidden until the
   member picks a job- or internship-seeking status. :has() is supported in
   all current browsers. */
.avail-wrap { display: none; }
form:has(input[name="member_status"][value="open_to_work"]:checked) .avail-wrap,
form:has(input[name="member_status"][value="open_to_internship"]:checked) .avail-wrap {
    display: block;
}

/* ─── Per-field visibility controls (registration + profile) ───────────
   .vis-toggle  — inline 👁 checkbox next to an optional field's label
   .vis-badge   — non-interactive marker: always visible / never shown   */
.vis-toggle {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: .72rem; font-weight: 500; color: var(--muted);
    margin-left: 8px; cursor: pointer; white-space: nowrap;
}
.vis-toggle input { margin: 0; accent-color: var(--accent); }
.vis-badge {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: .66rem; font-weight: 500; padding: 1px 8px;
    border-radius: 999px; border: 1px solid var(--border);
    color: var(--subtle); margin-left: 8px; white-space: nowrap;
}
.vis-badge.vis-always {
    color: var(--accent); background: var(--accent-bg);
    border-color: rgba(31,59,110,0.18);
}

/* Selectable choice cards (clickable radio group) — used on registration. */
.choice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px;
    margin-top: 6px;
}
.choice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}
.choice:hover { border-color: var(--accent-muted); }
.choice input { margin: 3px 0 0; accent-color: var(--accent); flex: 0 0 auto; }
.choice-text { display: flex; flex-direction: column; gap: 2px; }
.choice-title { font-size: .95rem; font-weight: 600; color: var(--text); }
.choice-desc { font-size: .82rem; color: var(--muted); line-height: 1.35; }
.choice:has(input:checked) {
    border-color: var(--accent);
    background: var(--accent-bg);
}

/* ─── Homepage editorial layout ──────────────────────────
   Scoped to the homepage (.home-*, .prose-*). Prose sits directly on the
   page background; rhythm comes from whitespace and alternating full-bleed
   tone bands, not from boxes. The panel/card system used everywhere else
   is untouched. */

/* Hero — one idea, full width, no side column, no glow. */
.home-hero {
    padding: clamp(56px, 9vw, 120px) 0 clamp(28px, 4vw, 52px);
}
.home-hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.3rem);
    font-weight: 650;
    letter-spacing: -0.015em;
    line-height: 1.1;
    margin: 0 0 20px;
    max-width: 22ch;
}
.home-hero .hero-text {
    font-size: clamp(1.02rem, 1.5vw, 1.13rem);
    line-height: 1.7;
    color: var(--muted);
    max-width: 58ch;
    margin: 0;
}
.home-hero .hero-actions { margin-top: 26px; }
.home-hero .btn-primary { padding: 12px 22px; font-size: 0.92rem; }

/* Three steps — open numbered columns, hairline above, no cards. */
.home-steps {
    padding: clamp(40px, 6vw, 72px) 0 clamp(56px, 8vw, 96px);
    border-top: 1px solid var(--border-sub);
}
.steps-head h2 {
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin: 0 0 2px;
}
.steps-head p { margin: 0; color: var(--subtle); font-size: 0.88rem; }
.steps-row {
    display: grid;
    /* auto-fit: 3 steps on the homepage, 4 on how-it-works — same component. */
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: clamp(24px, 4vw, 56px);
    margin-top: 36px;
}
.step .step-num {
    font-size: clamp(2.6rem, 4vw, 3.4rem);
    font-weight: 200;
    line-height: 1;
    color: var(--subtle);
    opacity: 0.55;
    margin-bottom: 14px;
}
.step h3 {
    font-size: 1.02rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin: 0 0 6px;
}
.step p { margin: 0; color: var(--muted); line-height: 1.65; }

@media (max-width: 720px) {
    .steps-row { grid-template-columns: 1fr; gap: 26px; }
    .step {
        display: grid;
        grid-template-columns: 48px 1fr;
        column-gap: 14px;
    }
    .step .step-num { grid-row: 1 / span 2; margin-bottom: 0; }
    .step h3 { margin-top: 6px; }
    .step p { grid-column: 2; }
}

/* Prose sections — the essays, open, at a readable measure. */
.home-prose .prose-section {
    position: relative;
    padding: clamp(48px, 7vw, 96px) 0;
}
.home-prose .prose-section h2 {
    font-size: clamp(1.35rem, 2.2vw, 1.7rem);
    font-weight: 650;
    letter-spacing: -0.015em;
    line-height: 1.25;
    margin: 0 0 18px;
}
.home-prose .prose-body { max-width: 68ch; }
.home-prose .prose-body p {
    font-size: 1.06rem;
    line-height: 1.75;
    color: var(--muted);
    margin: 0 0 16px;
}
.home-prose .prose-body p:last-child { margin-bottom: 0; }
.home-prose .prose-body strong { color: var(--text); }

/* Every second essay sits on a lifted full-bleed band — rhythm from tone,
   not borders. inset reaches the viewport edges; body clips overflow-x. */
.home-prose .prose-section:nth-of-type(even)::before {
    content: "";
    position: absolute;
    inset: 0 calc(50% - 50vw);
    background: var(--bg);
    z-index: -1;
}
[data-theme="dark"] .home-prose .prose-section:nth-of-type(even)::before {
    background: var(--surface);
}

/* Plain two-column rows — replaces cards inside prose and accordions. */
.prose-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 40px;
    margin: 20px 0 0;
}
.prose-cols h3 {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin: 0 0 6px;
    color: var(--text);
}
.prose-cols p { margin: 0; color: var(--muted); line-height: 1.65; }
.home-prose .prose-body .prose-cols p { font-size: 0.97rem; }
@media (max-width: 720px) {
    .prose-cols { grid-template-columns: 1fr; }
}

/* On the homepage the callout sheds its box and becomes a quiet aside. */
.home-prose .callout {
    background: transparent;
    border: none;
    border-left: 2px solid var(--accent);
    border-radius: 0;
    padding: 2px 0 2px 16px;
    font-size: 1rem;
    font-style: italic;
    margin: 20px 0 0;
}

/* Closing — a plain statement, one button, one quiet link. */
.home-closing {
    padding: clamp(48px, 7vw, 88px) 0 clamp(24px, 4vw, 44px);
    border-top: 1px solid var(--border-sub);
}
.home-closing h2 {
    font-size: 1.35rem;
    font-weight: 650;
    letter-spacing: -0.015em;
    margin: 0 0 8px;
}
.home-closing p { color: var(--muted); margin: 0 0 22px; max-width: 58ch; }
.home-closing .form-submit { align-items: center; }
.link-quiet {
    color: var(--muted);
    font-size: 0.88rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1px;
    transition: color 0.15s, border-color 0.15s;
}
.link-quiet:hover { color: var(--text); border-color: var(--subtle); }

/* ─── Hero background photos (homepage) ──────────────────
   Images live in assets/hero/ and are listed by index.php. The photo is
   heavily darkened so the type stays first — the image is atmosphere,
   not decoration. Works identically in light and dark themes: the hero
   becomes a dark full-bleed band, like a cover. */

.home-hero.has-photo {
    position: relative;
    padding: clamp(48px, 6vw, 90px) 0;
    /* Pull the photo band up against the topbar (cancels main-content
       padding-top 24px + topbar margin-bottom 10px). */
    margin-top: -34px;
    /* The hero fills the first screen exactly: photo ends where the fold is,
       whatever the display size. svh = small viewport height (mobile-safe). */
    min-height: calc(100vh - 72px);
    min-height: calc(100svh - 72px);
    display: flex;
    flex-direction: column;
    justify-content: center;
}
@media (max-width: 720px) {
    .home-hero.has-photo {
        margin-top: -24px;
        /* Mobile topbar stacks and is taller. */
        min-height: calc(100vh - 165px);
        min-height: calc(100svh - 165px);
        padding: 36px 0;
    }
}

.hero-bg {
    position: absolute;
    inset: 0 calc(50% - 50vw);
    overflow: hidden;
    z-index: -2;
}

.hero-bg-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center 56%;
    background-repeat: no-repeat;
    opacity: 0;
}
.hero-bg-slide:only-child { opacity: 1; }

/* Directional wash: dark on the left where the type sits, nearly clear on
   the right so the photo keeps its depth — no flat "fog". A second vertical
   layer fades the band into the page colour at the bottom. */
.home-hero.has-photo::after {
    content: "";
    position: absolute;
    inset: 0 calc(50% - 50vw);
    z-index: -1;
    background:
        linear-gradient(180deg,
            rgba(10, 13, 18, 0.35) 0%,
            rgba(10, 13, 18, 0) 30%,
            rgba(10, 13, 18, 0) 90%,
            rgba(10, 13, 18, 0.25) 96%,
            var(--page) 100%),
        linear-gradient(90deg,
            rgba(10, 13, 18, 0.82) 0%,
            rgba(10, 13, 18, 0.62) 42%,
            rgba(10, 13, 18, 0.28) 72%,
            rgba(10, 13, 18, 0.12) 100%);
}

/* Narrow screens: text spans the full width, so the wash must too. */
@media (max-width: 720px) {
    .home-hero.has-photo::after {
        background:
            linear-gradient(180deg,
                rgba(10, 13, 18, 0.30) 0%,
                rgba(10, 13, 18, 0) 30%,
                rgba(10, 13, 18, 0) 90%,
                rgba(10, 13, 18, 0.25) 96%,
                var(--page) 100%),
            linear-gradient(90deg,
                rgba(10, 13, 18, 0.80) 0%,
                rgba(10, 13, 18, 0.62) 60%,
                rgba(10, 13, 18, 0.50) 100%);
    }
}

/* Type on photo: always light, regardless of theme. */
.home-hero.has-photo h1 { color: #fff; }
.home-hero.has-photo .hero-text { color: rgba(255, 255, 255, 0.86); }
.home-hero.has-photo .eyebrow { color: rgba(255, 255, 255, 0.65); }
.home-hero.has-photo .hint { color: rgba(255, 255, 255, 0.55); }

/* Crossfade cycles — one keyframe set per slide count (2–6). Each slide is
   visible for 30s; the fade dissolves gently into the neighbour over ~5s
   (eased in index.php with ease-in-out). */
@keyframes bgfade-2 { 0%, 41.7% { opacity: 1; } 50%, 91.7% { opacity: 0; } 100% { opacity: 1; } }
@keyframes bgfade-3 { 0%, 27.8% { opacity: 1; } 33.3%, 94.4% { opacity: 0; } 100% { opacity: 1; } }
@keyframes bgfade-4 { 0%, 20.8% { opacity: 1; } 25%, 95.8% { opacity: 0; } 100% { opacity: 1; } }
@keyframes bgfade-5 { 0%, 16.7% { opacity: 1; } 20%, 96.7% { opacity: 0; } 100% { opacity: 1; } }
@keyframes bgfade-6 { 0%, 13.9% { opacity: 1; } 16.7%, 97.2% { opacity: 0; } 100% { opacity: 1; } }

/* Anchor targets: keep headings clear of the sticky topbar when jumping. */
.prose-section[id], .home-steps[id] { scroll-margin-top: 96px; }

/* Legacy anchor aliases (old #whatsapp/#linkedin/… links land on the merged
   sections without a 404 or a mis-scroll). */
.anchor-alias { display: block; height: 0; scroll-margin-top: 96px; }

/* ─── Brand mark ─────────────────────────────────────────
   Every visible "TurkishExpats.ch": the name inherits the text colour,
   the ".ch" is always Swiss red. */
.brand-tld { color: var(--swiss); }

/* ─── Identity badge (topbar, far right) ─────────────────
   Shows who is browsing the public pages: red = admin, accent = member. */
.identity-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 12px;
    margin-left: 6px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    white-space: nowrap;
    border: 1px solid transparent;
    transition: background 0.15s, border-color 0.15s;
}
.identity-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    flex: 0 0 auto;
}
.identity-admin {
    color: #fff;
    background: var(--swiss);
    border-color: rgba(0, 0, 0, 0.12);
}
.identity-admin:hover { background: #b81b26; color: #fff; }
.identity-member {
    color: var(--accent);
    background: var(--accent-bg);
    border-color: rgba(31, 59, 110, 0.22);
}
.identity-member:hover { border-color: var(--accent); color: var(--accent); }
[data-theme="dark"] .identity-member { border-color: var(--accent-muted); }

/* Photo credits: small thumbnail cards, GitHub-style grid. */
.credit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 22px 20px;
    margin-top: 6px;
}
.credit-card { margin: 0; }
.credit-card img {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.credit-card a:hover img {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(15, 17, 21, 0.12);
}
.credit-card figcaption {
    margin-top: 8px;
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--muted);
}
.credit-card figcaption .footer-link { font-size: 0.74rem; }

/* The Idea section: quiet follow-up links to the three big questions. */
.home-prose .prose-body .idea-links {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.95rem;
}
.idea-links a {
    color: var(--accent);
    width: fit-content;
    border-bottom: 1px solid transparent;
    transition: border-color 0.15s;
}
.idea-links a:hover { border-color: var(--accent); }

/* ─── Community footprint ────────────────────────────────
   A quiet trust signal above the footer: where members recently signed in.
   Editorial and muted — deliberately not a dashboard. */
.footprint {
    padding: clamp(36px, 5vw, 56px) 0 clamp(20px, 3vw, 32px);
    border-top: 1px solid var(--border-sub);
    text-align: center;
}
.footprint h2 {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--subtle);
    margin: 0 0 14px;
}
.footprint-line {
    margin: 0 0 10px;
    font-size: 0.95rem;
    color: var(--muted);
    line-height: 1.9;
}
.footprint-count { color: var(--subtle); font-size: 0.85em; }
.footprint-sep { color: var(--border); padding: 0 2px; }
.footprint-note {
    margin: 0;
    font-size: 0.74rem;
    color: var(--subtle);
}

/* ─── Auth pages (login, admin login) ────────────────────
   Editorial, centred, no boxes — the form sits directly on the page. */
.auth-wrap {
    max-width: 400px;
    margin: clamp(24px, 7vw, 80px) auto 0;
}
.auth-center {
    min-height: calc(100vh - 140px);
    display: flex;
    align-items: center;
    justify-content: center;
}
.auth-center .auth-wrap { margin: 0; width: 100%; }
.auth-wrap h1 {
    font-size: 1.75rem;
    font-weight: 650;
    letter-spacing: -0.015em;
    line-height: 1.15;
    margin: 0 0 6px;
}
.auth-lead { color: var(--muted); margin: 0 0 26px; }
.auth-wrap .field-group { margin-bottom: 16px; }
.auth-wrap .callout, .auth-wrap .form-errors { margin-bottom: 18px; }
.auth-actions { align-items: center; gap: 16px; }
.auth-actions .btn { padding: 10px 24px; }
.auth-alt { margin: 26px 0 0; font-size: 0.86rem; color: var(--subtle); }
.auth-admin-eyebrow {
    display: inline-flex; align-items: center; gap: 6px;
}
.auth-admin-eyebrow::before {
    content: ""; width: 7px; height: 7px; border-radius: 50%;
    background: var(--swiss); flex: 0 0 auto;
}

/* Topbar login dropdown: a compact sign-in without leaving the page. */
.login-menu > .nav-menu-panel {
    left: auto;
    right: 0;
    min-width: 250px;
    max-width: 280px;
    padding: 14px;
}
.login-panel .field-group { margin-bottom: 10px; }
.login-panel .field-group label {
    font-size: 0.74rem;
    margin-bottom: 4px;
}
.login-panel input { min-height: 36px; padding: 7px 10px; font-size: 14px; }
.login-forgot {
    display: inline-block;
    margin-top: 10px;
    font-size: 0.78rem;
}

/* Badge as a dropdown: panel opens below-right with profile + logout. */
.identity-menu { margin-left: 6px; }
.identity-menu > summary.identity-badge { cursor: pointer; }
.identity-menu > .nav-menu-panel {
    left: auto;
    right: 0;
    min-width: 170px;
    max-width: 240px;
}

/* ─── Explore dropdown (topbar) ──────────────────────────
   Native <details>: the homepage sections, in page order, opening downward.
   No JS needed to open; js/nav-menu.js only closes it on outside clicks. */
.nav-menu { position: relative; }
.nav-menu > summary {
    list-style: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    user-select: none;
}
.nav-menu > summary::-webkit-details-marker { display: none; }
.nav-menu > summary::after {
    content: "";
    width: 7px;
    height: 7px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.15s;
}
.nav-menu[open] > summary::after { transform: rotate(225deg) translateY(-1px); }

.nav-menu-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 320px;
    max-width: 380px;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 8px;
    z-index: 300;
}
[data-theme="dark"] .nav-menu-panel { background: var(--surface); }
.nav-menu-panel a {
    padding: 7px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.84rem;
    color: var(--muted);
    transition: color 0.15s, background 0.15s;
}
.nav-menu-panel a:hover {
    color: var(--text);
    background: rgba(0, 0, 0, 0.05);
}
[data-theme="dark"] .nav-menu-panel a:hover { background: rgba(255, 255, 255, 0.08); }

/* About dropdown: one calm list, single-line items. The first three are the
   big visitor questions — slightly emphasized, nothing else. */
.about-menu > .nav-menu-panel {
    width: max-content;
    max-width: min(580px, calc(100vw - 32px));
    padding: 10px 8px 12px;
}
.about-menu .nav-menu-panel a { white-space: nowrap; }
.about-menu .nav-menu-panel a.nav-menu-q {
    font-weight: 600;
    color: var(--text);
}

@media (max-width: 720px) {
    /* Topbar stacks on mobile; let the panel flow in place of floating. */
    .nav-menu-panel {
        position: static;
        box-shadow: none;
        border: none;
        background: transparent;
        padding: 2px 0 4px 14px;
        min-width: 0;
    }
    [data-theme="dark"] .nav-menu-panel { background: transparent; }
    .about-menu > .nav-menu-panel { width: auto; max-width: none; }
    .about-menu .nav-menu-panel a { white-space: normal; }
}

/* Accessibility: no motion for users who asked for none — first photo only. */
@media (prefers-reduced-motion: reduce) {
    .hero-bg-slide { animation: none !important; opacity: 0; }
    .hero-bg-slide:first-child { opacity: 1; }
}


/* ─── In-text links must look like links ─────────────────
   Anywhere a link sits inside running text (prose sections,
   hints, callouts, auth pages), it gets an underline and the
   text colour, so readers can tell it apart at a glance.
   Footer navigation and credit cards keep their quiet style. */
.prose-body a:not(.btn),
.hero-text a:not(.btn),
.auth-alt a,
.members-count a,
.demo-note a,
.callout a:not(.btn),
.hint a:not(.btn) {
    color: var(--text);
    text-decoration: underline;
    text-decoration-color: var(--accent);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color 0.15s, text-decoration-color 0.15s;
}
.prose-body a:not(.btn):hover,
.hero-text a:not(.btn):hover,
.auth-alt a:hover,
.members-count a:hover,
.demo-note a:hover,
.callout a:not(.btn):hover,
.hint a:not(.btn):hover {
    color: var(--accent);
    text-decoration-color: var(--accent);
}

/* ─── Member card v5: compact, equal-height, no drawer ──────
   One curated summary per member, roughly 150-170px tall on desktop.
   No avatars, no expansion, no shadows. Structure: name + status badge,
   role · company, location · sector(s), optional one-line interests,
   then one action row (Request intro primary, LinkedIn/CV quiet).
   Heights stay even because every line is single-line clamped and the
   action row is anchored to the bottom. */
.member-card.mc2 {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 18px 20px 15px;
    min-height: 150px;
    box-shadow: none;
    transition: border-color 0.18s;
}
.member-card.mc2:hover { border-color: var(--subtle); }

.mc2-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    min-height: 1.45em;
}
.mc2-name {
    margin: 0;
    font-size: 1.04rem;
    font-weight: 650;
    letter-spacing: -0.012em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mc2 .member-flag { flex: 0 0 auto; }

.mc2-line {
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mc2-pro { margin-top: 5px; font-size: 0.9rem; color: var(--text); }
.mc2-co  { color: var(--muted); }
.mc2-loc { margin-top: 3px; font-size: 0.83rem; color: var(--muted); }
.mc2-sec { color: var(--subtle); }
.mc2-intr { margin-top: 7px; font-size: 0.83rem; color: var(--muted); font-style: italic; }

.mc2-action {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: auto;
    padding-top: 14px;
}
.mc2-state { font-size: 0.82rem; color: var(--muted); white-space: nowrap; }
.mc2-quiet {
    display: flex;
    align-items: center;
    margin-left: auto;
    white-space: nowrap;
    overflow: hidden;
}
.mc2-quiet .member-links { display: inline-flex; gap: 12px; }
.mc2-quiet .member-links a, .mc2-quiet .member-links .li-locked {
    font-size: 0.82rem;
    color: var(--muted);
}
.mc2-quiet .member-links a:hover { color: var(--accent); }

/* ─── Additional-areas chips (registration + profile edit) ──
   Checkboxes styled as selectable chips: tap to add, tap again to
   remove. Selected chips read as quiet accent outlines, never loud. */
.chip-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}
.chip { cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
    display: inline-block;
    font-size: 0.8rem;
    line-height: 1;
    color: var(--muted);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 7px 13px;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.chip:hover span { border-color: var(--subtle); color: var(--text); }
.chip input:checked + span {
    color: var(--accent);
    border-color: var(--accent);
    font-weight: 550;
}
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.chip-disabled { cursor: default; }
.chip-disabled span { opacity: 0.45; }
.chip-disabled:hover span { border-color: var(--border); color: var(--muted); }

/* Quiet "+N" for additional areas on the member card (full list on hover). */
.mc2-sec-more { color: var(--subtle); cursor: help; }

/* ─── Homepage demo cards: open sector line ─────────────── */
.mc2-secline { margin-top: 3px; font-size: 0.83rem; color: var(--subtle); }
.demo-card .mc2-quiet .member-links span { color: var(--accent); opacity: 0.75; font-size: 0.82rem; }

/* ─── Card sizing fixes ─────────────────────────────────────
   1) min-width: 0 lets single-line clamped text actually truncate
      instead of widening its grid column (cards stay equal width).
   2) .prose-body p margins were leaking into the demo cards; pin
      every card paragraph back to the card's own rhythm. */
.member-card.mc2 { min-width: 0; }
.member-card.mc2 p { margin: 0; max-width: none; }
.member-card.mc2 .mc2-pro { margin-top: 5px; }
.member-card.mc2 .mc2-loc { margin-top: 3px; }
.member-card.mc2 .mc2-secline { margin-top: 3px; }
.member-card.mc2 .mc2-intr { margin-top: 7px; }
