:root {
  --ink: #182522;
  --muted: #64716d;
  --paper: #fffdf9;
  --canvas: #f3f1eb;
  --line: #dedbd2;
  --green: #174f43;
  --green-2: #246f5e;
  --lime: #c8db73;
  --coral: #e5745f;
  --amber: #c58b2d;
  --shadow: 0 18px 50px rgba(30, 48, 43, .08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}
* { box-sizing: border-box; }
html { min-height: 100%; }
body { margin: 0; min-height: 100vh; background: var(--canvas); }
a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-2); }
button, input, select { font: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.topbar { height: 76px; padding: 0 clamp(20px, 4vw, 64px); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); width: max-content; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; background: var(--green); color: #fff; font-weight: 800; font-size: 13px; letter-spacing: .08em; }
.brand strong, .brand small { display: block; line-height: 1.05; }
.brand small { color: var(--muted); font-size: 11px; margin-top: 4px; letter-spacing: .04em; text-transform: uppercase; }
.topbar nav { display: flex; align-items: center; gap: 26px; }
.topbar nav > a { font-weight: 700; }
.topbar form, .account form { margin: 0; }
.account { justify-self: end; display: flex; align-items: center; gap: 15px; color: var(--muted); font-size: 14px; }
.link-button { border: 0; background: transparent; color: var(--green); padding: 0; cursor: pointer; }
.page { width: min(1440px, calc(100% - 40px)); margin: 0 auto; padding: 54px 0 90px; }
.page-auth { width: 100%; padding: 0; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 32px; }
h1, h2 { margin: 0; letter-spacing: -.035em; }
h1 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(38px, 5vw, 64px); line-height: 1; font-weight: 500; }
h2 { font-size: 20px; }
.page-heading p, .lead { color: var(--muted); font-size: 17px; line-height: 1.6; margin: 12px 0 0; }
.eyebrow { color: var(--green-2); display: block; font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 12px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.button { display: inline-flex; min-height: 44px; padding: 0 20px; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 12px; font-weight: 750; cursor: pointer; transition: transform .15s, background .15s; }
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--green); color: white; }
.button-primary:hover { color: white; background: var(--green-2); }
.button-secondary { background: white; color: var(--green); border-color: var(--green); }
.button-quiet { background: transparent; color: var(--green); }
.button-small { min-height: 38px; padding: 0 15px; font-size: 14px; }
.button-block { width: 100%; margin-top: 25px; }
.button:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.notice { max-width: 780px; margin: 0 auto 20px; padding: 14px 18px; border-radius: 12px; font-weight: 650; }
.notice-success { background: #e0f1e8; color: #155542; }
.notice-error { background: #f9e4df; color: #873526; }
.admin-heading { align-items: center; }
.admin-form-shell { width: min(850px, 100%); margin: 0 auto; }
.admin-form-wide { width: min(1180px, 100%); }
.admin-form-card, .admin-panel { padding: clamp(24px, 3vw, 38px); }
.admin-form-card h1 { font-family: Inter, ui-sans-serif, sans-serif; font-size: clamp(36px, 5vw, 52px); font-weight: 760; letter-spacing: -.055em; }
.admin-user-table .key-configured, .key-configured { color: #155542; font-weight: 800; }
.admin-user-table .key-missing, .key-missing { color: #9a3f2e; font-weight: 800; }
.admin-edit-heading { margin-bottom: 18px; }
.admin-edit-heading h1 { font-size: clamp(38px, 4vw, 54px); }
.admin-edit-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .75fr); gap: 16px; align-items: start; }
.admin-panel { border-radius: 8px; box-shadow: none; }
.admin-panel h2 { margin-bottom: 18px; }
.admin-panel p { color: var(--muted); line-height: 1.5; }
.admin-fields { gap: 18px 16px; }
.toggle-field { display: flex; align-items: flex-end; padding-bottom: 12px; }
.toggle-field label { display: flex; align-items: center; gap: 9px; margin: 0; }
.toggle-field input { width: 18px; height: 18px; accent-color: var(--amber); }
.key-editor { padding-top: 18px; border-top: 1px solid var(--line); }
.key-state { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.panel-actions { display: flex; justify-content: flex-end; margin-top: 22px; }
.subtle-action { margin-top: 12px; text-align: right; }
.admin-security-stack { display: grid; gap: 16px; }
.admin-security-stack label:not(:first-of-type) { margin-top: 12px; }
.danger-panel { border-color: #e3b3a9; }
.button-danger { background: #a13e2e; color: white; }
.button-danger:hover { background: #842f22; color: white; }
.danger-link { color: #9a3f2e; }
.create-dossier-shell { width: min(680px, 100%); margin: 4vh auto 0; }
.create-dossier-card { padding: clamp(28px, 5vw, 50px); }
.create-dossier-card h1 { max-width: 540px; font-family: Inter, ui-sans-serif, sans-serif; font-size: clamp(34px, 5vw, 50px); font-weight: 750; letter-spacing: -.06em; }
.create-dossier-card .lead { margin-bottom: 26px; }
.status-tabs { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 5px; margin-bottom: 18px; }
.status-tabs a { white-space: nowrap; color: var(--muted); padding: 10px 14px; border-radius: 10px; font-weight: 650; font-size: 14px; }
.status-tabs a.active { background: var(--green); color: white; }
.filterbar { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.searchbox { flex: 1; }
.searchbox input { width: 100%; }
.result-count { color: var(--muted); font-size: 14px; margin-left: auto; }
input, select { width: 100%; height: 48px; border: 1px solid #cfcac0; border-radius: 11px; padding: 0 13px; background: white; color: var(--ink); outline: none; }
input:focus, select:focus { border-color: var(--green-2); box-shadow: 0 0 0 3px rgba(36,111,94,.12); }
label { display: block; font-size: 13px; font-weight: 750; margin-bottom: 7px; }
.table-card { overflow: hidden; box-shadow: none; }
.responsive-table { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { color: var(--muted); text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .09em; background: #f9f7f2; }
th, td { padding: 17px 19px; border-bottom: 1px solid #ebe8e1; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fcfbf7; }
td small, .strong-link + small { display: block; color: var(--muted); margin-top: 3px; }
.strong-link { font-weight: 800; }
.table-action { text-align: right; white-space: nowrap; font-weight: 700; }
.table-action-menu { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.table-action-menu form { margin: 0; }
.table-delete-button { padding: 0; border: 0; background: transparent; font: inherit; cursor: pointer; }
.table-delete-button:hover { text-decoration: underline; }
.table-delete-button:disabled { opacity: .55; cursor: wait; }
.empty-state { padding: 70px; text-align: center; color: var(--muted); }
.status { display: inline-flex; align-items: center; min-height: 27px; padding: 0 10px; border-radius: 99px; font-size: 12px; font-weight: 800; white-space: nowrap; background: #e9e7e1; color: #4f5956; }
.status-approved { background: #dcefe6; color: #135744; }
.status-rejected { background: #f8dfda; color: #8d3426; }
.status-premiumcalculated { background: #edf1d5; color: #586519; }
.status-submitting { background: #dfeaf4; color: #265779; }
.status-failed, .status-outcomeunknown { background: #f7ead1; color: #7b5214; }
.pagination { margin-top: 20px; display: flex; align-items: center; justify-content: center; gap: 24px; color: var(--muted); font-size: 14px; }
.pagination a { font-weight: 700; }
.pagination a.disabled { pointer-events: none; opacity: .35; }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: 1.15fr .85fr; }
.login-intro { padding: 10vw; background: linear-gradient(145deg, rgba(23,79,67,.96), rgba(30,91,76,.90)), radial-gradient(circle at top right, var(--lime), transparent 55%); color: white; display: flex; flex-direction: column; justify-content: center; }
.login-intro .eyebrow { color: var(--lime); }
.login-intro h1 { max-width: 700px; font-size: clamp(55px, 7vw, 105px); }
.login-intro p { max-width: 560px; font-size: 22px; line-height: 1.5; opacity: .8; }
.login-card { width: min(430px, calc(100% - 50px)); margin: auto; padding: 44px; }
.login-card h2 { font-size: 30px; }
.login-card .muted { color: var(--muted); margin-bottom: 30px; }
.login-card label:not(:first-of-type) { margin-top: 18px; }
.remember-device { display: flex; align-items: center; gap: 9px; margin-top: 17px; color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; }
.remember-device input { width: 17px; height: 17px; margin: 0; accent-color: var(--amber); }
.enrollment-shell { width: min(900px, 100%); margin: 3vh auto; }
.enrollment-card { padding: clamp(28px, 5vw, 58px); }
.enrollment-card h1 { font-size: clamp(42px, 6vw, 68px); }
.enrollment-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; margin-top: 35px; }
.enrollment-grid img { display: block; width: min(280px, 100%); border: 12px solid white; border-radius: 14px; }
.enrollment-grid small, .enrollment-grid code { display: block; margin-top: 9px; overflow-wrap: anywhere; }
.validation { display: block; color: #a83b2b; font-size: 12px; margin-top: 5px; }
.wizard-shell { width: min(1040px, 100%); margin: 0 auto; }
.wizard-shell.narrow { width: min(840px, 100%); }
.wizard-header { text-align: center; margin-bottom: 25px; }
.wizard-header .back-link { float: left; }
.wizard-header p { color: var(--muted); font-size: 12px; }
.progress-track { width: min(360px, 70%); display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; margin: 16px auto 0; }
.progress-track span { height: 5px; border-radius: 99px; background: #d9d6ce; }
.progress-track span.done { background: var(--green); }
.wizard-card { padding: clamp(28px, 5vw, 62px); }
.wizard-card > h1 { font-size: clamp(38px, 5vw, 60px); max-width: 780px; }
.wizard-card > .lead { max-width: 720px; margin-bottom: 38px; }
.wizard-card hr { border: 0; border-top: 1px solid var(--line); margin: 38px 0; }
.wizard-card > h2 { margin: 24px 0 18px; }
.form-grid { display: grid; gap: 22px 18px; }
.form-grid.three { grid-template-columns: repeat(3, 1fr); }
.form-grid.two { grid-template-columns: repeat(2, 1fr); }
.span-2 { grid-column: span 2; }
.field-help { display: block; color: var(--muted); margin-top: 6px; line-height: 1.4; }
.wizard-actions { display: flex; justify-content: space-between; align-items: center; gap: 15px; border-top: 1px solid var(--line); margin-top: 44px; padding-top: 24px; }
.wizard-actions-end { justify-content: flex-end; }
.question-card { position: relative; padding: 28px 28px 28px 78px; border: 1px solid var(--line); border-radius: 16px; margin-top: 16px; }
.question-card p { color: var(--muted); line-height: 1.6; }
.question-number { position: absolute; left: 24px; top: 27px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--green); color: white; font-weight: 800; font-size: 12px; }
.choice { display: flex; gap: 12px; margin-top: 20px; }
.choice label { min-width: 105px; border: 1px solid var(--line); border-radius: 11px; padding: 12px 15px; margin: 0; cursor: pointer; }
.choice input { width: auto; height: auto; margin-right: 8px; }
.review-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.review-grid article { border: 1px solid var(--line); border-radius: 15px; padding: 22px; }
.review-grid header { display: flex; justify-content: space-between; gap: 15px; }
.review-grid header a { font-size: 13px; font-weight: 700; }
.review-grid p { color: var(--muted); line-height: 1.6; margin-bottom: 0; }
.review-grid strong { color: var(--ink); }
.premium-panel { margin-top: 20px; border-radius: 16px; padding: 22px; background: #eeeae1; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.premium-panel.valid { background: #e5f0cc; }
.premium-panel strong, .premium-panel small { display: block; }
.premium-panel strong { font-family: Georgia, serif; font-size: 38px; font-weight: 500; }
.premium-panel small { margin-top: 4px; color: var(--muted); }
.back-link { display: inline-block; margin-bottom: 20px; color: var(--muted); font-size: 14px; font-weight: 700; }
.detail-heading { align-items: center; }
.detail-heading h1 { margin-bottom: 16px; }
.detail-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 18px; }
.detail-grid .card { padding: 30px; box-shadow: none; }
.summary-card { grid-row: span 2; }
.data-list { margin: 24px 0 0; }
.data-list > div { display: flex; justify-content: space-between; gap: 30px; border-bottom: 1px solid #ebe8e1; padding: 13px 0; }
.data-list dt { color: var(--muted); font-size: 13px; }
.data-list dd { margin: 0; text-align: right; font-weight: 650; }
.data-list.compact > div { display: block; }
.data-list.compact dd { text-align: left; margin-top: 4px; line-height: 1.5; }
.callout { border-radius: 12px; margin-top: 22px; padding: 17px; }
.callout p { margin-bottom: 0; }
.callout-danger { background: #f8dfda; color: #782e22; }
.callout-warning { background: #f7ead1; color: #6f4a11; }
.history-card, .technical-card { margin-top: 18px; padding: 30px; box-shadow: none; }
.timeline { list-style: none; padding: 0; margin: 25px 0 0; }
.timeline li { display: grid; grid-template-columns: 18px 1fr; gap: 15px; position: relative; padding-bottom: 23px; }
.timeline li > span { width: 11px; height: 11px; border-radius: 50%; background: var(--green); margin-top: 5px; }
.timeline li:not(:last-child)::before { content: ""; position: absolute; left: 5px; top: 17px; bottom: 0; border-left: 1px solid var(--line); }
.timeline p { margin: 3px 0; color: var(--muted); }
.timeline small { color: var(--muted); }
.technical-card summary { font-weight: 800; cursor: pointer; }
.attempt { display: grid; gap: 5px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.attempt code { color: var(--muted); }
@media (max-width: 900px) {
  .topbar { grid-template-columns: 1fr auto; }
  .topbar nav > a, .account > span { display: none; }
  .account { display: none; }
  .login-shell { grid-template-columns: 1fr; }
  .enrollment-grid { grid-template-columns: 1fr; }
  .login-intro { min-height: 42vh; padding: 50px 30px; }
  .login-intro h1 { font-size: 52px; }
  .login-card { margin: 40px auto; }
  .detail-grid { grid-template-columns: 1fr; }
  .admin-edit-grid { grid-template-columns: 1fr; }
  .summary-card { grid-row: auto; }
  .form-grid.three { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .page { width: min(100% - 24px, 1440px); padding-top: 30px; }
  .topbar { padding: 0 14px; }
  .brand small { display: none; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .page-heading h1 { font-size: 46px; }
  .filterbar { flex-wrap: wrap; }
  .searchbox { flex-basis: 100%; }
  .result-count { display: none; }
  .wizard-header .back-link { float: none; display: block; }
  .wizard-card { padding: 24px 18px; }
  .form-grid.three, .form-grid.two, .review-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .wizard-actions { align-items: stretch; flex-direction: column-reverse; }
  .wizard-actions .button, .wizard-actions form, .wizard-actions form .button { width: 100%; }
  .premium-panel { align-items: stretch; flex-direction: column; }
  .premium-panel .button { width: 100%; }
  .question-card { padding: 70px 20px 24px; }
  .question-number { top: 20px; left: 20px; }
  .choice label { flex: 1; }
}

/* Mangotree portal theme: deliberately quiet, editorial and task-focused. */
:root {
  --ink: #153d5b;
  --muted: #627381;
  --paper: #ffffff;
  --canvas: #f4f6f5;
  --line: #dbe2e5;
  --green: #164665;
  --green-2: #0d3551;
  --lime: #f2a20b;
  --coral: #d85e4c;
  --amber: #ef9700;
  --shadow: 0 16px 44px rgba(21, 61, 91, .09);
}

body { background: var(--canvas); }
a { color: var(--green); }
a:hover { color: var(--amber); }

.topbar {
  height: 70px;
  background: rgba(255,255,255,.94);
  border-bottom-color: rgba(21,61,91,.12);
  backdrop-filter: blur(14px);
  box-shadow: 0 2px 18px rgba(21,61,91,.03);
}
.brand { gap: 11px; }
.brand-mark {
  width: 43px;
  height: 43px;
  border-radius: 50% 50% 50% 10px;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
}
.brand-mark img { width: 100%; height: 100%; display: block; object-fit: contain; }
.brand strong { color: var(--green); font-size: 19px; letter-spacing: -.04em; }
.brand small { color: var(--muted); font-size: 9px; letter-spacing: .1em; }
.topbar nav { gap: 28px; }
.topbar nav > a { color: var(--ink); font-size: 14px; }
.account { color: var(--muted); }
.partner-brand { display: inline-flex; align-items: center; gap: 6px; padding-right: 15px; margin-right: 2px; border-right: 1px solid var(--line); }
.partner-brand small { color: var(--muted); font-size: 9px; white-space: nowrap; }
.partner-brand img { display: block; width: 136px; height: 31px; object-fit: contain; }
.link-button { color: var(--muted); font-weight: 700; }

.page { padding-top: 18px; padding-bottom: 18px; }
.page-heading { margin-bottom: 24px; }
.page-heading h1, .wizard-card > h1, .enrollment-card h1 {
  color: var(--green);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-weight: 740;
  letter-spacing: -.065em;
}
.page-heading h1 { font-size: clamp(42px, 5.1vw, 70px); }
.page-heading p, .lead { max-width: 620px; color: var(--muted); }
.eyebrow { color: var(--amber); font-size: 10px; letter-spacing: .16em; }

.card { border-radius: 8px; border-color: var(--line); box-shadow: var(--shadow); }
.button { border-radius: 5px; min-height: 46px; font-size: 14px; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.button:hover { transform: translateY(-2px); box-shadow: 0 7px 16px rgba(21,61,91,.16); }
.button-primary { background: var(--amber); color: white; }
.button-primary:hover { background: #dc8500; color: white; }
a.button.button-primary, a.button.button-primary:visited, a.button.button-primary:hover, a.button.button-primary:focus { color: white; }
.button-secondary { background: white; border-color: #bac8d0; color: var(--green); }
.button-quiet { color: var(--green); }

.status-tabs { gap: 5px; margin-bottom: 12px; }
.status-tabs a { border: 1px solid transparent; border-radius: 4px; color: var(--muted); font-size: 12px; padding: 9px 12px; }
.status-tabs a:hover { border-color: #cfd9dd; color: var(--green); }
.status-tabs a.active { background: var(--green); color: white; }
.filterbar { padding: 9px; margin-bottom: 12px; background: white; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(21,61,91,.04); }
input, select { border-radius: 5px; border-color: #c7d2d8; }
input:focus, select:focus { border-color: var(--amber); box-shadow: 0 0 0 3px rgba(239,151,0,.15); }
th { background: #eff3f4; color: #536975; }
th, td { border-bottom-color: #e4eaec; }
tbody tr { transition: background .18s ease; }
tbody tr:hover { background: #f8faf9; }
.table-card { border-radius: 8px; }
.strong-link { color: var(--green); }
.status { border-radius: 3px; font-size: 11px; letter-spacing: .015em; }
.status-approved { background: #dff0e7; color: #176141; }
.status-rejected { background: #fae1dc; color: #a13e2d; }
.status-premiumcalculated { background: #fff0cc; color: #8a5900; }
.status-submitting { background: #dceaf4; color: #1c5c85; }
.status-failed, .status-outcomeunknown { background: #f9e7cb; color: #8a5900; }
.load-more { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 58px; color: var(--muted); font-size: 12px; }
.load-more.is-loading .button { pointer-events: none; opacity: .65; }
.load-more.is-loading .button::after { content: "…"; }

.wizard-shell { width: min(1080px, 100%); }
.wizard-header { text-align: left; margin: 0 0 10px; padding: 0 0 10px; border-bottom: 1px solid var(--line); }
.wizard-header .back-link { float: none; margin: 0 0 9px; }
.back-link-button { padding: 0; border: 0; background: transparent; cursor: pointer; }
.wizard-header .eyebrow { margin: 0 0 7px; }
.wizard-step-title { margin: 0; color: var(--green); font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-size: clamp(21px, 2.2vw, 29px); font-weight: 720; line-height: 1.05; letter-spacing: -.055em; }
.wizard-header p { margin: 6px 0 0; color: var(--muted); font-size: 11px; }
.progress-track { width: min(420px, 100%); grid-template-columns: repeat(6, 1fr); margin: 9px 0 0; gap: 3px; }
.progress-track span { height: 4px; border-radius: 0; background: #dce3e4; }
.progress-track span.done { background: var(--amber); }
.wizard-card { border-radius: 8px; padding: clamp(21px, 2vw, 30px); animation: portal-enter .42s cubic-bezier(.2,.75,.25,1) both; }
.wizard-card > h1 { max-width: none; font-size: clamp(33px, 3.4vw, 48px); line-height: 1.04; }
.wizard-card > .lead { margin: 9px 0 20px; font-size: 15px; line-height: 1.45; }
.wizard-card h2 { color: var(--green); }
.wizard-actions { border-top-color: var(--line); }
.form-grid { gap: 12px 18px; }
label { color: var(--green); font-size: 12px; letter-spacing: .015em; }
.wizard-card label { margin-bottom: 5px; }
.wizard-card input, .wizard-card select { height: 44px; }
.wizard-card input:invalid, .wizard-card select:invalid { border-color: #d85e4c; }
.wizard-actions { margin-top: 14px; padding-top: 12px; }
.field-help { color: var(--muted); font-size: 12px; }
.question-card { border-radius: 7px; border-color: var(--line); background: #fbfcfc; transition: transform .2s ease, box-shadow .2s ease; }
.question-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(21,61,91,.07); }
.question-number { border-radius: 4px; background: var(--green); }
.choice label { border-radius: 4px; background: white; transition: border .16s ease, background .16s ease; }
.choice label:has(input:checked) { background: #fff6e5; border-color: var(--amber); }
.choice input { accent-color: var(--amber); }
.review-grid article { border-radius: 6px; border-color: var(--line); background: #fbfcfc; padding: 16px 21px; }
.review-grid header h2 { font-size: 16px; }
.review-grid p { line-height: 1.45; }
.premium-panel { border-radius: 7px; background: var(--green); color: white; padding: 28px; }
.premium-panel .eyebrow, .premium-panel small { color: rgba(255,255,255,.7); }
.premium-panel strong { color: white; font-family: Inter, ui-sans-serif, sans-serif; font-size: 44px; font-weight: 760; letter-spacing: -.06em; }
.premium-panel.valid { background: var(--green); }
.premium-panel .button-secondary { border-color: white; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.review-card { padding: 21px 30px 18px; }
.review-card > h1 { font-size: clamp(34px, 3vw, 43px); }
.review-card > .lead { margin-bottom: 14px; }
.review-card .review-grid { gap: 10px 14px; }
.review-card .review-grid article { padding: 13px 18px; }
.review-card .review-grid p { margin-top: 8px; font-size: 14px; line-height: 1.38; }
.review-grid .premium-panel { width: auto; min-height: 0; margin: 0; padding: 14px 18px; display: flex; flex-direction: row; align-items: center; justify-content: space-between; }
.review-grid .premium-panel .eyebrow { margin: 0; }
.review-grid .premium-panel strong { font-size: 36px; white-space: nowrap; }
.premium-calculation-status { display: none; align-items: center; gap: 11px; margin: 10px 0; color: rgba(255,255,255,.82); font-size: 14px; }
.premium-calculation-status.is-visible { display: flex; }
.premium-calculation-status.is-error { color: #ffe1dc; }
.premium-spinner { width: 18px; height: 18px; flex: 0 0 18px; border: 2px solid rgba(255,255,255,.34); border-top-color: white; border-radius: 50%; animation: premium-spin .8s linear infinite; }
.premium-calculation-status.is-error .premium-spinner { display: none; }
.review-actions { margin-top: 10px; padding-top: 10px; }
.review-actions form { margin: 0; }
.acceptance-card > .lead { margin-bottom: 14px; }
.acceptance-question { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; column-gap: 18px; align-items: center; padding: 16px 20px; margin-top: 10px; }
.acceptance-question .question-number { position: static; width: 36px; height: 34px; }
.acceptance-question h2 { font-size: 17px; }
.acceptance-question p { margin: 4px 0 0; font-size: 14px; line-height: 1.35; }
.question-title { display: flex; align-items: center; gap: 8px; }
.question-info { position: relative; }
.question-info summary { width: 20px; height: 20px; display: grid; place-items: center; border: 1px solid var(--green); border-radius: 50%; color: var(--green); font-family: Georgia, serif; font-size: 13px; font-weight: 700; line-height: 1; cursor: pointer; list-style: none; }
.question-info summary::-webkit-details-marker { display: none; }
.question-info summary:hover, .question-info[open] summary { background: var(--green); color: white; }
.question-info > div { position: absolute; z-index: 5; left: 28px; top: -8px; width: min(430px, calc(100vw - 90px)); padding: 13px 15px; border: 1px solid var(--line); border-radius: 6px; background: white; color: var(--ink); box-shadow: 0 12px 30px rgba(7,34,51,.18); font-size: 13px; line-height: 1.5; }
.acceptance-question .choice { gap: 7px; margin: 0; }
.acceptance-question .choice label { min-width: 74px; padding: 9px 10px; text-align: center; }
.acceptance-question .choice input { margin-right: 5px; }
.acceptance-question > .validation { grid-column: 2 / -1; margin: 0; }
@keyframes premium-spin { to { transform: rotate(360deg); } }

.detail-heading h1 { font-size: clamp(38px, 4.7vw, 64px); }
.detail-grid .card, .history-card, .technical-card { border-radius: 8px; }
.data-list > div { border-bottom-color: #e5eaeb; }
.detail-heading { margin-bottom: 14px; }
.detail-heading .back-link { margin-bottom: 9px; }
.detail-heading .eyebrow { margin-bottom: 7px; }
.detail-heading h1 { margin-bottom: 8px; font-size: clamp(35px, 3.8vw, 48px); }
.detail-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.detail-overview .card { padding: 17px 22px; }
.detail-overview .summary-card { grid-row: auto; }
.detail-overview .data-list { margin-top: 10px; }
.detail-overview .data-list > div { min-width: 0; padding: 7px 0; }
.detail-overview .data-list.compact > div { display: flex; align-items: baseline; justify-content: space-between; }
.detail-overview .data-list.compact dd { min-width: 0; margin: 0; text-align: right; line-height: 1.35; overflow-wrap: anywhere; }
.detail-secondary { display: flex; gap: 12px; }
.detail-secondary > * { flex: 1; }
.compact-history { margin-top: 12px; padding: 15px 20px; }
.compact-history summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; font-weight: 800; cursor: pointer; }
.compact-history summary span { color: var(--muted); font-size: 12px; font-weight: 600; }
.compact-history .timeline { margin-top: 18px; }
@media (max-width: 900px) {
  .detail-overview { grid-template-columns: 1fr; }
  .detail-secondary { flex-direction: column; }
}
.timeline li > span { background: var(--amber); }
.timeline li:not(:last-child)::before { border-left-color: #d6e0e2; }
.notice { border-radius: 6px; }

.login-shell { background: var(--canvas); }
.login-intro { background: var(--green); position: relative; overflow: hidden; }
.login-intro::after { display: none; }
.login-intro > * { position: relative; z-index: 1; }
.login-intro .eyebrow { color: #ffd67e; }
.login-brand { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 34px; color: white; }
.login-brand img { width: 56px; height: 56px; object-fit: contain; background: white; border-radius: 50%; padding: 3px; }
.login-brand strong, .login-brand small { display: block; }
.login-brand strong { font-size: 23px; letter-spacing: -.04em; }
.login-brand small { margin-top: 2px; color: #ffd67e; font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.login-intro h1 { max-width: 660px; font-family: Inter, ui-sans-serif, sans-serif; font-size: clamp(46px, 4.3vw, 72px); font-weight: 750; letter-spacing: -.07em; }
.login-intro h1 span { display: block; }
.login-panel { display: grid; place-items: center; align-content: center; gap: 62px; }
.login-panel .login-card { margin: 0; }
.login-powered { display: inline-flex; align-items: center; gap: 9px; width: max-content; padding: 7px 10px; border-radius: 5px; background: rgba(255,255,255,.96); }
.login-powered span { color: var(--muted); font-size: 9px; white-space: nowrap; }
.login-powered img { width: 123px; height: 28px; object-fit: contain; }
.login-tree { position: absolute; z-index: 0; width: min(55vw, 780px); height: auto; left: 102%; top: 86%; pointer-events: none; transform: translate(-50%, -50%); opacity: .97; }
.login-leaf-layer { position: absolute; z-index: 2; inset: 0; pointer-events: none; }
.login-leaf { position: absolute; width: var(--leaf-size); height: calc(var(--leaf-size) * .62); border-radius: 100% 0 100% 0; background: var(--amber); opacity: .88; transform: translate(-50%, -50%) rotate(var(--leaf-rotation)); animation: leaf-fall var(--leaf-duration) cubic-bezier(.22,.75,.3,1) forwards; }
@keyframes leaf-fall { to { opacity: 0; transform: translate(calc(-50% + var(--leaf-drift)), calc(-50% + 140px)) rotate(calc(var(--leaf-rotation) + 130deg)); } }
.login-card { border-radius: 8px; }

@keyframes portal-enter { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.page-heading, .table-card, .detail-grid, .history-card { animation: portal-enter .4s ease both; }
.table-card { animation-delay: .06s; }
.notice-fade { opacity: 0; transform: translateY(-8px); transition: opacity .35s ease, transform .35s ease; }
.confirm-dialog { width: min(470px, calc(100% - 32px)); margin: auto; padding: 0; border: 0; border-radius: 8px; color: var(--ink); box-shadow: 0 24px 70px rgba(7,34,51,.3); }
.confirm-dialog::backdrop { background: rgba(12,37,53,.48); backdrop-filter: blur(3px); }
.confirm-dialog-content { padding: 34px; background: var(--paper); }
.confirm-dialog h2 { margin: 0; color: var(--green); font-size: 29px; letter-spacing: -.05em; }
.confirm-dialog p { margin: 13px 0 0; color: var(--muted); line-height: 1.55; }
.dialog-field { margin-top: 22px; }
.confirm-dialog input { margin-top: 4px; }
.confirm-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 28px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media (max-width: 620px) {
  .topbar { height: 70px; }
  .brand strong { font-size: 17px; }
  .brand small { display: none; }
  .wizard-header { padding-bottom: 17px; }
  .wizard-step-title { font-size: 25px; }
  .premium-panel strong { font-size: 36px; }
  .review-card { padding: 21px 18px 18px; }
  .review-grid .premium-panel { min-height: 110px; }
  .acceptance-question { grid-template-columns: 36px 1fr; row-gap: 8px; }
  .acceptance-question .choice { grid-column: 2; }
  .acceptance-question > .validation { grid-column: 2; }
  .partner-brand { display: none; }
  .login-powered { margin-top: 20px; }
  .login-panel { gap: 28px; }
  .login-tree { display: none; }
  .confirm-dialog-content { padding: 25px; }
  .confirm-dialog-actions { align-items: stretch; flex-direction: column-reverse; }
  .confirm-dialog-actions .button { width: 100%; }
}

@media (min-width: 900px) {
  body:has(.login-shell) { overflow: hidden; }
  .page.page-auth { width: 100%; height: 100vh; padding: 0; overflow: hidden; }
  .login-shell { height: 100vh; min-height: 0; }
  .page:has(.table-card) { height: calc(100vh - 70px); overflow: hidden; display: flex; flex-direction: column; }
  .page:has(.table-card) .table-card { min-height: 0; flex: 1; display: flex; }
  .page:has(.table-card) .responsive-table { width: 100%; overflow: auto; }
  .page:has(.table-card) thead th { position: sticky; top: 0; z-index: 1; }
}
