:root {
  --navy: #102f4b;
  --navy-2: #173f60;
  --blue: #0c6f9e;
  --blue-light: #e9f3f8;
  --gold: #c99c47;
  --red: #a30f24;
  --ink: #1c2732;
  --muted: #5d6b78;
  --line: #ccd6de;
  --surface: #ffffff;
  --background: #eef2f5;
  --shadow: 0 16px 40px rgba(21, 47, 70, .09);
  --radius: 3px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--background); font-family: "Segoe UI", Arial, sans-serif; font-size: 16px; line-height: 1.5; }
a { color: var(--blue); }
button, input, textarea, select { font: inherit; }
[hidden] { display: none !important; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 999; padding: 10px 16px; background: white; color: var(--navy); }
.skip-link:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.top-line { background: #0b2236; color: #dbe5ec; font-size: .75rem; letter-spacing: .04em; text-transform: uppercase; }
.top-line__inner, .brand-bar, .primary-nav__inner, .page-shell, footer { width: min(1460px, calc(100% - 48px)); margin: auto; }
.top-line__inner { min-height: 32px; display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.brand-bar { min-height: 112px; display: flex; align-items: center; justify-content: space-between; gap: 32px; background: var(--surface); }
.institutional-header { background: var(--surface); box-shadow: 0 2px 12px rgba(10, 35, 55, .08); }
.brand { display: inline-flex; align-items: center; gap: 16px; color: var(--ink); text-decoration: none; }
.brand__logo { width: 112px; height: 72px; object-fit: contain; }
.brand strong { display: block; color: var(--navy); font-size: clamp(1.25rem, 2vw, 1.75rem); font-weight: 650; }
.brand small { display: block; margin-top: 2px; color: var(--muted); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; }
.brand-bar__meta { display: grid; padding-left: 26px; border-left: 1px solid var(--line); text-align: right; }
.brand-bar__meta strong { color: var(--navy); }
.brand-bar__meta span { color: var(--muted); font-size: .85rem; }
.public-access { display: grid; min-width: 150px; padding: 8px 20px; color: var(--navy); border-left: 1px solid var(--line); text-align: right; text-decoration: none; }
.public-access strong { font-size: .86rem; }
.public-access span { color: var(--muted); font-size: .72rem; }
.public-access:hover { color: var(--blue); background: #f5f9fb; }
.header-actions { display: flex; align-items: center; gap: 24px; }
.user-account { display: grid; grid-template-columns: 42px minmax(120px, auto) 38px; align-items: center; gap: 10px; padding-left: 22px; border-left: 1px solid var(--line); }
.user-account > img { width: 42px; height: 42px; object-fit: cover; border: 2px solid #d7e1e8; border-radius: 50%; }
.user-account strong, .user-account span { display: block; }
.user-account strong { max-width: 200px; overflow: hidden; color: var(--navy); text-overflow: ellipsis; white-space: nowrap; font-size: .88rem; }
.user-account span { max-width: 200px; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; font-size: .7rem; }
.logout-button { width: 36px; height: 36px; color: var(--navy); background: white; border: 1px solid #aab8c2; cursor: pointer; font-size: 1.15rem; }
.logout-button:hover { color: white; background: var(--red); border-color: var(--red); }
.primary-nav { background: var(--navy); border-bottom: 4px solid var(--gold); }
.primary-nav__inner { display: flex; align-items: stretch; }
.primary-nav a { padding: 15px 22px; color: #eaf0f4; text-decoration: none; font-size: .9rem; border-left: 1px solid rgba(255,255,255,.09); }
.primary-nav a:hover, .primary-nav a.active { background: var(--blue); color: white; }
.rp-warning { padding: 7px 24px; color: #6f4b07; background: #fff6d8; text-align: center; font-size: .71rem; font-weight: 700; letter-spacing: .08em; }

.page-shell { min-height: calc(100vh - 350px); padding: 28px 0 64px; }
.breadcrumb { display: flex; gap: 9px; margin-bottom: 24px; color: var(--muted); font-size: .82rem; }
.breadcrumb a { color: var(--navy-2); text-decoration: none; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 32px; margin-bottom: 28px; }
.page-heading h1, .process-hero h1 { margin: 5px 0 6px; color: var(--navy); font-size: clamp(1.8rem, 3vw, 2.65rem); font-weight: 600; line-height: 1.18; }
.page-heading p, .process-hero p { max-width: 800px; margin: 0; color: var(--muted); }
.eyebrow { color: var(--red); font-size: .69rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.heading-icon { width: 58px; height: 58px; display: grid; place-items: center; color: var(--gold); border: 1px solid var(--gold); border-radius: 50%; font-size: 1.65rem; }

.search-layout { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: 20px; align-items: start; }
.search-panel, .results-panel, .detail-card { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.search-panel { position: sticky; top: 18px; }
.panel-title { display: flex; gap: 14px; align-items: center; padding: 20px 24px; color: white; background: var(--navy); border-bottom: 4px solid var(--gold); }
.panel-title > span { font-size: 1.8rem; }
.panel-title strong, .panel-title small { display: block; }
.panel-title small { margin-top: 2px; color: #cbd9e3; font-size: .75rem; }
form { padding: 22px 24px 24px; }
label { display: block; margin: 0 0 6px; color: var(--navy); font-size: .81rem; font-weight: 700; }
input, textarea, select { width: 100%; min-height: 43px; margin-bottom: 16px; padding: 10px 12px; color: var(--ink); background: white; border: 1px solid #b8c4ce; border-radius: 2px; outline: none; }
textarea { resize: vertical; line-height: 1.45; }
input:focus, textarea:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(12, 111, 158, .14); }
input::placeholder, textarea::placeholder { color: #8996a1; }
.form-message { margin: 2px 0 16px; padding: 11px 12px; color: #7e0e1e; background: #fff0f2; border-left: 3px solid var(--red); font-size: .84rem; }
.form-actions { display: flex; justify-content: flex-end; gap: 9px; padding-top: 4px; }
.button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 18px; border: 1px solid transparent; border-radius: 2px; cursor: pointer; text-decoration: none; font-weight: 700; }
.button--primary { color: white; background: var(--blue); border-color: var(--blue); }
.button--primary:hover { background: #075e88; }
.button--ghost { color: var(--navy); background: white; border-color: #9faeb9; }
.button--small { min-height: 36px; padding: 7px 12px; font-size: .8rem; }

.results-panel { min-height: 610px; }
.results-toolbar, .section-title { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 24px; border-bottom: 1px solid var(--line); }
.results-toolbar h2, .section-title h2 { margin: 3px 0 0; color: var(--navy); font-size: 1.35rem; font-weight: 650; }
.result-count { flex: none; padding: 7px 10px; color: var(--navy); background: var(--blue-light); border: 1px solid #c6dfe9; font-size: .76rem; font-weight: 700; }
.empty-state { min-height: 490px; display: grid; place-content: center; justify-items: center; padding: 48px; color: var(--muted); text-align: center; }
.empty-state__icon { width: 62px; height: 62px; display: grid; place-items: center; margin-bottom: 12px; color: var(--blue); background: var(--blue-light); border-radius: 50%; font-size: 2.1rem; }
.empty-state h2, .empty-state h3 { margin: 0 0 6px; color: var(--navy); font-weight: 650; }
.empty-state p { max-width: 480px; margin: 0; }
.spinner { width: 44px; height: 44px; margin-bottom: 18px; border: 4px solid #d5e2ea; border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 13px 14px; color: var(--navy); background: #f0f4f7; border-bottom: 1px solid var(--line); text-align: left; font-size: .73rem; letter-spacing: .03em; }
td { min-width: 135px; padding: 17px 14px; border-bottom: 1px solid #dde4e9; vertical-align: top; font-size: .82rem; }
tbody tr:hover { background: #f8fbfc; }
td strong, td small { display: block; }
td small { margin-top: 5px; color: var(--muted); line-height: 1.35; }
.process-link { color: var(--navy); font-weight: 800; text-decoration: none; white-space: nowrap; }
.process-link:hover { color: var(--blue); text-decoration: underline; }
.table-action { min-width: 48px; width: 48px; }
.icon-button { width: 34px; height: 34px; display: grid; place-items: center; color: white; background: var(--blue); text-decoration: none; font-size: 1.4rem; }

.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 28px; background: var(--line); border: 1px solid var(--line); }
.info-grid article { position: relative; min-height: 180px; padding: 28px; background: white; }
.info-grid__number { color: var(--gold); font-size: 1.55rem; font-weight: 700; }
.info-grid h2 { margin: 15px 0 7px; color: var(--navy); font-size: 1.1rem; font-weight: 650; }
.info-grid p { margin: 0; color: var(--muted); font-size: .9rem; }

.service-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.service-card { min-height: 210px; padding: 28px; color: var(--ink); background: white; border: 1px solid var(--line); border-top: 4px solid var(--navy); box-shadow: var(--shadow); text-decoration: none; transition: transform .15s ease, border-color .15s ease; }
.service-card:hover { border-top-color: var(--blue); transform: translateY(-2px); }
.service-card > span { color: var(--gold); font-size: 1.35rem; font-weight: 800; }
.service-card h2 { margin: 14px 0 6px; color: var(--navy); font-size: 1.3rem; }
.service-card p { min-height: 52px; margin: 0 0 22px; color: var(--muted); }
.service-card strong { color: var(--blue); font-size: .86rem; }

.action-panel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); background: var(--line); border: 1px solid var(--line); box-shadow: var(--shadow); gap: 1px; }
.action-panel > div { min-height: 300px; padding: 36px; background: white; }
.action-panel h2 { margin: 8px 0; color: var(--navy); font-size: 1.5rem; }
.action-panel p { min-height: 90px; color: var(--muted); }

.judicial-forms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.form-card { overflow: hidden; background: white; border: 1px solid var(--line); box-shadow: var(--shadow); }
.form-card__heading { min-height: 150px; padding: 26px 28px; background: #f8fafb; border-top: 4px solid var(--navy); border-bottom: 1px solid var(--line); }
.form-card__heading h2 { margin: 7px 0 5px; color: var(--navy); font-size: 1.35rem; }
.form-card__heading p { margin: 0; color: var(--muted); }
.portal-form input[type="file"] { padding: 8px; background: #f8fafb; }
.field-help { display: block; margin: -9px 0 17px; color: var(--muted); font-size: .75rem; }
.submission-message { margin: 0 0 16px; padding: 11px 12px; color: var(--navy); background: var(--blue-light); border-left: 3px solid var(--blue); font-size: .84rem; }
.submission-message--success { color: #175f3f; background: #eaf7f0; border-left-color: #218354; }
.submission-message--error { color: #7e0e1e; background: #fff0f2; border-left-color: var(--red); }
.portal-form .button { width: 100%; }

.activity-panel { margin-top: 24px; overflow: hidden; background: white; border: 1px solid var(--line); box-shadow: var(--shadow); }
.activity-panel .empty-state { min-height: 260px; }
.activity-list { padding: 0 24px 24px; }
.activity-item { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 12px; color: var(--ink); border-bottom: 1px solid var(--line); text-decoration: none; }
.activity-item:hover { background: #f7fafc; }
.activity-item span, .activity-item p { color: var(--muted); font-size: .78rem; }
.activity-item h3 { margin: 3px 0; color: var(--navy); font-size: 1rem; }
.activity-item p { margin: 0; }
.activity-item > strong { color: var(--red); font-size: .77rem; text-align: right; text-transform: uppercase; }

.archive-panel { overflow: hidden; background: white; border: 1px solid var(--line); box-shadow: var(--shadow); }
.archive-panel .empty-state { min-height: 340px; }
.archive-list { padding: 0 24px 24px; }
.archive-item { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, .55fr) 32px; align-items: center; gap: 24px; padding: 20px 12px; color: var(--ink); border-bottom: 1px solid var(--line); text-decoration: none; }
.archive-item:hover { background: #f7fafc; }
.archive-item span { color: var(--muted); font-size: .78rem; }
.archive-item h3 { margin: 4px 0; color: var(--navy); font-size: 1rem; }
.archive-item p { margin: 0; color: var(--muted); font-size: .86rem; }
.archive-item__meta { display: grid; gap: 4px; }
.archive-item__meta strong { color: var(--red); font-size: .79rem; text-transform: uppercase; }
.archive-item b { color: var(--blue); font-size: 1.8rem; }

.guidance-list { background: white; border: 1px solid var(--line); box-shadow: var(--shadow); }
.guidance-list article { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 20px; padding: 28px 32px; border-bottom: 1px solid var(--line); }
.guidance-list article:last-child { border-bottom: 0; }
.guidance-list article > span { color: var(--gold); font-size: 1.45rem; font-weight: 800; }
.guidance-list h2 { margin: 0 0 5px; color: var(--navy); font-size: 1.12rem; }
.guidance-list p { margin: 0; color: var(--muted); }

.process-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; padding: 32px; color: white; background: linear-gradient(125deg, var(--navy), #0a5075); border-bottom: 5px solid var(--gold); box-shadow: var(--shadow); }
.process-hero .eyebrow { color: #f2d995; }
.process-hero h1 { color: white; font-size: clamp(1.65rem, 3vw, 2.7rem); }
.process-hero p { color: #d5e1e8; }
.process-status { min-width: 190px; padding: 16px 20px; background: rgba(255,255,255,.1); border-left: 3px solid var(--gold); }
.process-status span, .process-status strong { display: block; }
.process-status span { color: #cbd9e3; font-size: .69rem; letter-spacing: .12em; text-transform: uppercase; }
.process-status strong { margin-top: 4px; font-size: 1.05rem; }
.anchor-nav { display: flex; gap: 1px; margin-bottom: 22px; background: var(--line); border: 1px solid var(--line); border-top: 0; }
.anchor-nav a { flex: 1; padding: 13px 18px; color: var(--navy); background: white; text-align: center; text-decoration: none; font-size: .82rem; font-weight: 700; }
.anchor-nav a:hover { color: white; background: var(--blue); }
.detail-card { margin-top: 20px; }
.data-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; padding: 12px 24px 24px; }
.data-grid > div { min-height: 90px; padding: 18px 16px; border-bottom: 1px solid #dce3e8; }
.data-grid dt { color: var(--muted); font-size: .67rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.data-grid dd { margin: 8px 0 0; color: var(--ink); font-weight: 600; }
.parties-list { display: grid; gap: 12px; padding: 24px; }
.party-card { display: grid; grid-template-columns: 115px minmax(220px, 1fr) minmax(220px, .7fr); gap: 20px; align-items: center; padding: 18px; background: #f7f9fb; border: 1px solid #d8e0e6; }
.party-side { align-self: stretch; display: grid; place-items: center; padding: 12px; color: white; text-align: center; font-size: .7rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.party-side--active { background: var(--navy-2); }
.party-side--passive { background: var(--red); }
.party-role { color: var(--muted); font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.party-card h3 { margin: 5px 0; color: var(--navy); font-weight: 650; }
.party-card p { margin: 0; color: var(--muted); font-size: .82rem; }
.representatives { display: grid; gap: 5px; padding-left: 20px; border-left: 1px solid var(--line); font-size: .79rem; }
.representatives > strong { color: var(--navy); font-size: .69rem; letter-spacing: .06em; text-transform: uppercase; }
.representatives span { color: var(--muted); }
.timeline { position: relative; padding: 25px 26px 32px; }
.timeline::before { content: ""; position: absolute; left: 50px; top: 30px; bottom: 40px; width: 1px; background: #b9cbd7; }
.timeline-item { position: relative; display: grid; grid-template-columns: 50px minmax(0, 1fr); gap: 16px; padding-bottom: 18px; }
.timeline-marker { position: relative; z-index: 1; padding-top: 5px; }
.timeline-marker span { width: 32px; height: 32px; display: grid; place-items: center; color: white; background: var(--blue); border: 4px solid white; border-radius: 50%; box-shadow: 0 0 0 1px var(--blue); font-size: .68rem; font-weight: 800; }
.timeline-content { padding: 17px 20px; background: #f8fafb; border-left: 3px solid var(--navy-2); }
.timeline-content time { color: var(--muted); font-size: .72rem; }
.timeline-content h3 { margin: 5px 0 4px; color: var(--navy); font-size: .98rem; font-weight: 650; }
.timeline-content p { margin: 0; color: var(--ink); font-size: .86rem; }
.movement-actor { display: block; margin-top: 10px; color: var(--muted); font-size: .72rem; }
.document-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.document-chip { display: inline-flex; align-items: center; gap: 7px; padding: 8px 10px; color: var(--navy); background: white; border: 1px solid var(--line); font-size: .76rem; }
.document-chip small { color: var(--muted); }
.document-list a.document-chip { text-decoration: none; }
.document-list a.document-chip:hover { color: var(--blue); border-color: var(--blue); }
.petition-content { padding: 24px; white-space: pre-wrap; line-height: 1.7; }
.locked-label { color: #8a5a00; font-weight: 700; }
.locked-process { min-height: 520px; background: white; border: 1px solid var(--line); }
.locked-process > p { max-width: 560px; }
.unlock-form { width: min(560px, 100%); margin: 24px auto 12px; padding: 20px; background: #f4f7f9; border: 1px solid var(--line); text-align: left; }
.unlock-form label { margin-bottom: 9px; }
.unlock-form > div { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.unlock-form input { margin: 0; }
.unlock-error { margin: 10px 0 0 !important; padding: 9px 10px; color: #8d1022; background: #fff0f2; border-left: 3px solid var(--red); font-size: .8rem; }
.back-link { margin-top: 7px; color: var(--navy); font-size: .82rem; }
.muted { color: var(--muted); }
.detail-loading { min-height: 420px; background: white; border: 1px solid var(--line); }

footer { display: flex; justify-content: space-between; gap: 30px; padding: 35px 0; color: #ced9e1; }
footer::before { content: ""; position: absolute; left: 0; right: 0; z-index: -1; height: 160px; margin-top: -35px; background: #0b2236; }
footer strong { color: white; }
footer p { margin: 5px 0 0; font-size: .8rem; }
footer > div:last-child { display: grid; text-align: right; font-size: .78rem; }

/* Login */
.login-page { min-height: 100vh; background: #0b2236; }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(440px, 1.15fr) minmax(430px, .85fr); }
.login-brand { position: relative; min-height: 100vh; display: grid; align-items: center; overflow: hidden; color: white; background: linear-gradient(145deg, rgba(10, 34, 54, .97), rgba(16, 47, 75, .9)), radial-gradient(circle at 20% 10%, #b08a3e 0, transparent 42%); }
.login-brand::before { content: ""; position: absolute; inset: -20%; opacity: .18; background: repeating-linear-gradient(135deg, transparent 0 52px, rgba(255,255,255,.12) 52px 54px); transform: rotate(-8deg); }
.login-brand::after { content: "§"; position: absolute; right: -40px; bottom: -150px; color: rgba(255,255,255,.035); font-family: Georgia, serif; font-size: 38rem; line-height: 1; }
.login-brand__overlay { position: absolute; left: 0; right: 0; bottom: 0; height: 9px; background: linear-gradient(90deg, var(--gold), #e6c878, var(--gold)); }
.login-brand__content { position: relative; z-index: 1; width: min(680px, calc(100% - 96px)); margin: auto; }
.login-brand__content > img { width: min(330px, 72%); height: auto; margin: 0 0 42px; padding: 12px 18px; background: rgba(255,255,255,.94); box-shadow: 0 15px 40px rgba(0,0,0,.2); }
.login-brand .eyebrow { color: #e3c570; }
.login-brand h1 { max-width: 620px; margin: 10px 0 18px; font-family: Georgia, serif; font-size: clamp(2.6rem, 5vw, 5rem); font-weight: 500; line-height: 1.02; }
.login-brand p { max-width: 610px; margin: 0; color: #d6e0e7; font-size: 1.05rem; }
.login-feature-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 55px; background: rgba(255,255,255,.18); }
.login-feature-list span { min-height: 106px; display: grid; align-content: center; gap: 8px; padding: 18px; color: #dfe8ed; background: rgba(6, 25, 40, .56); font-size: .78rem; }
.login-feature-list b { color: #e3c570; font-family: Georgia, serif; font-size: 1.2rem; }
.login-panel { display: grid; place-content: center; padding: 48px; background: #f4f6f8; }
.login-panel__card { width: min(470px, 100%); padding: 48px; background: white; border-top: 5px solid var(--red); box-shadow: 0 26px 80px rgba(8, 34, 54, .16); }
.login-panel__logo { width: 180px; height: 105px; object-fit: contain; margin: 0 0 28px; }
.login-panel h2 { margin: 7px 0 12px; color: var(--navy); font-family: Georgia, serif; font-size: 2rem; font-weight: 500; }
.login-panel__card > p { margin: 0 0 25px; color: var(--muted); }
.discord-button { min-height: 52px; display: flex; align-items: center; justify-content: center; gap: 11px; padding: 12px 20px; color: white; background: #5865f2; border: 1px solid #4752c4; text-decoration: none; font-weight: 750; }
.discord-button:hover { background: #4752c4; }
.discord-button svg { width: 24px; height: 24px; fill: currentColor; }
.login-security { display: flex; gap: 12px; align-items: center; margin-top: 24px; padding-top: 21px; color: var(--muted); border-top: 1px solid var(--line); }
.login-security > span { width: 34px; height: 34px; flex: none; display: grid; place-items: center; color: var(--gold); border: 1px solid var(--gold); border-radius: 50%; }
.login-security p { margin: 0; font-size: .76rem; }
.login-security strong { color: var(--navy); }
.login-disclaimer { width: min(470px, 100%); margin: 22px auto 0; color: #70808d; text-align: center; font-size: .62rem; font-weight: 700; letter-spacing: .08em; }

@media (max-width: 1100px) {
  .search-layout { grid-template-columns: 330px minmax(0, 1fr); }
  .data-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  table, thead, tbody, th, td, tr { display: block; }
  thead { position: absolute; left: -9999px; }
  tbody { padding: 10px; }
  tbody tr { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 10px; padding: 8px; border: 1px solid var(--line); }
  td { min-width: 0; padding: 10px; border: 0; }
  td::before { content: attr(data-label); display: block; margin-bottom: 5px; color: var(--muted); font-size: .65rem; font-weight: 800; text-transform: uppercase; }
  .table-action { width: auto; }
}

@media (max-width: 980px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-brand { min-height: auto; padding: 62px 0; }
  .login-brand__content { width: min(680px, calc(100% - 48px)); }
  .login-brand h1 { font-size: clamp(2.5rem, 8vw, 4.2rem); }
  .login-panel { min-height: 620px; padding: 50px 24px; }
}

@media (max-width: 780px) {
  .top-line__inner, .brand-bar, .primary-nav__inner, .page-shell, footer { width: min(100% - 28px, 1460px); }
  .top-line__inner > span:last-child, .brand-bar__meta, .heading-icon, .user-account > div { display: none; }
  .brand-bar { min-height: 92px; }
  .brand__logo { width: 70px; height: 52px; }
  .brand strong { font-size: 1.2rem; }
  .brand small { font-size: .61rem; letter-spacing: .08em; }
  .header-actions { gap: 8px; }
  .user-account { grid-template-columns: 38px 34px; gap: 6px; padding-left: 8px; }
  .user-account > img { width: 38px; height: 38px; }
  .primary-nav a { flex: 1; padding: 12px 8px; text-align: center; font-size: .72rem; }
  .search-layout { grid-template-columns: 1fr; }
  .search-panel { position: static; }
  .results-panel { min-height: 420px; }
  .empty-state { min-height: 340px; padding: 30px 20px; }
  .info-grid { grid-template-columns: 1fr; }
  .process-hero { display: grid; padding: 24px 20px; }
  .process-status { min-width: 0; }
  .anchor-nav { display: grid; }
  .service-grid, .action-panel, .judicial-forms { grid-template-columns: 1fr; }
  .archive-item { grid-template-columns: 1fr 28px; }
  .archive-item__meta { grid-column: 1; }
  .public-access { display: none; }
  .data-grid { grid-template-columns: 1fr; padding: 8px 15px 20px; }
  .party-card { grid-template-columns: 1fr; }
  .party-side { min-height: 45px; }
  .representatives { padding: 14px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .section-title { align-items: flex-start; }
  tbody tr { grid-template-columns: 1fr; }
  footer { display: grid; }
  footer > div:last-child { text-align: left; }
  .login-feature-list { grid-template-columns: 1fr; }
  .login-feature-list span { min-height: 72px; }
  .login-panel__card { padding: 32px 25px; }
}

@media print {
  .top-line, .primary-nav, .rp-warning, .breadcrumb, .anchor-nav, .button, footer { display: none !important; }
  body { background: white; }
  .brand-bar, .page-shell { width: 100%; }
  .page-shell { padding: 10px; }
  .detail-card, .process-hero { box-shadow: none; break-inside: avoid; }
}

/* Login institucional simples */
.login-page { min-height: 100vh; color: #30343a; background: #e9eef2; font-family: Arial, "Helvetica Neue", sans-serif; }
.login-topbar { color: white; background: #087ba8; box-shadow: 0 1px 4px rgba(0,0,0,.18); }
.login-topbar__inner { width: min(1180px, calc(100% - 40px)); min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: auto; }
.login-topbar__inner > span { font-size: .82rem; }
.login-system-name { display: flex; align-items: center; gap: 14px; }
.login-system-name .menu-symbol { font-size: 1.4rem; }
.login-system-name strong { font-size: 1.75rem; font-weight: 700; }
.login-system-name > span:last-child { padding-left: 14px; border-left: 1px solid rgba(255,255,255,.5); font-size: 1.05rem; }
.login-notice { padding: 7px 20px; color: #694b0b; background: #fff6cf; border-bottom: 1px solid #e6d59c; text-align: center; font-size: .69rem; font-weight: 700; }
.login-page .login-shell { width: min(980px, calc(100% - 40px)); min-height: calc(100vh - 165px); display: grid; grid-template-columns: minmax(340px, 440px) minmax(300px, 1fr); gap: 46px; align-items: center; margin: auto; padding: 48px 0; }
.login-page .login-panel { display: block; min-height: 0; padding: 0; background: transparent; }
.login-page .login-panel__card { width: 100%; padding: 36px 40px; background: white; border: 1px solid #ccd4da; border-top: 4px solid #087ba8; box-shadow: 0 8px 25px rgba(35, 57, 72, .1); }
.login-page .login-panel__logo { width: 210px; height: auto; display: block; margin: 0 auto 28px; padding: 0; object-fit: contain; background: transparent; box-shadow: none; }
.login-page .login-panel h1 { margin: 0 0 10px; color: #222; font-size: 1.55rem; font-weight: 600; }
.login-page .login-panel__card > p { margin: 0 0 24px; color: #5d6670; font-size: .9rem; line-height: 1.55; }
.login-page .discord-button { border-radius: 2px; font-family: Arial, "Helvetica Neue", sans-serif; font-weight: 600; }
.login-page .login-security > span { width: 34px; height: 34px; flex: none; display: grid; place-items: center; color: #087ba8; background: #e8f4f8; border: 0; border-radius: 50%; font-size: .8rem; }
.login-help { align-self: center; padding: 10px 0; }
.login-help h2 { margin: 0 0 12px; color: #21445d; font-size: 1.4rem; font-weight: 600; }
.login-help > p { margin: 0 0 22px; color: #525f69; line-height: 1.6; }
.login-help ul { margin: 0; padding: 0; list-style: none; border-top: 1px solid #cbd5dc; }
.login-help li { position: relative; padding: 14px 12px 14px 28px; color: #4e5962; border-bottom: 1px solid #cbd5dc; font-size: .87rem; }
.login-help li::before { content: "›"; position: absolute; left: 8px; color: #087ba8; font-size: 1.2rem; line-height: 1; }
.login-support { display: grid; gap: 3px; margin-top: 25px; padding: 14px 16px; color: #4e5962; background: #f5f8fa; border-left: 3px solid #087ba8; font-size: .8rem; }
.login-support strong { color: #21445d; }
.login-page .login-footer { width: 100%; min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 0; padding: 0 max(20px, calc((100% - 1180px) / 2)); color: #dbe6ec; background: #183b52; font-size: .75rem; }
.login-page .login-footer::before { display: none; }

@media (max-width: 780px) {
  .login-topbar__inner > span { display: none; }
  .login-system-name > span:last-child { font-size: .9rem; }
  .login-page .login-shell { width: min(100% - 28px, 980px); min-height: auto; grid-template-columns: 1fr; gap: 28px; padding: 28px 0; }
  .login-page .login-panel { max-width: 480px; width: 100%; margin: auto; }
  .login-page .login-panel__card { padding: 30px 24px; }
  .login-help { max-width: 520px; width: 100%; margin: auto; }
  .login-page .login-footer { display: grid; justify-content: center; gap: 2px; padding: 11px 20px; text-align: center; }
}
