:root {
  --ink: #17212b;
  --navy: #102c3c;
  --navy-2: #173e50;
  --paper: #f5f1e8;
  --paper-2: #ebe4d8;
  --white: #fffefa;
  --teal: #147a70;
  --teal-soft: #dcefea;
  --gold: #bd8731;
  --gold-soft: #f3e7cd;
  --red: #a33c37;
  --red-soft: #f7e2df;
  --green: #266b48;
  --green-soft: #dfeee5;
  --muted: #5f6b73;
  --line: #d8d0c3;
  --shadow: 0 24px 70px rgba(16, 44, 60, .12);
  --radius: 18px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 16px/1.55 Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #0b6a62; outline-offset: 3px; }
.portal-topbar button:focus-visible, .portal-topbar a:focus-visible, .dark-block a:focus-visible, .review-block button:focus-visible, .review-block input:focus-visible, .review-block select:focus-visible, .review-block textarea:focus-visible { outline-color: #f3cf7a; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; margin: -1px; padding: 0; border: 0; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

.skip-link { position: fixed; z-index: 200; top: 8px; left: 8px; padding: 10px 14px; transform: translateY(-160%); border-radius: 8px; color: white; background: var(--navy); }
.skip-link:focus { transform: none; }
.eyebrow, .mini-label { margin: 0 0 7px; color: var(--teal); font-size: .875rem; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
h1, h2, h3, p { overflow-wrap: anywhere; }

/* Login */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 30px; background: radial-gradient(circle at 14% 14%, #29556a 0, transparent 30%), linear-gradient(135deg, #0b2432, #173e50 62%, #0b2432); }
.login-shell { width: min(1080px, 100%); display: grid; grid-template-columns: 1.12fr .88fr; overflow: hidden; border: 1px solid rgba(255,255,255,.15); border-radius: 30px; background: var(--white); box-shadow: 0 40px 100px rgba(0,0,0,.3); }
.login-context { position: relative; padding: clamp(36px, 7vw, 78px); color: white; background: linear-gradient(150deg, rgba(15,44,59,.96), rgba(20,79,88,.92)); }
.login-context::after { position: absolute; right: -80px; bottom: -110px; width: 330px; height: 330px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; content: ""; box-shadow: 0 0 0 50px rgba(255,255,255,.035), 0 0 0 100px rgba(255,255,255,.025); }
.private-seal, .brand-seal { display: grid; place-items: center; border: 1px solid rgba(255,255,255,.5); border-radius: 50%; font-family: Georgia, serif; }
.private-seal { width: 66px; height: 66px; margin-bottom: 46px; color: #f3d9a5; font-size: 1.3rem; }
.login-context .eyebrow { color: #9edbd1; }
.login-context h1 { max-width: 630px; margin: 0 0 20px; font: 500 clamp(2.6rem, 5vw, 5rem)/.98 Georgia, serif; letter-spacing: -.045em; }
.login-context > p { max-width: 550px; color: #d6e4e6; font-size: 1.05rem; }
.security-points { position: relative; z-index: 1; display: grid; gap: 10px; margin: 34px 0 0; padding: 0; list-style: none; color: #bed2d5; font-size: .95rem; }
.security-points li::before { margin-right: 9px; color: #f0c773; content: "✓"; }
.login-card { align-self: center; padding: clamp(34px, 6vw, 68px); }
.lock-icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 22px; border-radius: 12px; color: var(--teal); background: var(--teal-soft); font-size: 1.5rem; }
.login-card h2 { margin: 0 0 10px; font: 600 2rem/1.1 Georgia, serif; }
.login-card form { display: grid; gap: 8px; margin-top: 30px; }
.login-card label, .feedback-form label { margin-top: 10px; font-size: .9rem; font-weight: 800; letter-spacing: .03em; }
input, select, textarea { width: 100%; border: 1px solid #7b746b; border-radius: 10px; color: var(--ink); background: var(--white); }
input, select { min-height: 48px; padding: 10px 12px; }
textarea { padding: 12px; resize: vertical; }
.primary-button, .light-button { min-height: 48px; border: 0; border-radius: 10px; font-weight: 800; cursor: pointer; }
.primary-button { margin-top: 18px; color: white; background: var(--teal); }
.primary-button:hover { background: #0d665d; }
.full { width: 100%; }
.login-help { margin: 22px 0 0; color: var(--muted); font-size: .9rem; }
.form-error { padding: 10px 12px; border-radius: 8px; color: var(--red); background: var(--red-soft); font-size: .9rem; }

/* Portal frame */
.portal-topbar { position: sticky; z-index: 100; top: 0; display: flex; min-height: 72px; align-items: center; justify-content: space-between; gap: 22px; padding: 10px 24px; border-bottom: 1px solid rgba(255,255,255,.12); color: white; background: rgba(16,44,60,.97); backdrop-filter: blur(12px); }
.portal-brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.brand-seal { width: 42px; height: 42px; color: #f3d9a5; font-size: .875rem; }
.portal-brand span:last-child { display: grid; line-height: 1.16; }
.portal-brand small { color: #9eb4be; font-size: .875rem; letter-spacing: .06em; text-transform: uppercase; }
.portal-brand strong { font-family: Georgia, serif; font-weight: 500; }
.portal-actions { display: flex; align-items: center; gap: 8px; }
.session-user { margin-right: 8px; color: #c7d7dd; font-size: .9rem; }
.quiet-button, .logout-button { min-height: 38px; padding: 7px 11px; border: 1px solid rgba(255,255,255,.25); border-radius: 8px; color: white; background: transparent; cursor: pointer; font-size: .875rem; }
.quiet-button[aria-pressed="true"] { border-color: #e4bd6d; color: #ffe2a6; background: rgba(189,135,49,.2); }
.logout-button { border-color: transparent; color: #b8cbd2; }
.portal-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); }
.side-nav { position: sticky; top: 72px; align-self: start; height: calc(100vh - 72px); display: grid; align-content: start; gap: 2px; overflow-y: auto; padding: 28px 18px; border-right: 1px solid var(--line); background: #eee8de; }
.side-nav a { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 8px; color: #53616a; text-decoration: none; font-size: .9rem; font-weight: 720; }
.side-nav a span { color: #59676f; font: .875rem Georgia, serif; }
.side-nav a:hover, .side-nav a.active { color: var(--navy); background: rgba(255,255,255,.7); }
.side-nav a.active span { color: var(--teal); }
.side-nav-more { margin-top: 8px; border-top: 1px solid var(--line); padding-top: 8px; }
.side-nav-more summary { padding: 9px 11px; color: #53616a; cursor: pointer; font-size: .86rem; font-weight: 850; list-style-position: inside; }
.side-nav-more[open] summary { color: var(--navy); }
.side-nav-more a { margin-left: 8px; padding-block: 7px; font-size: .84rem; }
.portal-content { min-width: 0; }
.loading-state { min-height: 70vh; display: grid; place-items: center; align-content: center; color: var(--muted); }
.loading-mark { width: 34px; height: 34px; border: 3px solid #d2cbc0; border-top-color: var(--teal); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.case-hero { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(270px, .65fr); gap: 42px; padding: clamp(42px, 8vw, 95px) clamp(26px, 7vw, 100px) 68px; background: linear-gradient(150deg, #f7f2e9, #efe7da); }
.live-dot { display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 5px rgba(20,122,112,.12); }
.case-hero h1 { max-width: 900px; margin: 0 0 20px; font: 500 clamp(3rem, 7vw, 6.3rem)/.92 Georgia, serif; letter-spacing: -.06em; }
.hero-summary { max-width: 780px; color: #53616a; font-size: clamp(1rem, 1.8vw, 1.25rem); }
.hero-now { max-width: 760px; margin: 22px 0 0; padding: 15px 17px; border-left: 4px solid var(--teal); color: #354951; background: rgba(220,239,234,.72); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 24px; }
.hero-button { display: inline-flex; min-height: 44px; align-items: center; padding: 10px 14px; border: 1px solid var(--teal); border-radius: 9px; color: var(--teal); background: var(--white); text-decoration: none; font-size: .9rem; font-weight: 850; }
.hero-button.primary { color: white; background: var(--teal); }
.hero-text-link { padding: 10px 5px; color: var(--navy); font-size: .9rem; font-weight: 800; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 28px; }
.tag, .status-pill { display: inline-flex; align-items: center; padding: 5px 9px; border-radius: 999px; font-size: .875rem; font-weight: 820; }
.tag { color: var(--navy); background: var(--gold-soft); }
.hero-docket { align-self: end; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,254,250,.72); box-shadow: var(--shadow); }
.hero-docket dl { display: grid; gap: 13px; margin: 16px 0 0; }
.hero-docket dl div { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.hero-docket dt { color: var(--muted); font-size: .9rem; }
.hero-docket dd { margin: 0; text-align: right; font-size: .9rem; font-weight: 800; }
.sensitive { filter: blur(7px); user-select: none; transition: filter .18s ease; }
body.show-sensitive .sensitive { filter: none; user-select: auto; }

.simple-status { padding: 58px clamp(24px, 6vw, 90px); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--white); }
.simple-status-heading { display: grid; grid-template-columns: minmax(0, .9fr) minmax(280px, 1.1fr); gap: 8px 40px; align-items: end; margin-bottom: 28px; }
.simple-status-heading .eyebrow { grid-column: 1 / -1; }
.simple-status-heading h2 { margin: 0; font: 500 clamp(2.1rem, 4vw, 3.7rem)/.98 Georgia, serif; letter-spacing: -.035em; }
.simple-status-heading > p:last-child { margin: 0; color: var(--muted); }
.certainty-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.certainty-card { display: grid; grid-template-columns: 42px 1fr; gap: 13px; padding: 19px; border: 1px solid var(--line); border-radius: 13px; background: #faf8f2; }
.certainty-card > span { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 50%; color: white; background: #6d777d; font-weight: 900; }
.certainty-card.confirmed > span { background: var(--green); }
.certainty-card.pending > span { color: #60450d; background: #e5bd62; }
.certainty-card.current > span { background: var(--teal); }
.certainty-card h3 { margin: 0 0 4px; font-size: 1rem; }
.certainty-card p { margin: 0; color: var(--muted); font-size: .92rem; }
.simple-progress { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin-top: 30px; padding: 22px; border-radius: 15px; color: white; background: var(--navy); }
.simple-progress article { position: relative; display: grid; grid-template-columns: 34px 1fr; gap: 2px 9px; align-items: center; opacity: .72; }
.simple-progress article:not(:last-child)::after { position: absolute; right: -17px; color: #d9b76e; content: "→"; }
.simple-progress article.done, .simple-progress article.current { opacity: 1; }
.simple-progress article.current { padding: 9px; border: 1px solid #e2ba68; border-radius: 9px; }
.simple-progress span { grid-row: 1 / span 2; display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; color: var(--navy); background: #dcefea; font-weight: 900; }
.simple-progress strong { font-size: .88rem; }
.simple-progress small { color: #bdd0d6; }

.safety-alert { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 20px; margin: 34px clamp(24px, 6vw, 90px) 0; padding: 22px 24px; border: 1px solid #dfaaa4; border-radius: 16px; background: var(--red-soft); }
.alert-symbol { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: white; background: var(--red); font: 800 1.3rem Georgia, serif; }
.safety-alert .mini-label { color: var(--red); }
.safety-alert h2 { margin: 0 0 4px; font: 600 1.25rem Georgia, serif; }
.safety-alert p { margin: 0; color: #6e4441; font-size: .95rem; }
.inline-link { color: var(--red); font-size: .9rem; font-weight: 800; }

.next-step-block { background: linear-gradient(145deg, #fffaf0, #f5eee0); }
.next-step-status { display: flex; justify-content: space-between; gap: 18px; align-items: center; margin-bottom: 18px; padding: 15px 18px; border: 1px solid #dcc48e; border-radius: 12px; color: #664b19; background: #fff5d9; }
.next-step-status span { font-size: .9rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.next-step-status strong { font: 600 1.05rem Georgia, serif; }
.review-progress-row { display: grid; grid-template-columns: auto minmax(180px, 1fr); gap: 14px; align-items: center; max-width: 780px; margin: 0 auto 10px; color: var(--muted); font-size: .88rem; font-weight: 800; }
.review-progress-track { width: 100%; height: 11px; overflow: hidden; border: 0; border-radius: 999px; background: #ddd4c5; accent-color: var(--teal); }
.review-progress-track::-webkit-progress-bar { border-radius: 999px; background: #ddd4c5; }
.review-progress-track::-webkit-progress-value { border-radius: 999px; background: var(--teal); }
.review-progress-track::-moz-progress-bar { border-radius: 999px; background: var(--teal); }
.review-guide-grid { display: grid; max-width: 780px; margin: 0 auto; }
.review-guide-card { display: flex; min-width: 0; min-height: 250px; flex-direction: column; padding: clamp(22px, 4vw, 34px); border: 1px solid var(--line); border-radius: 16px; background: var(--white); box-shadow: 0 18px 45px rgba(16,44,60,.08); }
.review-guide-card .review-code { color: var(--teal); font-size: .82rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.review-guide-card h3 { margin: 12px 0 9px; font: 600 clamp(1.35rem, 3vw, 2rem) Georgia, serif; }
.review-guide-card > p { margin: 0; color: var(--muted); font-size: 1rem; }
.review-guide-card .review-why { margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--line); color: #5b4725; font-size: .84rem; }
.review-answer-button { align-self: flex-start; margin-top: auto; padding: 9px 11px; border: 1px solid #8fbcb4; border-radius: 8px; color: var(--teal); background: var(--teal-soft); cursor: pointer; font-size: .84rem; font-weight: 850; }
.review-answer-button:hover { color: white; background: var(--teal); }
.review-step-controls { display: flex; justify-content: space-between; gap: 12px; max-width: 780px; margin: 12px auto 0; }
.review-step-button { min-height: 42px; padding: 8px 13px; border: 1px solid var(--line); border-radius: 8px; color: var(--navy); background: var(--white); cursor: pointer; font-weight: 800; }
.review-step-button:disabled { cursor: default; opacity: .45; }
.review-guide-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 18px; }
.review-guide-link { display: inline-flex; align-items: center; min-height: 40px; padding: 9px 13px; border: 1px solid var(--teal); border-radius: 9px; color: var(--teal); background: var(--white); font-size: .88rem; font-weight: 850; }
.review-guide-link.primary { color: white; background: var(--teal); }
.collab-limitation { margin: 15px 0 0; color: var(--muted); font-size: .86rem; }

.section-block { scroll-margin-top: 88px; padding: 88px clamp(24px, 6vw, 90px); }
.section-block + .section-block { border-top: 1px solid var(--line); }
.section-heading { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(250px, .65fr); gap: 34px; align-items: end; margin-bottom: 34px; }
.section-heading > div { position: relative; }
.section-number { position: absolute; top: -22px; left: -38px; color: rgba(23,33,43,.12); font: 5.2rem/.8 Georgia, serif; }
.section-heading h2 { position: relative; margin: 0; font: 500 clamp(2.4rem, 5vw, 4.5rem)/.95 Georgia, serif; letter-spacing: -.045em; }
.section-heading > p { margin: 0; color: var(--muted); }

.recovery-block { background: linear-gradient(155deg, #f4efe6, #fffefa); }
.short-answer { display: grid; grid-template-columns: 120px 1fr; gap: 22px; align-items: center; margin-bottom: 24px; padding: 24px; border: 1px solid #98c9b4; border-radius: 16px; background: var(--green-soft); }
.short-answer > span { display: grid; min-height: 76px; place-items: center; border-radius: 50%; color: white; background: var(--green); font: 600 1.08rem Georgia, serif; }
.short-answer h3 { margin: 0 0 6px; font: 600 1.35rem Georgia, serif; }
.short-answer p { margin: 0; color: #385746; }
.recovery-routes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.recovery-route { display: flex; min-height: 360px; flex-direction: column; padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); }
.recovery-route.recommended { border-color: #74ad9a; box-shadow: inset 0 4px var(--teal); }
.route-label { color: var(--teal); font-size: .82rem; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.recovery-route h3 { margin: 10px 0; font: 600 1.25rem Georgia, serif; }
.recovery-route ul { display: grid; gap: 8px; margin: 0; padding-left: 18px; color: var(--muted); font-size: .92rem; }
.recovery-route strong { display: block; margin-top: auto; padding-top: 18px; font-size: .9rem; }
.legal-clarity-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 28px; }
.legal-clarity-grid article { padding: 18px; border-left: 4px solid var(--gold); color: #5a4b32; background: var(--gold-soft); }
.legal-clarity-grid h3 { margin: 0 0 6px; font-size: .95rem; }
.legal-clarity-grid p { margin: 0; font-size: .88rem; }
.official-help { margin-top: 28px; padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); }
.official-help h3 { margin: 0 0 13px; font: 600 1.2rem Georgia, serif; }
.official-help > div { display: flex; flex-wrap: wrap; gap: 8px; }
.official-help a { padding: 8px 11px; border: 1px solid #9bc7bf; border-radius: 999px; color: var(--teal); font-size: .86rem; font-weight: 800; }
.legal-note { margin: 18px 0 0; color: var(--muted); font-size: .88rem; }

.full-case-disclosure { border-top: 1px solid var(--line); background: var(--paper); }
.full-case-disclosure > summary { position: relative; display: flex; min-height: 104px; align-items: center; justify-content: space-between; gap: 20px; padding: 26px clamp(24px, 6vw, 90px); color: white; background: var(--navy); cursor: pointer; list-style: none; }
.full-case-disclosure > summary::-webkit-details-marker { display: none; }
.full-case-disclosure > summary::after { content: "+"; font: 500 2rem Georgia, serif; }
.full-case-disclosure[open] > summary::after { content: "−"; }
.full-case-disclosure > summary span { font: 600 clamp(1.4rem, 3vw, 2.2rem) Georgia, serif; }
.full-case-disclosure > summary small { margin-left: auto; color: #b9cbd2; font-size: .9rem; }
.full-case-disclosure[open] > summary { position: sticky; z-index: 60; top: 72px; }
.case-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 22px; }
.case-card { padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); }
.case-card .card-icon { display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: 16px; border-radius: 9px; color: var(--teal); background: var(--teal-soft); font-weight: 900; }
.case-card h3 { margin: 0 0 7px; font-size: 1rem; }
.case-card p { margin: 0; color: var(--muted); font-size: .95rem; }
.case-card strong { display: block; margin-top: 16px; font-size: .9rem; }
.profile-card { overflow: hidden; margin-bottom: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.profile-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.profile-field { min-width: 0; padding: 16px 20px; border-right: 1px solid #e9e3d9; border-bottom: 1px solid #e9e3d9; }
.profile-field:nth-child(3n) { border-right: 0; }
.profile-field span:first-child { display: block; margin-bottom: 5px; color: var(--muted); font-size: .875rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.profile-field strong { display: block; font-size: .95rem; }
.holdings-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.card-heading { display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.card-heading h3 { margin: 0; font: 600 1.35rem Georgia, serif; }
.evidence-grade { color: #7a5315; font-size: .875rem; font-weight: 800; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 16px; border-bottom: 1px solid #e9e3d9; text-align: left; vertical-align: top; font-size: .9rem; }
th { color: #53616a; background: #faf8f2; font-size: .875rem; letter-spacing: .04em; text-transform: uppercase; }
td strong { color: var(--navy); }
.table-note { margin: 0; padding: 14px 18px; color: var(--muted); background: #faf8f2; font-size: .9rem; }

.dark-block { color: white; border: 0 !important; background: var(--navy); }
.inverted .section-number { color: rgba(255,255,255,.08); }
.inverted .eyebrow { color: #8cd2c7; }
.inverted > p { color: #b9cbd2; }
.entity-flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; align-items: stretch; }
.entity-card { position: relative; padding: 20px; border: 1px solid rgba(255,255,255,.16); border-radius: 14px; background: rgba(255,255,255,.07); }
.entity-card:not(:last-child)::after { position: absolute; top: 50%; right: -20px; color: #e2ba68; content: "→"; }
.entity-card .role { color: #8cd2c7; font-size: .875rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.entity-card h3 { margin: 8px 0 6px; font: 600 1.18rem Georgia, serif; }
.entity-card p { margin: 0; color: #bdd0d6; font-size: .95rem; }
.entity-card .entity-id { display: block; margin-top: 13px; color: #f0ce89; font-size: .875rem; }
.entity-notes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 26px; }
.entity-note { padding: 14px 16px; border-left: 3px solid #e2ba68; color: #cfdee3; background: rgba(255,255,255,.055); font-size: .9rem; }

.timeline-controls { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 28px; }
.filter-button { padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: var(--white); cursor: pointer; font-size: .9rem; font-weight: 750; }
.filter-button.active { border-color: var(--teal); color: white; background: var(--teal); }
.filter-count { align-self: center; margin-left: auto; color: var(--muted); font-size: .86rem; font-weight: 700; }
.timeline-list { position: relative; display: grid; gap: 0; max-width: 1040px; }
.timeline-list::before { position: absolute; top: 8px; bottom: 8px; left: 119px; width: 1px; background: var(--line); content: ""; }
.timeline-item { display: grid; grid-template-columns: 100px 20px 1fr; gap: 10px; padding-bottom: 24px; }
.timeline-item[hidden] { display: none; }
.timeline-date { padding-top: 6px; color: var(--muted); text-align: right; font-size: .875rem; font-weight: 780; }
.timeline-dot { z-index: 1; width: 11px; height: 11px; margin: 9px auto 0; border: 3px solid var(--paper); border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 2px var(--teal); }
.timeline-item[data-type="recibido"] .timeline-dot { background: var(--gold); box-shadow: 0 0 0 2px var(--gold); }
.timeline-item[data-type="documento"] .timeline-dot { background: var(--navy); box-shadow: 0 0 0 2px var(--navy); }
.timeline-content { padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); }
.timeline-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 7px; }
.status-pill { color: var(--navy); background: var(--teal-soft); }
.status-pill.warning { color: var(--red); background: var(--red-soft); }
.timeline-content h3 { margin: 0 0 7px; font: 600 1.15rem Georgia, serif; }
.timeline-content > p { margin: 0; color: var(--muted); font-size: .95rem; }
.timeline-details { display: grid; gap: 7px; margin: 14px 0 0; padding-left: 18px; color: #45545d; font-size: .9rem; }
.translation { margin-top: 14px; padding: 13px 15px; border-left: 3px solid var(--teal); color: #354951; background: var(--teal-soft); font-size: .9rem; }
.timeline-evidence { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.document-link { color: var(--teal); font-size: .9rem; font-weight: 800; }

.corrections-block { background: #eee8de; }
.corrections-list { display: grid; gap: 13px; }
.correction-card { display: grid; grid-template-columns: 150px 1fr 1fr; gap: 18px; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); }
.correction-kind { color: var(--teal); font-size: .875rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.correction-side { padding-left: 16px; border-left: 1px solid var(--line); }
.correction-side span { color: var(--muted); font-size: .875rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.correction-side p { margin: 5px 0 0; font-size: .95rem; }
.correction-impact { grid-column: 2 / -1; margin: 0; padding: 10px 12px; border-radius: 8px; color: #5d4723; background: var(--gold-soft); font-size: .9rem; }

.evidence-legend { display: flex; flex-wrap: wrap; gap: 12px 18px; margin-bottom: 22px; }
.evidence-legend span { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: .9rem; }
.grade { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; color: white; font-size: .875rem; }
.grade-a { background: #1d6b4a; }.grade-b { background: var(--teal); }.grade-c { background: #517587; }.grade-d { background: #857a6d; }.grade-x { background: var(--red); }
.documents-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; }
.document-card { display: flex; min-height: 220px; flex-direction: column; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); }
.document-card .doc-top { display: flex; justify-content: space-between; gap: 10px; }
.document-card h3 { margin: 17px 0 7px; font: 600 1.05rem Georgia, serif; }
.document-card p { margin: 0; color: var(--muted); font-size: .9rem; }
.document-card .doc-footer { display: flex; justify-content: space-between; gap: 10px; align-items: end; margin-top: auto; padding-top: 18px; }
.document-card small { color: var(--muted); font-size: .875rem; }
.document-card.alert-doc { border-color: #d69b95; background: #fff9f8; }

.strategy-block { background: var(--white); }
.execution-flow-wrap { margin-bottom: 34px; padding: 22px; border: 1px solid var(--line); border-radius: 15px; background: var(--navy); }
.execution-flow-wrap > h3 { margin: 0 0 17px; color: white; font: 600 1.35rem Georgia, serif; }
.execution-flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.execution-node { position: relative; min-width: 0; padding: 16px; border: 1px solid rgba(255,255,255,.16); border-radius: 11px; color: white; background: rgba(255,255,255,.07); }
.execution-node:not(:last-child)::after { position: absolute; top: 50%; right: -18px; color: #e2ba68; content: "→"; font-size: 1.2rem; }
.execution-node .execution-code { color: #8cd2c7; font-size: .82rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.execution-node h4 { margin: 7px 0 5px; font-size: .9rem; }
.execution-node p { margin: 0; color: #c5d6db; font-size: .84rem; }
.execution-node.current { border-color: #e2ba68; box-shadow: inset 0 3px #e2ba68; }
.execution-node.blocked { opacity: .72; }
.gates-list { display: grid; gap: 10px; }
.gate-card { display: grid; grid-template-columns: 70px 1fr 250px; gap: 18px; align-items: start; padding: 20px; border: 1px solid var(--line); border-radius: 13px; background: #faf8f2; }
.gate-number { color: var(--teal); font: 600 1.7rem Georgia, serif; }
.gate-card h3 { margin: 0 0 5px; font-size: .96rem; }
.gate-card p { margin: 0; color: var(--muted); font-size: .9rem; }
.gate-output { padding: 10px 12px; border-radius: 8px; color: #40565d; background: var(--teal-soft); font-size: .9rem; }
.gate-output strong { display: block; color: var(--teal); font-size: .875rem; letter-spacing: .05em; text-transform: uppercase; }
.gate-card.current { border-color: #9bc7bf; box-shadow: inset 4px 0 var(--teal); }
.gate-card.locked { opacity: .78; }
.route-comparison { margin-top: 42px; }
.route-comparison > h3 { font: 600 1.5rem Georgia, serif; }
.routes-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.route-card { padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.route-card span { color: var(--teal); font-size: .875rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.route-card h4 { margin: 8px 0 5px; font-size: .9rem; }
.route-card p { margin: 0; color: var(--muted); font-size: .9rem; }

.decision-columns { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.decision-columns h3 { font: 600 1.35rem Georgia, serif; }
.decision-list { display: grid; gap: 9px; }
.decision-item { padding: 16px; border: 1px solid var(--line); border-radius: 11px; background: var(--white); }
.decision-item .decision-status { color: var(--green); font-size: .875rem; font-weight: 850; text-transform: uppercase; }
.decision-item.pending .decision-status { color: #7a5315; }
.decision-item h4 { margin: 6px 0 5px; font-size: .88rem; }
.decision-item p { margin: 0; color: var(--muted); font-size: .9rem; }
.decision-item small { display: block; margin-top: 9px; color: var(--muted); font-size: .875rem; }

.glossary-block { background: #eee8de; }
.glossary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.glossary-card { padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.glossary-card h3 { margin: 0 0 3px; color: var(--navy); font: 600 1rem Georgia, serif; }
.glossary-card .translation-word { display: block; margin-bottom: 10px; color: var(--teal); font-size: .875rem; font-weight: 800; text-transform: uppercase; }
.glossary-card p { margin: 0; color: var(--muted); font-size: .9rem; }
.glossary-card strong { display: block; margin-top: 10px; font-size: .875rem; }

.review-block { color: white; border: 0 !important; background: linear-gradient(145deg, var(--navy), #194d57); }
.feedback-form { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 18px; padding: 24px; border: 1px solid rgba(255,255,255,.17); border-radius: 16px; background: rgba(255,255,255,.07); }
.feedback-form label { display: block; color: #c9dadd; }
.feedback-form .wide { grid-column: 1 / -1; }
.form-row { display: flex; justify-content: space-between; gap: 15px; align-items: center; }
.form-row p { margin: 0; color: #b9d5d6; font-size: .9rem; }
.light-button { padding: 10px 18px; color: var(--navy); background: #f1cf87; }
.feedback-history { margin-top: 30px; }
.feedback-history h3 { font: 600 1.35rem Georgia, serif; }
#feedback-list { display: grid; gap: 8px; }
.feedback-item { padding: 13px 15px; border: 1px solid rgba(255,255,255,.13); border-radius: 9px; color: #d2e1e4; background: rgba(255,255,255,.05); font-size: .9rem; }
.feedback-item strong { color: white; }
.feedback-item .feedback-meta { display: block; margin-top: 3px; color: #b9d5d6; font-size: .875rem; }
.feedback-item p { margin: 8px 0 0; }
.empty-note { color: #a9c1c7; font-size: .9rem; }

.portal-footer { display: flex; justify-content: space-between; gap: 20px; padding: 20px 30px 20px 250px; color: #b9c6cb; background: #0b2230; font-size: .875rem; }
@media (max-width: 1080px) {
  .portal-layout { grid-template-columns: 1fr; }
  .side-nav { position: sticky; z-index: 90; top: 72px; height: auto; display: flex; overflow-x: auto; padding: 9px 14px; border-right: 0; border-bottom: 1px solid var(--line); }
  .side-nav a { flex: 0 0 auto; }
  .side-nav-more { flex: 0 0 auto; margin: 0; padding: 0; border: 0; }
  .side-nav-more summary { white-space: nowrap; }
  .side-nav-more[open] { display: flex; align-items: center; }
  .side-nav-more a { margin-left: 2px; }
  .section-block, .case-hero { scroll-margin-top: 148px; }
  .portal-footer { padding-left: 30px; }
  .entity-flow { grid-template-columns: repeat(2, 1fr); }
  .entity-card::after { display: none; }
  .documents-grid, .glossary-grid, .profile-grid { grid-template-columns: repeat(2, 1fr); }
  .execution-flow { grid-template-columns: repeat(2, 1fr); }
  .execution-node::after { display: none; }
  .profile-field:nth-child(3n) { border-right: 1px solid #e9e3d9; }
  .profile-field:nth-child(2n) { border-right: 0; }
}

@media (max-width: 760px) {
  .login-page { padding: 0; }
  .login-shell { min-height: 100vh; grid-template-columns: 1fr; border: 0; border-radius: 0; }
  .login-context { padding: 34px 26px; }
  .login-context h1 { font-size: 2.5rem; }
  .private-seal { margin-bottom: 24px; }
  .security-points { display: none; }
  .login-card { padding: 34px 26px 50px; }
  .profile-grid { grid-template-columns: 1fr; }
  .profile-field, .profile-field:nth-child(2n), .profile-field:nth-child(3n) { border-right: 0; }
  .portal-topbar { align-items: flex-start; padding: 10px 14px; }
  .portal-brand small, .portal-brand strong, .session-user { display: none; }
  .portal-actions { flex-wrap: wrap; justify-content: flex-end; }
  .quiet-button, .logout-button { min-height: 36px; padding: 5px 8px; font-size: .875rem; }
  .side-nav { top: 72px; }
  .case-hero, .section-heading, .simple-status-heading, .case-grid, .decision-columns, .feedback-form, .review-guide-grid, .execution-flow { grid-template-columns: 1fr; }
  .case-hero { gap: 26px; padding: 46px 20px; }
  .case-hero h1 { font-size: 3.25rem; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .hero-button { justify-content: center; }
  .simple-status { padding: 46px 20px; }
  .simple-status-heading .eyebrow { grid-column: auto; }
  .certainty-grid, .simple-progress, .recovery-routes, .legal-clarity-grid { grid-template-columns: 1fr; }
  .simple-progress { gap: 18px; }
  .simple-progress article:not(:last-child)::after { right: auto; bottom: -17px; left: 14px; content: "↓"; }
  .safety-alert { grid-template-columns: auto 1fr; margin: 20px; }
  .safety-alert .inline-link { grid-column: 2; }
  .next-step-status { align-items: flex-start; flex-direction: column; }
  .review-progress-row { grid-template-columns: 1fr; }
  .review-step-controls { align-items: stretch; flex-direction: column; }
  .short-answer { grid-template-columns: 1fr; }
  .short-answer > span { width: 86px; min-height: 86px; }
  .full-case-disclosure > summary { align-items: flex-start; flex-direction: column; }
  .full-case-disclosure > summary small { margin-left: 0; }
  .full-case-disclosure > summary::after { position: absolute; right: 20px; }
  .section-block { padding: 65px 20px; }
  .section-heading { gap: 14px; }
  .section-number { left: 0; top: -30px; }
  .section-heading h2 { font-size: 2.7rem; }
  .entity-flow, .entity-notes, .documents-grid, .glossary-grid, .routes-grid { grid-template-columns: 1fr; }
  .timeline-list::before { left: 6px; }
  .timeline-item { grid-template-columns: 13px 1fr; gap: 12px; }
  .timeline-date { grid-column: 2; grid-row: 1; padding: 0; text-align: left; }
  .timeline-dot { grid-column: 1; grid-row: 1 / span 2; margin-top: 5px; }
  .timeline-content { grid-column: 2; }
  .correction-card { grid-template-columns: 1fr; }
  .correction-side { padding: 12px 0 0; border-top: 1px solid var(--line); border-left: 0; }
  .correction-impact { grid-column: auto; }
  .gate-card { grid-template-columns: 50px 1fr; }
  .gate-output { grid-column: 2; }
  .feedback-form .wide { grid-column: auto; }
  .form-row { align-items: stretch; flex-direction: column; }
  .portal-footer { align-items: flex-start; flex-direction: column; padding: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media print {
  .portal-topbar, .side-nav, .review-block, .safety-source, .timeline-controls, .portal-footer { display: none !important; }
  .portal-layout { display: block; }
  .section-block, .case-hero { padding: 28px 0; }
  .dark-block { color: var(--ink); background: white; }
  .inverted > p, .entity-card p { color: var(--muted); }
  .entity-card { color: var(--ink); border-color: var(--line); background: white; }
  .sensitive { filter: blur(7px) !important; }
  .document-link { display: none; }
}
