/* ==========================================================================
   O'Brien Immigration — public site
   Design tokens are injected at render time from theme.json (see base.html
   <style>). Every color, font, and radius below references a custom property.
   ========================================================================== */

/* ---- Reset (minimal) ---- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
img, svg, video { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; padding: 0; }
a { color: inherit; text-decoration: none; }

/* ---- Base typography ---- */
body {
    font-family: var(--font-body), system-ui, sans-serif;
    font-size: 17px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--paper);
    font-feature-settings: "ss01", "cv11";
}
h1, h2, h3, h4 {
    font-family: var(--font-display), Georgia, serif;
    color: var(--ink);
    letter-spacing: -0.015em;
    margin: 0 0 0.6em;
    font-weight: 500;
    line-height: 1.1;
}
h1 { font-size: clamp(2.4rem, 5.5vw, 4.5rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.9rem, 3.5vw, 2.75rem); }
h3 { font-size: clamp(1.35rem, 2vw, 1.6rem); }
h4 { font-size: 1.1rem; }
p, li { color: var(--ink); }
p { margin: 0 0 1em; }
a.text-link { color: var(--link); border-bottom: 1px solid color-mix(in srgb, var(--link) 30%, transparent); padding-bottom: 1px; transition: border-color 0.15s; }
a.text-link:hover { border-bottom-color: var(--link); }

.eyebrow {
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1.1rem;
    display: inline-block;
}

.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 clamp(20px, 4vw, 40px);
}
.container-narrow { max-width: 760px; }
.container-wide { max-width: 1440px; }

.section { padding: clamp(72px, 10vw, 140px) 0; }
.section-tight { padding: clamp(56px, 6vw, 80px) 0; }
@media (max-width: 640px) {
    .section { padding: 56px 0; }
    .section-tight { padding: 40px 0; }
}

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55em;
    padding: 0.95em 1.6em;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.005em;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s, color 0.2s;
    will-change: transform;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--ink); color: var(--paper); box-shadow: 0 1px 2px rgba(11,18,32,0.2); }
.btn-primary:hover { background: var(--ink-soft); box-shadow: 0 6px 18px rgba(11,18,32,0.25); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: color-mix(in srgb, var(--accent) 85%, black); }
.btn-ghost { color: var(--ink); border: 1px solid var(--line); background: transparent; }
.btn-ghost:hover { background: var(--paper-soft); }
.btn-lg { padding: 1.1em 1.9em; font-size: 1rem; }

/* ---- Utility bar (slim strip above the main nav) ---- */
.util-bar {
    background: var(--paper-soft);
    border-bottom: 1px solid var(--line);
    font-size: 0.78rem;
    line-height: 1;
}
.util-bar-inner {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    min-height: 32px;
    gap: 18px;
}
.util-bar-spacer { flex: 1; }
.util-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 22px;
}
.util-links a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-weight: 500;
    letter-spacing: 0.01em;
    padding: 8px 0;
    transition: color 0.15s;
}
.util-links a:hover { color: var(--ink); }
.util-ext-icon { opacity: 0.6; transition: transform 0.15s, opacity 0.15s; }
.util-links a:hover .util-ext-icon { opacity: 1; transform: translate(1px, -1px); }

.hiring-dot {
    display: inline-block;
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent);
    animation: hiring-dot-pulse 2.4s ease-out infinite;
}
@keyframes hiring-dot-pulse {
    0%   { box-shadow: 0 0 0 0   color-mix(in srgb, var(--accent) 50%, transparent); }
    70%  { box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent)  0%, transparent); }
    100% { box-shadow: 0 0 0 0   color-mix(in srgb, var(--accent)  0%, transparent); }
}
@media (prefers-reduced-motion: reduce) {
    .hiring-dot { animation: none; }
}

@media (max-width: 880px) {
    .util-bar { display: none; }   /* mobile users see these inside the menu */
}

/* Utility links shown inside the mobile menu only (hidden on desktop). */
.nav-mobile-utility { display: none; }
@media (max-width: 880px) {
    .nav-mobile-open .nav-mobile-utility {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        margin-top: 24px;
        padding-top: 20px;
        border-top: 1px solid var(--line);
        width: 100%;
    }
    .nav-mobile-open .nav-mobile-utility a {
        font-size: 1.1rem;
        color: var(--muted);
        display: inline-flex;
        align-items: center;
        gap: 8px;
    }
}

/* ---- Top nav ---- */
.nav {
    position: sticky;
    top: 0;
    z-index: 50;
    padding: 18px 0;
    background: color-mix(in srgb, var(--paper) 85%, transparent);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.25s, padding 0.25s;
}
.nav.scrolled { padding: 10px 0; border-bottom-color: var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.nav-brand { display: flex; align-items: center; gap: 14px; color: var(--ink); }
.nav-brand:hover { color: var(--ink); }
.nav-brand .brand-mark-img {
    height: 44px; width: 44px;
    filter: drop-shadow(0 1px 1px rgba(11,18,32,0.08));
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.nav-brand:hover .brand-mark-img { transform: rotate(22deg); }
.nav-brand .brand-mark { width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center; font-size: 1rem; font-weight: 600; }
.nav-brand .brand-wordmark { display: flex; flex-direction: column; gap: 0; line-height: 1.15; }
.nav-brand .brand-name {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--ink);
}
.nav-brand .brand-tagline {
    font-family: var(--font-display);
    font-size: 0.74rem;
    font-style: italic;
    font-weight: 400;
    color: var(--accent);
    letter-spacing: 0.01em;
}
.nav.scrolled .brand-tagline { display: none; }
.nav.scrolled .brand-mark-img { height: 34px; width: 34px; }
.nav.scrolled .brand-name { font-size: 0.98rem; }
@media (max-width: 540px) {
    .nav-brand .brand-tagline { display: none; }
    .nav-brand .brand-name { font-size: 0.95rem; }
    .nav-brand .brand-mark-img { height: 36px; width: 36px; }
}
.nav-right { display: flex; align-items: center; gap: 14px; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { font-size: 0.95rem; color: var(--ink); position: relative; padding: 4px 0; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: var(--ink); transform: scaleX(0); transform-origin: right; transition: transform 0.3s; }
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-cta { display: inline-flex; }
/* Segmented EN / ES language switch — active language is highlighted. */
.lang-switch { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--line); border-radius: 999px; padding: 3px 6px 3px 9px; }
.lang-switch-globe { font-size: 0.8rem; line-height: 1; margin-right: 3px; opacity: 0.65; }
.lang-opt { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.04em; color: var(--muted); padding: 2px 9px; border-radius: 999px; transition: color 0.15s, background 0.15s; }
.lang-opt:hover { color: var(--ink); }
.lang-opt.active { color: var(--paper); background: var(--ink); }
.lang-opt.active:hover { color: var(--paper); }

.portal-link {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 0.88rem; font-weight: 500;
    color: var(--ink);
    padding: 6px 2px;
    position: relative;
    transition: color 0.15s;
}
.portal-link svg { color: var(--accent); transition: transform 0.2s ease; }
.portal-link:hover svg { transform: translateX(2px); }
.portal-link::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: right; transition: transform 0.25s; }
.portal-link:hover::after { transform: scaleX(1); transform-origin: left; }
@media (max-width: 880px) { .portal-link { padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; } .portal-link::after { display: none; } }
.nav-toggle { display: none; width: 40px; height: 40px; border-radius: 50%; align-items: center; justify-content: center; color: var(--ink); }
.nav-toggle span { display: block; width: 20px; height: 1.5px; background: currentColor; position: relative; }
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
@media (max-width: 880px) {
    .nav-links { display: none; }
    .nav-toggle { display: inline-flex; }
    .nav-mobile-open .nav-links { display: flex; position: fixed; inset: 72px 0 0; flex-direction: column; background: var(--paper); padding: 40px 24px; gap: 18px; align-items: flex-start; font-size: 1.4rem; z-index: 40; overflow-y: auto; }
    .nav-right .lang-switch, .nav-right .nav-cta { display: none; }
    .nav-right { gap: 10px; }
    .nav-mobile-open .nav-right .lang-switch, .nav-mobile-open .nav-right .nav-cta { display: inline-flex; position: fixed; z-index: 41; }
    .nav-mobile-open .nav-right .lang-switch { top: 88px; right: 24px; }
    .nav-mobile-open .nav-right .nav-cta { left: 24px; right: 24px; bottom: 24px; justify-content: center; }
}
@media (max-width: 560px) {
    .nav-brand .brand-wordmark { gap: 0; }
    .nav { padding: 14px 0; }
    .portal-link span { display: none; }   /* just the icon on tiny screens */
}

/* ---- Hero ---- */
.hero {
    position: relative;
    min-height: clamp(560px, 85vh, 880px);
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    background: var(--ink);
    color: var(--paper);
}
@media (max-width: 640px) { .hero { min-height: 78vh; } }
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--ink) 30%, transparent) 0%, color-mix(in srgb, var(--ink) 10%, transparent) 40%, color-mix(in srgb, var(--ink) 85%, transparent) 100%);
    pointer-events: none;
}
.hero-video {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: var(--hero-focal, 50% 50%);
    opacity: var(--hero-video-opacity, 0.85);
}
/* Poster: rendered as a CSS background behind the video so we can swap to a
   portrait poster on mobile. Hidden once the video starts playing so the
   poster doesn't ghost through the semi-transparent video. JS adds
   .hero--ready once the video fires `playing`. */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: var(--hero-poster, none);
    background-size: cover;
    background-position: var(--hero-focal, 50% 50%);
    background-color: var(--ink);
    opacity: 1;
    transition: opacity 0.4s ease;
}
.hero--ready::before { opacity: 0; }
@media (max-width: 759px) {
    .hero::before {
        background-image: var(--hero-poster-mobile, var(--hero-poster, none));
        background-position: var(--hero-focal-mobile, 50% 50%);
    }
    .hero-video { object-position: var(--hero-focal-mobile, 50% 50%); }
}
.hero-inner { position: relative; z-index: 2; width: 100%; padding-bottom: clamp(60px, 10vw, 140px); }
.hero-eyebrow { color: var(--accent-soft, #D98B5D); font-family: var(--font-display); letter-spacing: 0.02em; font-style: italic; margin-bottom: 20px; font-size: clamp(0.95rem, 1.6vw, 1.3rem); }
.hero h1 { color: var(--paper); max-width: 20ch; margin-bottom: 0.35em; font-size: clamp(2.2rem, 6vw, 4.5rem); line-height: 1.05; }
.hero-sub { color: color-mix(in srgb, var(--paper) 85%, transparent); font-size: clamp(1rem, 1.4vw, 1.2rem); max-width: 52ch; margin-bottom: 2rem; line-height: 1.55; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; }
@media (max-width: 640px) {
    .hero-eyebrow { margin-bottom: 14px; }
    .hero-sub { margin-bottom: 1.5rem; }
    .hero-ctas .btn-lg { padding: 0.95em 1.4em; font-size: 0.92rem; }
    .hero-ctas .status-pill { display: none; }
}
.hero-ctas .btn-ghost { color: var(--paper); border-color: color-mix(in srgb, var(--paper) 40%, transparent); }
.hero-ctas .btn-ghost:hover { background: color-mix(in srgb, var(--paper) 10%, transparent); border-color: var(--paper); }

.hero-scroll-hint {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    color: color-mix(in srgb, var(--paper) 72%, transparent);
    font-size: 0.7rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    display: flex; flex-direction: column; align-items: center; gap: 12px;
    opacity: 0.85;
}
.hero-scroll-hint::after {
    content: "";
    width: 1px;
    height: 40px;
    background: currentColor;
    opacity: 0.5;
    animation: hero-scroll-pulse 2.6s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    transform-origin: top;
}
@keyframes hero-scroll-pulse {
    0%   { transform: scaleY(0); opacity: 0; }
    50%  { transform: scaleY(1); opacity: 0.8; }
    100% { transform: scaleY(0) translateY(40px); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .hero-scroll-hint::after { animation: none; opacity: 0.5; } }

/* ---- Trust bar ---- */
.trust-bar {
    background: var(--paper-soft);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 36px 0;
}
.trust-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 28px 40px;
    align-items: center;
}
.trust-item {
    position: relative;
    display: flex; flex-direction: column; gap: 6px;
    padding: 6px 4px;
    border-radius: var(--radius-md);
    transition: transform 0.2s ease;
}
.trust-item .value {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 3.4vw, 3rem);
    font-weight: 500;
    color: var(--ink);
    line-height: 1;
    letter-spacing: -0.02em;
}
.trust-item .label {
    font-size: 0.72rem;
    color: var(--muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 600;
}
/* Hover-capable items: subtle affordance + tooltip */
.trust-item.has-hover {
    cursor: help;
}
.trust-item.has-hover .value {
    background-image: linear-gradient(to right, color-mix(in srgb, var(--accent) 40%, transparent), color-mix(in srgb, var(--accent) 40%, transparent));
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 100% 2px;
    transition: background-size 0.25s ease;
}
.trust-item.has-hover:hover .value,
.trust-item.has-hover:focus-within .value {
    background-size: 100% 4px;
}
.trust-item.has-hover:hover,
.trust-item.has-hover:focus-within { transform: translateY(-1px); }
.trust-item.has-hover:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.trust-tip {
    position: absolute;
    left: 50%;
    top: calc(100% + 14px);
    transform: translate(-50%, -4px);
    min-width: 220px;
    max-width: 300px;
    padding: 12px 16px;
    background: var(--ink);
    color: var(--paper);
    border-radius: var(--radius-md);
    box-shadow: 0 14px 36px rgba(11,18,32,0.25);
    font-size: 0.88rem;
    line-height: 1.45;
    text-align: left;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0.18s;
    z-index: 5;
}
.trust-tip::before {
    content: "";
    position: absolute;
    left: 50%;
    top: -6px;
    width: 12px; height: 12px;
    background: var(--ink);
    transform: translateX(-50%) rotate(45deg);
    border-radius: 2px;
}
.trust-tip-label {
    display: block;
    font-size: 0.66rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-soft);
    margin-bottom: 4px;
    font-weight: 600;
}
.trust-tip-body { display: block; color: var(--paper); }
.trust-item.has-hover:hover .trust-tip,
.trust-item.has-hover:focus-within .trust-tip {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s;
}
/* Edge items: clamp tooltip inside the container so it doesn't cut off */
.trust-items > .trust-item:first-child .trust-tip { left: 0; transform: translate(0, -4px); }
.trust-items > .trust-item:first-child:hover .trust-tip,
.trust-items > .trust-item:first-child:focus-within .trust-tip { transform: translate(0, 0); }
.trust-items > .trust-item:first-child .trust-tip::before { left: 20%; }
.trust-items > .trust-item:last-child .trust-tip { left: auto; right: 0; transform: translate(0, -4px); }
.trust-items > .trust-item:last-child:hover .trust-tip,
.trust-items > .trust-item:last-child:focus-within .trust-tip { transform: translate(0, 0); }
.trust-items > .trust-item:last-child .trust-tip::before { left: auto; right: 20%; }

@media (max-width: 640px) {
    .trust-bar { padding: 32px 0; }
    .trust-items { gap: 28px 24px; grid-template-columns: 1fr 1fr; }
    .trust-item .value { font-size: 1.9rem; }
    .trust-tip { min-width: 160px; max-width: 80vw; }
}
@media (max-width: 380px) { .trust-items { grid-template-columns: 1fr; } }

/* ---- About (editorial two-column) ---- */
.about-grid { display: grid; grid-template-columns: 1fr 1.35fr; gap: clamp(40px, 7vw, 100px); align-items: start; }
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; gap: 24px; } }
.about-body p { font-size: 1.08rem; line-height: 1.8; color: color-mix(in srgb, var(--ink) 85%, transparent); }
.about-body p + p { margin-top: 1.2em; }

/* ---- Practice areas teaser grid ----
   Default to 3 columns on desktop (2 rows of 3 = 6 items, clean). Adapts
   to the data-count attribute so 4 items → 2 cols, 7 items → last item
   spans the full row, etc. No orphan cells.                                */
.practice-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; border: 1px solid var(--line); background: var(--line); border-radius: var(--radius-lg); overflow: hidden; }

/* Explicit per-count layouts so 4 items look like a clean 2x2, 7 items
   fill their last row, etc. */
.practice-grid[data-count="1"] { grid-template-columns: 1fr; }
.practice-grid[data-count="2"] { grid-template-columns: repeat(2, 1fr); }
.practice-grid[data-count="4"] { grid-template-columns: repeat(2, 1fr); }
.practice-grid[data-count="8"] { grid-template-columns: repeat(4, 1fr); }

/* For counts where the last row would have one orphan (3-col grid),
   make the orphan span the full remaining row. */
.practice-grid[data-count="7"] > .practice-card:last-child,
.practice-grid[data-count="10"] > .practice-card:last-child,
.practice-grid[data-count="13"] > .practice-card:last-child {
    grid-column: 1 / -1;
}
/* For counts where last row has 2 orphans in 3-col grid, let each span 1.5
   by making the last TWO span the row. */
.practice-grid[data-count="5"]  > .practice-card:nth-last-child(-n+2),
.practice-grid[data-count="11"] > .practice-card:nth-last-child(-n+2),
.practice-grid[data-count="14"] > .practice-card:nth-last-child(-n+2) {
    grid-column: span 1;            /* keep default — they already fill 2 cols of a 3-col row which looks centered with left alignment */
}

@media (max-width: 900px) { .practice-grid, .practice-grid[data-count] { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .practice-grid, .practice-grid[data-count] { grid-template-columns: 1fr; } .practice-grid[data-count] > .practice-card:last-child { grid-column: auto; } }
.practice-card {
    background: var(--paper);
    padding: clamp(28px, 3vw, 36px);
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 24px;
    transition: background 0.25s ease, transform 0.25s;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}
/* Faint hero-image backdrop — adds warmth without hurting legibility. */
.practice-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--pa-bg-image, none);
    background-size: cover;
    background-position: center;
    opacity: 0.14;
    transition: opacity 0.3s ease;
    filter: saturate(0.85);
    pointer-events: none;
    z-index: 0;
}
/* Soft top-left gradient wash so headings stay crisp even on busy photos. */
.practice-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--paper) 72%, transparent) 0%,
        color-mix(in srgb, var(--paper) 20%, transparent) 55%,
        transparent 100%);
    pointer-events: none;
    z-index: 0;
    opacity: var(--pa-bg-wash, 0);
    transition: opacity 0.3s ease;
}
.practice-card[style*="--pa-bg-image"]::after { --pa-bg-wash: 1; }
/* Ensure the content sits above the backdrop layers. */
.practice-card > * { position: relative; z-index: 1; }
@media (max-width: 640px) { .practice-card { min-height: 160px; padding: 26px; } }
.practice-card:hover { background: var(--paper-soft); }
.practice-card:hover::before { opacity: 0.22; }
.practice-card h3 { margin: 0 0 0.35em; font-size: 1.4rem; }
.practice-card p { margin: 0; color: var(--muted); font-size: 0.95rem; line-height: 1.55; }
.practice-card .arrow { display: inline-flex; align-items: center; gap: 8px; font-size: 0.85rem; font-weight: 600; color: var(--accent); letter-spacing: 0.04em; text-transform: uppercase; }
.practice-card .arrow::after { content: "→"; transition: transform 0.2s; }
.practice-card:hover .arrow::after { transform: translateX(4px); }

/* ---- Careers cards ---- */
.careers-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
@media (max-width: 720px) { .careers-grid { grid-template-columns: 1fr; gap: 16px; } }
.career-card {
    display: block;
    padding: 28px 32px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--paper);
    color: var(--ink);
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    box-shadow: 0 1px 0 rgba(0,0,0,0.02);
    position: relative;
    overflow: hidden;
    isolation: isolate;
}
/* Faint hero-image backdrop — same pattern as practice-card. */
.career-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--career-bg-image, none);
    background-size: cover;
    background-position: center;
    opacity: 0.14;
    transition: opacity 0.3s ease;
    filter: saturate(0.85);
    pointer-events: none;
    z-index: 0;
}
/* Soft top-left gradient wash so headings stay crisp on busy photos. */
.career-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--paper) 72%, transparent) 0%,
        color-mix(in srgb, var(--paper) 20%, transparent) 55%,
        transparent 100%);
    pointer-events: none;
    z-index: 0;
    opacity: var(--career-bg-wash, 0);
    transition: opacity 0.3s ease;
}
.career-card[style*="--career-bg-image"]::after { --career-bg-wash: 1; }
.career-card > * { position: relative; z-index: 1; }
.career-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.career-card:hover::before { opacity: 0.22; }
.career-card-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.career-card-meta > span { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; }
.career-loc      { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
.career-type     { background: var(--paper-soft); color: var(--muted); border: 1px solid var(--line); }
.career-featured { background: var(--accent); color: var(--paper); }
.career-card h3 { margin: 0 0 0.4em; font-size: 1.4rem; font-family: var(--font-display); }
.career-card p { margin: 0 0 18px; color: var(--muted); font-size: 0.98rem; line-height: 1.55; }
.career-card .arrow { display: inline-flex; align-items: center; gap: 8px; font-size: 0.85rem; font-weight: 600; color: var(--accent); letter-spacing: 0.04em; text-transform: uppercase; }
.career-card .arrow::after { content: "→"; transition: transform 0.2s; }
.career-card:hover .arrow::after { transform: translateX(4px); }

.career-meta-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 16px; }
.career-meta-row > span { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; padding: 5px 12px; border-radius: 999px; }
.career-meta-row .career-loc  { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
.career-meta-row .career-type { background: var(--paper-soft); color: var(--muted); border: 1px solid var(--line); }
.career-cta-row { margin-top: 24px; }
.career-apply-band { margin-top: 56px; padding: 32px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--paper-soft); text-align: center; }
.career-apply-band h3 { margin: 0 0 0.4em; font-family: var(--font-display); }
.career-apply-band p { color: var(--muted); margin: 0 auto 20px; max-width: 56ch; }
.career-apply-band .muted-small { font-size: 0.85rem; margin-top: 18px; }
.career-apply-band .muted-small a { color: var(--muted); }

/* Career detail hero — image variant (mirrors .pa-hero-image) */
.career-hero-image {
    background-size: cover;
    background-position: center;
    color: var(--paper);
    border-bottom: 0;
    padding-top: clamp(120px, 13vw, 180px);
    padding-bottom: clamp(80px, 10vw, 140px);
}
.career-hero-image .breadcrumbs { color: color-mix(in srgb, var(--paper) 70%, transparent); }
.career-hero-image .breadcrumbs a { color: color-mix(in srgb, var(--paper) 85%, transparent); }
.career-hero-image .breadcrumbs a:hover { color: var(--paper); }
.career-hero-image .breadcrumbs span::before { color: color-mix(in srgb, var(--paper) 40%, transparent); }
.career-hero-image h1 { color: var(--paper); }
.career-hero-image .lede { color: color-mix(in srgb, var(--paper) 88%, transparent); }
.career-hero-image .career-loc  { background: color-mix(in srgb, var(--paper) 18%, transparent); color: var(--paper); }
.career-hero-image .career-type { background: transparent; color: color-mix(in srgb, var(--paper) 90%, transparent); border-color: color-mix(in srgb, var(--paper) 35%, transparent); }

/* ---- Testimonials carousel ---- */
.testimonials-scroll {
    display: flex; gap: 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 8px 4px 24px;
    margin: 0 -24px;
    scrollbar-width: none;
}
.testimonials-scroll::-webkit-scrollbar { display: none; }
.testimonial {
    flex: 0 0 min(460px, 88vw);
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 28px;
    scroll-snap-align: start;
    box-shadow: var(--shadow-soft);
}
@media (max-width: 640px) { .testimonial { padding: 24px; } .testimonials-scroll { gap: 16px; padding-left: 20px !important; padding-right: 20px !important; } }
.testimonial blockquote { font-family: var(--font-display); font-size: 1.15rem; line-height: 1.55; margin: 0 0 18px; color: var(--ink); }
.testimonial cite { font-style: normal; font-size: 0.9rem; color: var(--muted); display: block; }

/* ---- FAQ accordion ---- */
.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); padding: 24px 0; }
.faq-item summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 20px; align-items: center; font-family: var(--font-display); font-size: 1.2rem; color: var(--ink); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.4rem; color: var(--accent); transition: transform 0.2s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .answer { padding-top: 16px; color: var(--muted); font-size: 1rem; line-height: 1.65; }
.faq-item .answer a { color: var(--link); }

/* ---- CTA band ---- */
.cta-band { background: var(--ink); color: var(--paper); padding: clamp(72px, 8vw, 120px) 0; text-align: center; }
@media (max-width: 640px) { .cta-band { padding: 56px 0; } .cta-band .btn-lg { padding: 1em 1.5em; } }
.cta-band h2 { color: var(--paper); margin-bottom: 0.3em; }
.cta-band p { color: color-mix(in srgb, var(--paper) 75%, transparent); font-size: 1.1rem; max-width: 56ch; margin: 0 auto 2rem; }
.cta-band .btn-accent { background: var(--accent); }

/* ---- Footer ---- */
.footer { background: var(--ink); color: color-mix(in srgb, var(--paper) 85%, transparent); padding: clamp(56px, 8vw, 80px) 0 32px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr repeat(4, 1fr); gap: clamp(40px, 5vw, 60px); margin-bottom: 48px; }
@media (max-width: 960px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; } .footer-brand { grid-column: span 2; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; gap: 32px; } .footer-brand { grid-column: span 1; } }
.footer h4 { color: var(--paper); font-family: var(--font-body); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; margin: 0 0 20px; font-weight: 600; }
.footer-links { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.footer-links a { font-size: 0.92rem; color: color-mix(in srgb, var(--paper) 75%, transparent); transition: color 0.15s; }
.footer-links a:hover { color: var(--paper); }
.footer-brand p { color: color-mix(in srgb, var(--paper) 65%, transparent); font-size: 0.92rem; line-height: 1.6; margin-top: 16px; max-width: 34ch; }
.footer-meta { display: flex; justify-content: space-between; align-items: center; padding-top: 32px; border-top: 1px solid color-mix(in srgb, var(--paper) 15%, transparent); font-size: 0.82rem; color: color-mix(in srgb, var(--paper) 55%, transparent); flex-wrap: wrap; gap: 16px; }
.footer-meta a:hover { color: var(--paper); }
.footer-meta-links { display: flex; gap: 24px; flex-wrap: wrap; align-items: center; }
.footer-staff-link,
.footer-admin-link {
    opacity: 0.5;
    font-size: 0.74rem;
    letter-spacing: 0.04em;
    padding-left: 16px;
    border-left: 1px solid color-mix(in srgb, var(--paper) 15%, transparent);
}
.footer-staff-link:hover,
.footer-admin-link:hover { opacity: 1; }
.footer-socials { display: flex; gap: 14px; margin-top: 24px; }
.footer-socials a {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--paper) 10%, transparent);
    color: color-mix(in srgb, var(--paper) 80%, transparent);
    display: grid; place-items: center;
    transition: background 0.15s, color 0.15s, transform 0.15s;
}
.footer-socials a:hover { background: var(--accent); color: #fff; transform: translateY(-2px); }

/* ---- Page header (non-home pages) ---- */
.page-header { padding: clamp(72px, 9vw, 120px) 0 clamp(48px, 6vw, 80px); border-bottom: 1px solid var(--line); }
@media (max-width: 640px) { .page-header { padding: 64px 0 40px; } .page-header h1 { font-size: clamp(2rem, 7vw, 2.75rem); } }

/* Practice area hero — image variant */
.pa-hero { padding: clamp(72px, 9vw, 120px) 0 clamp(48px, 6vw, 80px); border-bottom: 1px solid var(--line); }
.pa-hero-image {
    background-size: cover;
    background-position: center;
    color: var(--paper);
    border-bottom: 0;
    padding-top: clamp(120px, 13vw, 180px);
    padding-bottom: clamp(80px, 10vw, 140px);
}
.pa-hero-image .breadcrumbs { color: color-mix(in srgb, var(--paper) 70%, transparent); }
.pa-hero-image .breadcrumbs a { color: color-mix(in srgb, var(--paper) 85%, transparent); }
.pa-hero-image .breadcrumbs a:hover { color: var(--paper); }
.pa-hero-image .breadcrumbs span::before { color: color-mix(in srgb, var(--paper) 40%, transparent); }
.pa-hero-image h1 { color: var(--paper); }
.pa-hero-image .lede { color: color-mix(in srgb, var(--paper) 88%, transparent); }
.page-header h1 { margin-bottom: 0.3em; }
.page-header .lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--muted); max-width: 60ch; }
.breadcrumbs { display: flex; gap: 10px; font-size: 0.85rem; color: var(--muted); margin-bottom: 24px; }
.breadcrumbs a:hover { color: var(--ink); }
.breadcrumbs span::before { content: "/"; margin-right: 10px; color: var(--line); }

/* ---- Reveal animation ---- */
[data-reveal] {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }
[data-reveal][data-reveal-delay="1"].is-visible { transition-delay: 0.1s; }
[data-reveal][data-reveal-delay="2"].is-visible { transition-delay: 0.2s; }
[data-reveal][data-reveal-delay="3"].is-visible { transition-delay: 0.3s; }
[data-reveal][data-reveal-delay="4"].is-visible { transition-delay: 0.4s; }

@media (prefers-reduced-motion: reduce) {
    [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ---- Forms ---- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
.field label { font-size: 0.85rem; font-weight: 600; color: var(--ink); }
.field .help { font-size: 0.8rem; color: var(--muted); }
.field input, .field select, .field textarea {
    width: 100%;
    font: inherit;
    font-size: 1rem;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--paper);
    color: var(--ink);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }

/* ---- Status pill ---- */
.status-pill { display: inline-flex; align-items: center; gap: 8px; font-size: 0.8rem; letter-spacing: 0.04em; }
.status-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 25%, transparent); }
.status-pill.busy::before { background: var(--warning); box-shadow: 0 0 0 4px color-mix(in srgb, var(--warning) 25%, transparent); }
.status-pill.closed::before { background: var(--muted); box-shadow: none; }

/* ---- Process (How we work) ---- */
.process-header { max-width: 600px; margin-bottom: 64px; }
.process-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
@media (max-width: 820px) { .process-grid { grid-template-columns: 1fr; } }
.process-step {
    background: var(--paper);
    padding: clamp(28px, 4vw, 56px);
    min-height: 220px;
    display: flex; flex-direction: column; gap: 14px;
    position: relative;
    transition: background 0.25s;
}
@media (max-width: 820px) { .process-step { min-height: 0; padding: 32px 28px; } .process-number { font-size: 2.4rem; } }
.process-header { padding-bottom: 0; }
.process-step:hover { background: var(--paper-soft); }
.process-number {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 300;
    color: var(--accent);
    letter-spacing: -0.02em;
    line-height: 1;
    margin-bottom: 4px;
}
.process-step h3 { font-size: 1.3rem; margin: 0 0 6px; }
.process-step p { color: var(--muted); margin: 0; line-height: 1.65; }

/* ---- Why us ---- */
.why-layout { display: grid; grid-template-columns: 1fr 1.3fr; gap: clamp(40px, 7vw, 100px); align-items: start; }
@media (max-width: 860px) { .why-layout { grid-template-columns: 1fr; gap: 28px; } }
.why-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px 40px; }
@media (max-width: 700px) { .why-grid { grid-template-columns: 1fr; } }
.why-item { display: flex; gap: 14px; align-items: flex-start; }
.why-check { flex-shrink: 0; color: var(--accent); margin-top: 2px; }
.why-item h4 { font-family: var(--font-display); font-size: 1.1rem; font-weight: 500; margin: 0 0 6px; }
.why-item p { color: var(--muted); margin: 0; font-size: 0.97rem; line-height: 1.6; }

/* ---- Headshot frames (consistent shape regardless of source) ---- */
.headshot-frame {
    aspect-ratio: 4 / 5;
    background: linear-gradient(165deg, var(--paper-soft) 0%, var(--line) 100%);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: grid;
    place-items: center;
    margin-bottom: 20px;
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s;
    position: relative;
}
.headshot-frame img {
    width: 100%; height: 100%;
    object-fit: cover;
    /* Portraits: shift crop upward so faces stay in-frame even on wide landscape originals */
    object-position: 50% 22%;
    display: block;
    transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
a:hover > .headshot-frame,
a:hover > .headshot-frame img { /* whole-card hover */ }
a:hover .headshot-frame {
    box-shadow: 0 12px 30px rgba(11, 18, 32, 0.12);
    transform: translateY(-3px);
}
a:hover .headshot-frame img { transform: scale(1.035); }
.headshot-frame-lg { margin-bottom: 24px; }
.headshot-monogram {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 4.5rem);
    font-weight: 400;
    color: color-mix(in srgb, var(--ink) 25%, transparent);
    background: linear-gradient(135deg, var(--paper) 0%, var(--paper-soft) 100%);
    width: 100%; height: 100%;
    display: grid; place-items: center;
}
.headshot-monogram-lg { font-size: clamp(4rem, 10vw, 6rem); }

/* ---- USCIS processing-time ticker ---- */
.uscis-ticker { background: var(--paper-soft); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(24px, 3vw, 40px); margin: 48px 0; }
.uscis-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.uscis-stamp { font-size: 0.82rem; color: var(--muted); }
.uscis-stamp a { color: var(--link); text-decoration: underline; }
.uscis-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.uscis-card {
    background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-md);
    padding: 20px; display: flex; flex-direction: column; gap: 8px;
}
.uscis-card-form { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.08em; color: var(--accent); font-weight: 600; }
.uscis-card-name { font-family: var(--font-display); font-size: 1rem; line-height: 1.3; color: var(--ink); }
.uscis-card-range { font-family: var(--font-display); font-size: 1.35rem; font-weight: 500; color: var(--ink); margin-top: 4px; }
.uscis-bar { height: 6px; background: color-mix(in srgb, var(--ink) 8%, var(--paper)); border-radius: 999px; overflow: hidden; margin-top: 8px; }
.uscis-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-soft)); border-radius: 999px; transition: width 1s cubic-bezier(0.2, 0.8, 0.2, 1); }
.uscis-bar-labels { display: flex; justify-content: space-between; font-size: 0.68rem; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }
.uscis-disclaimer { font-size: 0.78rem; color: var(--muted); margin: 20px 0 0; max-width: 72ch; }

/* ---- AI chat widget ---- */
[hidden] { display: none !important; }  /* ID selectors can otherwise override the hidden attribute */
#oi-chat { position: fixed; right: 20px; bottom: 20px; z-index: 100; font-family: var(--font-body); }
#oi-chat-toggle {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 18px; border-radius: 999px;
    background: var(--ink); color: var(--paper);
    font-weight: 600; font-size: 0.9rem; letter-spacing: 0.01em;
    box-shadow: 0 6px 20px rgba(11,18,32,0.25), 0 1px 2px rgba(11,18,32,0.2);
    cursor: pointer; transition: transform 0.15s, background 0.15s;
}
#oi-chat-toggle:hover { transform: translateY(-1px); background: var(--ink-soft); }
#oi-chat-toggle svg { color: var(--accent-soft); }
#oi-chat-panel {
    position: fixed; right: 20px; bottom: 84px;
    width: min(380px, calc(100vw - 40px));
    height: min(560px, calc(100vh - 120px));
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(11,18,32,0.25), 0 2px 6px rgba(11,18,32,0.1);
    display: flex; flex-direction: column; overflow: hidden;
}
#oi-chat-panel header {
    display: flex; justify-content: space-between; align-items: flex-start;
    padding: 16px 18px; background: var(--ink); color: var(--paper);
}
#oi-chat-panel header strong { font-family: var(--font-display); font-size: 1.05rem; font-weight: 500; }
#oi-chat-panel header .subtitle { font-size: 0.78rem; color: color-mix(in srgb, var(--paper) 70%, transparent); margin-top: 2px; }
#oi-chat-close {
    width: 28px; height: 28px; border-radius: 50%; color: var(--paper);
    background: color-mix(in srgb, var(--paper) 15%, transparent);
    font-size: 1.3rem; line-height: 1; display: grid; place-items: center;
}
#oi-chat-close:hover { background: color-mix(in srgb, var(--paper) 25%, transparent); }
#oi-chat-thread {
    flex: 1; overflow-y: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px;
    background: var(--paper-soft);
}
.oi-msg {
    max-width: 85%;
    padding: 10px 14px; border-radius: var(--radius-md);
    font-size: 0.92rem; line-height: 1.5; word-wrap: break-word;
}
.oi-msg-bot { background: var(--paper); border: 1px solid var(--line); color: var(--ink); align-self: flex-start; border-bottom-left-radius: 4px; }
.oi-msg-user { background: var(--ink); color: var(--paper); align-self: flex-end; border-bottom-right-radius: 4px; }
.oi-msg a { color: var(--link); text-decoration: underline; }
.oi-msg-user a { color: var(--accent-soft); }

.oi-typing { display: inline-flex; gap: 4px; }
.oi-typing i {
    width: 6px; height: 6px; background: var(--muted); border-radius: 50%;
    display: inline-block; animation: oi-typing 1.1s infinite ease-in-out;
}
.oi-typing i:nth-child(2) { animation-delay: 0.15s; }
.oi-typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes oi-typing { 0%, 80%, 100% { transform: scale(0.7); opacity: 0.4; } 40% { transform: scale(1); opacity: 1; } }

#oi-chat-form { display: flex; gap: 8px; align-items: flex-end; padding: 12px 14px; border-top: 1px solid var(--line); background: var(--paper); }
#oi-chat-input {
    flex: 1; resize: none; border: 1px solid var(--line); border-radius: var(--radius-md);
    padding: 10px 12px; font: inherit; font-size: 0.9rem; background: var(--paper); color: var(--ink);
    min-height: 40px; max-height: 140px;
}
#oi-chat-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
#oi-chat-form button[type=submit] {
    width: 40px; height: 40px; border-radius: var(--radius-md);
    background: var(--ink); color: var(--paper);
    display: grid; place-items: center; flex-shrink: 0;
}
#oi-chat-form button[type=submit]:hover { background: var(--ink-soft); }
.oi-chat-footer { padding: 6px 14px 10px; font-size: 0.72rem; color: var(--muted); text-align: center; background: var(--paper); border-top: 1px solid transparent; }
@media (max-width: 520px) {
    #oi-chat-panel { right: 12px; left: 12px; bottom: 76px; width: auto; }
    #oi-chat { right: 12px; bottom: 12px; }
}

/* ---- Utility helpers ---- */
.stack-sm > * + * { margin-top: 0.5rem; }
.stack > * + * { margin-top: 1rem; }
.stack-lg > * + * { margin-top: 2rem; }
.text-muted { color: var(--muted); }
.text-accent { color: var(--accent); }
.text-center { text-align: center; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
@media (max-width: 720px) { .grid-2 { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------------------
   Document Checklists — client-facing example-document pages
   Mirrors .faq-item; mobile-first with large tap targets.
   --------------------------------------------------------------------------- */

/* Admin-only edit affordance (shown to logged-in staff on public pages). */
.admin-edit-pill {
    display: inline-flex; align-items: center; gap: 6px;
    margin-top: 20px;
    padding: 7px 14px;
    border: 1px dashed var(--accent); border-radius: 999px;
    background: color-mix(in srgb, var(--accent) 8%, transparent);
    color: var(--accent); font-size: 0.85rem; font-weight: 600;
    text-decoration: none; transition: background 0.15s;
}
.admin-edit-pill:hover { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.admin-edit-pill-sm { margin: 0 0 14px; padding: 4px 11px; font-size: 0.78rem; }

/* Index of checklists (/checklists) */
.checklist-index { display: grid; gap: 14px; }
.checklist-index-card {
    display: flex; align-items: center; gap: 16px;
    padding: 18px 20px;
    border: 1px solid var(--line); border-radius: var(--radius-lg);
    background: var(--paper-soft);
    text-decoration: none; color: var(--ink);
    transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.checklist-index-card:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: var(--shadow-soft); }
.checklist-index-icon { font-size: 1.6rem; line-height: 1; }
.checklist-index-text { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.checklist-index-text strong { font-family: var(--font-display); font-size: 1.15rem; }
.checklist-index-text small { color: var(--muted); font-size: 0.85rem; }
.checklist-index-arrow { color: var(--accent); font-size: 1.3rem; }

/* List of document cards on a checklist page */
.checklist-list { border-top: 1px solid var(--line); }
.checklist-card { border-bottom: 1px solid var(--line); padding: 20px 0; }
.checklist-card summary {
    list-style: none; cursor: pointer;
    display: flex; justify-content: space-between; gap: 16px; align-items: center;
    font-family: var(--font-display); font-size: 1.2rem; color: var(--ink);
}
.checklist-card summary::-webkit-details-marker { display: none; }
.checklist-card summary::after { content: "+"; font-size: 1.5rem; color: var(--accent); transition: transform 0.2s; flex: 0 0 auto; }
.checklist-card[open] summary::after { transform: rotate(45deg); }
.checklist-name { flex: 1; }
.checklist-count { font-family: var(--font-body); font-size: 0.78rem; color: var(--muted); white-space: nowrap; }
.checklist-body { padding-top: 16px; }
.checklist-desc { color: var(--muted); font-size: 1rem; line-height: 1.65; margin-bottom: 16px; }
.checklist-desc a { color: var(--link); }
.checklist-noex { color: var(--muted); font-style: italic; font-size: 0.92rem; }

/* Example files grid (images + PDF tiles) */
.example-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.example-tile {
    display: block; text-decoration: none; color: var(--ink);
    border: 1px solid var(--line); border-radius: var(--radius-md);
    overflow: hidden; background: var(--paper-soft);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.example-tile:hover { border-color: var(--accent); box-shadow: var(--shadow-soft); }
.example-image img { display: block; width: 100%; height: 180px; object-fit: cover; background: #fff; }
.example-pdf { display: flex; align-items: center; gap: 12px; padding: 18px 16px; min-height: 80px; }
.example-pdf-icon { font-size: 2rem; line-height: 1; }
.example-pdf-text { display: flex; flex-direction: column; gap: 4px; }
.example-pdf-text strong { color: var(--link); font-size: 0.95rem; }
.example-caption { display: block; padding: 8px 10px; font-size: 0.82rem; color: var(--muted); line-height: 1.4; }
.example-pdf .example-caption { padding: 0; }

@media (max-width: 640px) {
    .checklist-card summary { font-size: 1.1rem; }
    .example-grid { grid-template-columns: 1fr 1fr; }
    .example-image img { height: 140px; }
}

/* ---------------------------------------------------------------------------
   Document cards: viewed badge + tap-to-open modal viewer
   --------------------------------------------------------------------------- */
.view-status { display:inline-flex; align-items:center; justify-content:center; min-width:1.3em; margin-right:10px; color: var(--accent); font-size:0.85rem; flex:0 0 auto; line-height:1; }
.view-status.seen { font-size:1.25rem; color: var(--success); }

body.doc-modal-open { overflow: hidden; }
.doc-modal[hidden] { display: none; }
.doc-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 24px; }
.doc-modal-backdrop { position: absolute; inset: 0; background: rgba(11,18,32,0.62); animation: docfade .15s ease; }
@keyframes docfade { from { opacity: 0; } to { opacity: 1; } }
.doc-modal-panel { position: relative; z-index: 1; background: var(--paper); border-radius: var(--radius-lg); width: min(880px, 100%); max-height: 92vh; display: flex; flex-direction: column; box-shadow: 0 24px 64px rgba(0,0,0,0.42); animation: docpop .18s ease; }
@keyframes docpop { from { transform: translateY(10px) scale(.98); opacity: .5; } to { transform: none; opacity: 1; } }
.doc-modal-title { margin: 0; padding: 18px 60px 14px 22px; font-family: var(--font-display); font-size: 1.25rem; border-bottom: 1px solid var(--line); }
.doc-modal-close { position: absolute; top: 10px; right: 12px; width: 40px; height: 40px; border: none; background: var(--paper-soft); border-radius: 999px; font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--ink); }
.doc-modal-close:hover { background: var(--line); }
/* Horizontal carousel: each upload is a full-width slide you swipe left↔right.
   A tall image or multi-page PDF scrolls top↕bottom within its own slide. */
.doc-modal-track { flex: 1 1 auto; display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.doc-modal-track::-webkit-scrollbar { display: none; }
.doc-modal-item { flex: 0 0 100%; scroll-snap-align: center; overflow-y: auto; -webkit-overflow-scrolling: touch; margin: 0; padding: 18px 22px 24px; display: flex; flex-direction: column; }
.doc-modal-item img { display: block; width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--line); background: #fff; }
.doc-modal-pdf { width: 100%; flex: 1 1 auto; min-height: 65vh; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.doc-modal-openlink { display: inline-block; margin-top: 8px; color: var(--link); font-weight: 600; text-decoration: none; }
.doc-modal-openlink:hover { text-decoration: underline; }
.doc-modal-item figcaption { margin-top: 8px; color: var(--muted); font-size: 0.92rem; line-height: 1.5; }
.doc-modal-nav { display: flex; align-items: center; justify-content: center; gap: 18px; padding: 12px; border-top: 1px solid var(--line); flex: 0 0 auto; }
.doc-modal-nav[hidden] { display: none; }
.doc-modal-prev, .doc-modal-next { width: 42px; height: 42px; border-radius: 999px; background: var(--paper-soft); font-size: 1.5rem; line-height: 1; color: var(--ink); }
.doc-modal-prev:hover, .doc-modal-next:hover { background: var(--line); }
.doc-modal-counter { font-size: 0.9rem; color: var(--muted); min-width: 52px; text-align: center; }
@media (max-width: 640px) {
    .doc-modal { padding: 0; }
    .doc-modal-panel { width: 100%; height: 100%; max-height: 100%; border-radius: 0; }
    .doc-modal-pdf { min-height: 55vh; }
}

/* Important-document red circle on the client list page */
.important-dot { display:inline-block; width:11px; height:11px; border-radius:50%; background: var(--danger); margin-right:9px; flex:0 0 auto; box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 16%, transparent); }

/* Action buttons on instruction-type documents (client pages) */
.doc-actions { display:flex; flex-direction:column; gap:10px; margin-bottom:16px; }
.doc-action-btn {
    display:inline-flex; align-items:center; justify-content:space-between; gap:10px;
    padding:14px 18px; border:1px solid var(--accent); border-radius:var(--radius-md);
    background: color-mix(in srgb, var(--accent) 8%, transparent);
    color: var(--accent); font-weight:600; font-size:1rem; text-decoration:none;
    transition: background 0.15s;
}
.doc-action-btn:hover { background: color-mix(in srgb, var(--accent) 16%, transparent); }
@media (min-width: 560px) { .doc-actions { flex-direction:row; flex-wrap:wrap; } .doc-action-btn { justify-content:center; } }

/* Client upload card on the document link page */
.upload-card { margin-top: 40px; padding: 28px; border: 2px dashed var(--line); border-radius: var(--radius-lg); background: var(--paper-soft); text-align: center; }
.upload-card h2 { margin: 0 0 8px; }
.upload-card p { color: var(--muted); max-width: 52ch; margin: 0 auto 18px; }
.upload-card .btn { margin: 4px; }
.upload-list { display: flex; flex-direction: column; gap: 6px; max-width: 460px; margin: 14px auto; }
.upload-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 12px; font-size: 0.9rem; text-align: left; word-break: break-all; }
.upload-status { margin-top: 12px; font-weight: 600; }
.upload-status.ok { color: var(--success); }
.upload-status.err { color: var(--danger); }
.upload-note { font-size: 0.82rem !important; margin-top: 10px !important; }

/* Staff panel on the client document page */
.staff-panel { border: 1px solid var(--accent); border-radius: var(--radius-md); background: color-mix(in srgb, var(--accent) 6%, transparent); margin-bottom: 28px; padding: 4px 14px; }
.staff-panel summary { cursor: pointer; font-weight: 600; color: var(--accent); padding: 8px 0; }
.staff-panel-body { padding: 4px 0 12px; }
.staff-uploads { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.staff-uploads th { text-align: left; color: var(--muted); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.staff-uploads td { padding: 6px 8px; border-bottom: 1px solid var(--line); }
.staff-uploads a { color: var(--link); font-weight: 600; }

/* ============================================================
   Inline admin visibility toggles (only rendered for admins).
   .oi-item wraps a toggleable thing; .oi-off = hidden-from-public
   state, shown to the admin grayed + badged so it's unmistakable.
   ============================================================ */
.oi-item { position: relative; }
.oi-toggle-wrap { position: absolute; top: 8px; right: 8px; z-index: 6; }
.oi-toggle {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 10px; border-radius: 999px;
    font: 600 0.66rem/1 var(--font-body), system-ui, sans-serif;
    letter-spacing: 0.08em; text-transform: uppercase;
    background: #12331f; color: #7ee2a8;
    border: 1px solid #1f5c39;
    box-shadow: 0 2px 8px rgba(11,18,32,0.28);
    cursor: pointer; user-select: none;
    transition: background 0.15s, color 0.15s, transform 0.1s;
}
.oi-toggle:hover { transform: translateY(-1px); }
.oi-toggle .oi-toggle-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }
.oi-toggle.is-off { background: #3a1414; color: #ffb0a3; border-color: #7a2a20; }

/* Hidden-from-public: grayed, desaturated, dashed outline + corner ribbon. */
.oi-off > :not(.oi-toggle-wrap) { filter: grayscale(1) opacity(0.42); transition: filter 0.2s; }
.oi-off { outline: 2px dashed #c8503c; outline-offset: 3px; border-radius: 6px; }
.oi-off::after {
    content: "HIDDEN"; position: absolute; top: 8px; left: 8px; z-index: 6;
    background: #c8503c; color: #fff; font: 700 0.6rem/1 var(--font-body), system-ui, sans-serif;
    letter-spacing: 0.1em; padding: 4px 8px; border-radius: 4px; pointer-events: none;
}

/* ---- Team bio page ---- */
.bio-layout { display: grid; grid-template-columns: 1fr 1.4fr; gap: 80px; align-items: start; }
@media (max-width: 860px) {
    .bio-layout { grid-template-columns: 1fr; gap: 32px; }
    .bio-layout .headshot-frame-lg { max-width: 260px; }
}
