:root {
  color-scheme: light;
  --background: #f4f6fa;
  --border: #e5e9f1;
  --card: #ffffff;
  --ink: #172033;
  --muted: #69748a;
  --navy: #111827;
  --navy-soft: #1d2738;
  --primary: #2457d6;
  --primary-light: #eef4ff;
  --gold: #bf8a28;
  --shadow: 0 16px 40px rgba(21, 31, 51, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--background);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--background);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.login-view {
  min-height: 100vh;
  padding: 32px 20px;
  background:
    radial-gradient(circle at 18% 15%, rgba(69, 120, 237, 0.28), transparent 30%),
    linear-gradient(135deg, #0f1727, #14213a 58%, #183d91);
}

.login-view:not([hidden]) {
  display: grid;
  place-items: center;
}

.login-card {
  width: min(100%, 440px);
  padding: 36px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(3, 9, 22, 0.36);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 34px;
}

.login-brand strong,
.login-brand small {
  display: block;
}

.login-brand strong {
  color: var(--ink);
  font-size: 1.1rem;
}

.login-brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.72rem;
}

.login-card h1 {
  margin: 9px 0 9px;
  font-size: clamp(1.7rem, 5vw, 2.15rem);
  letter-spacing: -0.045em;
}

.login-card > p {
  margin: 0 0 26px;
  color: var(--muted);
  line-height: 1.55;
}

.login-field {
  display: grid;
  gap: 8px;
  color: #3f4a5f;
  font-size: 0.78rem;
  font-weight: 750;
}

.password-shell {
  position: relative;
  display: flex;
}

.password-shell input {
  width: 100%;
  min-height: 50px;
  padding: 0 84px 0 14px;
  border: 1px solid #dce2ec;
  border-radius: 11px;
  color: var(--ink);
  background: #fbfcfe;
}

.password-shell input:focus {
  border-color: #6d93ed;
  background: #fff;
}

.password-shell button {
  position: absolute;
  inset: 5px 6px 5px auto;
  padding: 0 9px;
  border: 0;
  color: var(--primary);
  background: transparent;
  font-size: 0.72rem;
  font-weight: 800;
}

.login-button {
  width: 100%;
  min-height: 48px;
  margin-top: 18px;
}

.turnstile-container {
  min-height: 65px;
  margin-top: 16px;
}

.login-error {
  margin-top: 12px;
}

.login-security {
  display: block;
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.68rem;
  text-align: center;
}

.logout-button {
  min-height: 36px;
  padding: 0 12px;
  font-size: 0.75rem;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(36, 87, 214, 0.22);
  outline-offset: 2px;
}

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

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  display: flex;
  width: 264px;
  flex-direction: column;
  color: #e7ebf4;
  background: var(--navy);
  box-shadow: 12px 0 30px rgba(9, 14, 26, 0.08);
}

.brand {
  display: flex;
  min-height: 82px;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(145deg, #2f69ee, #153b9c);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  color: #fff;
  font-size: 1.08rem;
}

.brand small {
  margin-top: 2px;
  color: #98a3b8;
  font-size: 0.72rem;
}

.sidebar-label {
  padding: 24px 20px 10px;
  color: #7f8ba1;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.calculator-menu {
  display: flex;
  overflow: auto;
  flex: 1;
  flex-direction: column;
  gap: 3px;
  padding: 0 12px 24px;
}
.help-menu-button { display:flex; align-items:center; gap:10px; margin:0 12px 14px; padding:11px 13px; border:1px solid #ffffff1f; border-radius:10px; color:#dce5f5; background:#ffffff0a; font:inherit; font-size:.8rem; text-align:left; }
.help-menu-button[hidden] { display:none !important; }
.help-menu-button:hover { background:#2457d6; }
.help-view { padding-bottom:40px; }
.help-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:24px; }
.help-heading h1 { margin:6px 0; font-size:2rem; }
.help-heading p { margin:0; color:var(--muted); }
.help-card progress { width:100%; accent-color:#2457d6; }
.help-filters { display:grid; grid-template-columns:2fr repeat(3,1fr); gap:10px; margin:24px 0; }
.help-filters label,.help-support-dialog label { display:grid; gap:6px; color:#566176; font-size:.72rem; font-weight:700; }
.help-filters input,.help-filters select,.help-support-dialog input,.help-support-dialog select,.help-support-dialog textarea { width:100%; min-height:42px; padding:8px 10px; border:1px solid var(--border); border-radius:9px; background:#fff; font:inherit; }
.help-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
.help-card { display:grid; gap:12px; padding:20px; border:1px solid var(--border); border-radius:16px; background:#fff; box-shadow:0 8px 24px #14213d0a; }
.help-card.featured { grid-column:span 2; border-color:#9eb9f8; background:linear-gradient(135deg,#f7faff,#eef4ff); box-shadow:0 14px 34px #2457d617; }
.help-featured-label { margin-right:auto; padding:4px 7px; border-radius:999px; color:#fff; background:#2457d6; font-weight:800; }
.help-card h3,.help-card p { margin:0; }
.help-card p { color:var(--muted); font-size:.78rem; line-height:1.5; }
.help-card-meta,.help-card-status { display:flex; flex-wrap:wrap; justify-content:space-between; gap:8px; color:#68758c; font-size:.68rem; }
.help-chip { padding:4px 7px; border-radius:999px; color:#1d4ed8; background:#eff6ff; font-weight:800; }
.help-empty { padding:50px 20px; border:1px dashed #cbd3e0; border-radius:16px; text-align:center; color:var(--muted); }
.help-video-dialog,.help-support-dialog { width:min(760px,calc(100% - 28px)); border:0; border-radius:20px; padding:28px; box-shadow:0 28px 90px #07102077; }
.help-video-dialog::backdrop,.help-support-dialog::backdrop { background:#071020aa; }
.help-video-frame { overflow:hidden; aspect-ratio:16/9; border-radius:12px; background:#000; }
.help-video-frame iframe { width:100%; height:100%; border:0; }
.help-video-actions { display:flex; gap:10px; margin-top:16px; }
.help-support-dialog form { display:grid; gap:12px; }
.help-support-dialog textarea { min-height:130px; resize:vertical; }
.help-form-status { min-height:20px; margin:0; color:var(--muted); font-size:.8rem; line-height:1.45; }
.help-form-status.error { color:#a52a2a; }
.help-form-status.success { color:#167047; font-weight:750; }
.help-sensitive-warning { margin:0; padding:10px 12px; border-radius:9px; color:#735c20; background:#fffbeb; font-size:.7rem; line-height:1.45; }
.help-honeypot { position:absolute!important; left:-9999px!important; }
.menu-section { display:grid; gap:6px; }
.menu-section + .menu-section { margin-top:18px; padding-top:14px; border-top:1px solid rgba(255,255,255,.12); }
.locked-catalog-section { margin-top:38px; padding-top:8px; }
.locked-legend { color:#7b8497; font-size:13px; font-weight:650; }

.menu-item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  color: #aeb8ca;
  background: transparent;
  font-size: 0.78rem;
  text-align: left;
}

.menu-item:hover {
  color: #fff;
  background: var(--navy-soft);
}

.menu-item.active {
  color: #fff;
  background: #2457d6;
}

.menu-item.locked .available-dot {
  color: #f2b84b;
}

.calculator-card.locked {
  opacity: 0.72;
}

.badge.locked {
  color: #8a5a00;
  background: #fff7df;
}

.available-dot {
  color: #42c87a;
  font-size: 0.5rem;
}

.sidebar-footer {
  display: grid;
  gap: 10px;
  margin: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: #aeb8ca;
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.75rem;
}

.product-signature { display:flex; align-items:center; gap:9px; }
.product-signature span { color:#aeb8ca; font-size:.62rem; line-height:1.35; }
.product-signature strong { color:#fff; font-size:.68rem; }
.system-meta { display:flex; align-items:center; justify-content:space-between; gap:8px; padding-top:9px; border-top:1px solid rgba(255,255,255,.08); color:#8793a8; font-size:.6rem; }
.system-meta>span { display:flex; align-items:center; gap:6px; }
.system-meta strong { color:#cbd3e0; }

.security-dot {
  display:inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #42c87a;
  box-shadow: 0 0 0 4px rgba(66, 200, 122, 0.12);
}

.main {
  min-height: 100vh;
  margin-left: 264px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  min-height: 82px;
  align-items: center;
  gap: 16px;
  padding: 0 32px;
  border-bottom: 1px solid rgba(222, 227, 237, 0.9);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
}

.topbar-title {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
  padding: 0;
  border: 0;
  color: var(--ink);
  background: transparent;
  text-align: left;
}

.topbar-title strong {
  font-size: 0.95rem;
}

.topbar-title span {
  color: var(--muted);
  font-size: 0.72rem;
}

.icon-button,
.text-button,
.primary-button,
.secondary-button,
.back-button {
  min-height: 40px;
  border-radius: 11px;
}

.icon-button {
  display: none;
  width: 40px;
  border: 1px solid var(--border);
  color: var(--ink);
  background: #fff;
}

.text-button {
  padding: 0 16px;
  border: 1px solid var(--border);
  color: var(--ink);
  background: #fff;
}

.primary-button {
  padding: 0 19px;
  border: 1px solid var(--primary);
  color: #fff;
  background: var(--primary);
  font-weight: 700;
}

.secondary-button,
.back-button {
  padding: 0 16px;
  border: 1px solid var(--border);
  color: var(--ink);
  background: #fff;
  font-weight: 700;
}

.test-badge,
.available-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border-radius: 999px;
  color: #166534;
  background: #ecfdf3;
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.test-badge span {
  color: #22a95f;
  font-size: 0.55rem;
}

.content {
  width: min(1320px, calc(100% - 64px));
  margin: 0 auto;
  padding: 32px 0 54px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(250px, 0.7fr);
  gap: 28px;
  padding: 36px;
  border-radius: 22px;
  color: #fff;
  background:
    radial-gradient(circle at 82% 20%, rgba(106, 157, 255, 0.36), transparent 32%),
    linear-gradient(125deg, #133d9f, #245dd9 62%, #3877ec);
  box-shadow: 0 20px 46px rgba(35, 82, 189, 0.2);
}

.eyebrow {
  color: #c9dcff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.eyebrow.dark {
  color: var(--primary);
}

.hero h1 {
  max-width: 720px;
  margin: 10px 0 12px;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.hero p {
  max-width: 660px;
  margin: 0;
  color: #dce8ff;
  line-height: 1.6;
}

.hero-status {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  background: rgba(10, 34, 91, 0.24);
}

.hero-status span,
.hero-status small {
  color: #cedcff;
}

.hero-status strong {
  margin: 4px 0 10px;
  font-size: 1.35rem;
}

.hero-status small {
  line-height: 1.5;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 26px 0 30px;
}

.search {
  display: flex;
  width: min(520px, 100%);
  align-items: center;
  gap: 10px;
  padding: 0 15px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(27, 39, 65, 0.04);
}

.search span {
  color: var(--muted);
  font-size: 1.4rem;
}

.search input {
  width: 100%;
  min-height: 48px;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
}

.counter {
  color: var(--muted);
  font-size: 0.78rem;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.section-heading h2 {
  margin: 6px 0 0;
  font-size: 1.35rem;
  letter-spacing: -0.025em;
}

.locked-legend {
  color: var(--muted);
  font-size: 0.75rem;
}

.available-legend {
  color: var(--muted);
  font-size: 0.75rem;
}

.available-legend span {
  margin-right: 5px;
  color: #22a95f;
}

.calculator-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.calculator-card {
  display: grid;
  min-height: 112px;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 17px;
  color: var(--ink);
  background: var(--card);
  box-shadow: 0 10px 30px rgba(21, 31, 51, 0.045);
  text-align: left;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.calculator-card.locked {
  grid-template-columns: 46px minmax(0, 1fr) auto;
}

.calculator-card:hover {
  border-color: #cbd7ef;
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.calculator-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 13px;
  color: var(--primary);
  background: var(--primary-light);
  font-size: 1.25rem;
  font-weight: 800;
}

.calculator-copy {
  min-width: 0;
}

.calculator-copy strong,
.calculator-copy small {
  display: block;
}

.calculator-copy strong {
  overflow: hidden;
  margin: 3px 0 6px;
  font-size: 0.87rem;
  text-overflow: ellipsis;
}

.calculator-copy small {
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.35;
}

.calculator-copy .calculator-category {
  color: var(--primary);
  font-size: 0.61rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.badge {
  padding: 5px 8px;
  border-radius: 999px;
  color: #96691a;
  background: #fff6df;
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
}

.badge.available {
  color: #166534;
  background: #ecfdf3;
}

.calculator-view {
  max-width: 1120px;
  margin: 0 auto;
}

.back-button {
  min-height: 36px;
  margin-bottom: 18px;
  padding: 0;
  border: 0;
  color: var(--primary);
  background: transparent;
}

.calculator-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.calculator-heading h1 {
  margin: 6px 0 8px;
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  letter-spacing: -0.04em;
}

.calculator-heading p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.calculation-card,
.results {
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(21, 31, 51, 0.055);
}

.results {
  margin-top: 22px;
  scroll-margin-top: 105px;
}

.form-heading > div,
.results-heading > div:first-child {
  display: flex;
  align-items: center;
  gap: 12px;
}

.form-heading h2,
.results-heading h2 {
  margin: 0;
  font-size: 1.15rem;
}

.form-heading p,
.results-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.step-number {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: var(--primary);
  font-size: 0.82rem;
  font-weight: 800;
}

.form-sections {
  display: grid;
  gap: 22px;
  margin-top: 24px;
}

.form-section {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: #fbfcfe;
}

.form-section-heading h3 {
  margin: 0;
  font-size: 0.95rem;
}

.form-section-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.74rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 17px;
}

.field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.field-label {
  color: #3f4a5f;
  font-size: 0.75rem;
  font-weight: 750;
}

.input-shell {
  position: relative;
  display: flex;
  align-items: center;
}

.field input {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid #dce2ec;
  border-radius: 11px;
  color: var(--ink);
  background: #fbfcfe;
}

.field input:focus {
  border-color: #6d93ed;
  background: #fff;
}

.input-shell:has(.input-suffix) input {
  padding-right: 42px;
}

.input-suffix {
  position: absolute;
  right: 13px;
  color: var(--muted);
  font-size: 0.78rem;
  pointer-events: none;
}

.money-list-field {
  grid-column: 1 / -1;
}

.award-list-field { grid-column: 1 / -1; }
.award-note { margin: 0 0 14px; color: var(--muted); font-size: .76rem; line-height: 1.5; }
.award-list { display: grid; gap: 14px; }
.award-row { padding: 16px; border: 1px solid var(--border); border-radius: 14px; background: #f8faff; }
.award-row-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.award-number { color: var(--navy); font-size: .82rem; }
.remove-award { border: 0; color: #b42318; background: transparent; font-size: .72rem; font-weight: 800; }
.award-grid { display: grid; grid-template-columns: 2fr repeat(4, minmax(120px, 1fr)); gap: 10px; }
.award-control { display: flex; min-width: 0; flex-direction: column; gap: 5px; color: var(--muted); font-size: .68rem; }
.award-control input, .award-control select { width: 100%; min-width: 0; height: 46px; padding: 0 12px; border: 1px solid var(--border); border-radius: 10px; color: var(--navy); background: #fff; font: inherit; font-size: .76rem; }
.award-custom { grid-column: 1 / -1; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 10px; padding-top: 2px; }
.award-custom[hidden] { display: none; }
.award-mode-panel { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 13px; border: 1px solid #dbe5fa; border-radius: 12px; background: #fff; }
.award-mode-panel[hidden], .award-control[hidden] { display: none; }
.award-mode-panel .award-custom { padding: 0; }
.award-mode-panel .award-control:last-child { grid-column: 1 / -1; }
.award-official { grid-template-columns: minmax(180px, .35fr) 1fr; align-items: start; }
.consult-index { width: 100%; min-height: 46px; }
.index-preview { min-height: 46px; padding: 12px; border-radius: 10px; color: var(--muted); background: #f5f8ff; font-size: .72rem; line-height: 1.5; }
.index-preview-summary { color: var(--navy); font-weight: 800; }
.index-preview a { display: inline-block; margin-top: 4px; color: var(--primary); font-weight: 700; }
.index-preview-values { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px 10px; max-height: 150px; margin-top: 10px; overflow: auto; }
.index-confirmation { grid-column: 1 / -1; display: flex; align-items: flex-start; gap: 9px; color: var(--navy); font-size: .74rem; font-weight: 700; }
.index-confirmation[hidden] { display: none; }
.index-confirmation input { width: 18px; height: 18px; margin: 0; }

.money-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.money-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  align-items: end;
  gap: 7px;
}

.money-row label {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
  color: var(--muted);
  font-size: 0.68rem;
}

.remove-value {
  width: 36px;
  height: 46px;
  border: 1px solid #f0d6d6;
  border-radius: 10px;
  color: #b42318;
  background: #fff8f7;
  font-size: 1.15rem;
}

.add-value {
  align-self: flex-start;
  margin-top: 3px;
  padding: 8px 11px;
  border: 0;
  color: var(--primary);
  background: transparent;
  font-size: 0.75rem;
  font-weight: 800;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.calculate-button {
  min-width: 132px;
}

.calculate-button.loading {
  opacity: 0.72;
  cursor: wait;
}

.form-error {
  margin-top: 18px;
  padding: 12px 14px;
  border: 1px solid #fecaca;
  border-radius: 11px;
  color: #991b1b;
  background: #fef2f2;
  font-size: 0.78rem;
}

.results-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.result-actions {
  display: flex;
  gap: 8px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0;
}

.summary-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid #dce7fb;
  border-radius: 14px;
  background: #f7faff;
}

.result-case-summary {
  margin: 0 0 22px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fbfcfe;
}

.result-case-summary > h3,
.result-case-summary h4 {
  margin: 0;
}

.result-case-summary > h3 {
  margin-bottom: 14px;
  font-size: 1rem;
}

.result-case-summary-content,
#caseSummaryContent {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.result-case-summary h4 {
  margin-bottom: 9px;
  color: var(--primary);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.result-case-summary dl {
  display: grid;
  grid-template-columns: minmax(110px, 0.7fr) minmax(0, 1.3fr);
  gap: 6px 12px;
  margin: 0;
  font-size: 0.75rem;
}

.result-case-summary dt {
  color: var(--muted);
}

.result-case-summary dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.summary-card span,
.summary-card strong {
  display: block;
}

.summary-card span {
  color: var(--muted);
  font-size: 0.7rem;
}

.summary-card strong {
  overflow-wrap: anywhere;
  margin-top: 7px;
  color: #173b91;
  font-size: 1.08rem;
}

.table-shell {
  overflow: auto;
  max-height: 520px;
  border: 1px solid var(--border);
  border-radius: 13px;
}

.table-shell table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
  white-space: nowrap;
}

.table-shell th,
.table-shell td {
  padding: 11px 13px;
  border-bottom: 1px solid #edf0f5;
  text-align: right;
}

.table-shell th:first-child,
.table-shell td:first-child,
.table-shell th:nth-child(2),
.table-shell td:nth-child(2) {
  text-align: left;
}

.table-shell th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #45516a;
  background: #f7f9fc;
  font-size: 0.68rem;
  letter-spacing: 0.02em;
}

.table-shell tbody tr:nth-child(even) {
  background: #fbfcfe;
}

.disclaimer {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.5;
}

.legal-notice {
  margin: -8px 0 18px;
  padding: 12px 14px;
  border: 1px solid #dce5f6;
  border-radius: 10px;
  color: #56627a;
  background: #f7f9fd;
  font-size: 0.72rem;
  line-height: 1.55;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 50;
  max-width: min(380px, calc(100% - 48px));
  padding: 14px 18px;
  border-radius: 12px;
  color: #fff;
  background: #172033;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.sidebar-backdrop {
  display: none;
}

@media (max-width: 1120px) {
  .calculator-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-grid,
  .money-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .award-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .award-description, .award-custom { grid-column: 1 / -1; }
  .award-mode-panel, .award-official { grid-template-columns: 1fr; }
  .index-preview-values { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .help-filters { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .help-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .help-card.featured { grid-column:span 2; }
}

@media (max-width: 960px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 180ms ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 25;
    display: block;
    background: rgba(8, 14, 26, 0.48);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
  }

  .sidebar-backdrop.visible {
    opacity: 1;
    pointer-events: auto;
  }

  .sidebar-close,
  .menu-button {
    display: inline-grid;
    place-items: center;
  }

  .sidebar-close {
    margin-left: auto;
    border-color: rgba(255, 255, 255, 0.14);
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
  }

  .main {
    margin-left: 0;
  }

  .topbar {
    padding: 0 20px;
  }

  .content {
    width: min(100% - 36px, 720px);
    padding-top: 22px;
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 28px;
  }
}

@media (max-width: 620px) {
  .login-card {
    padding: 28px 22px;
  }
  .topbar-title span,
  .test-badge {
    display: none;
  }

  .primary-button {
    padding: 0 14px;
  }

  .hero {
    padding: 24px;
  }

  .toolbar,
  .section-heading,
  .calculator-heading,
  .results-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .calculator-grid {
    grid-template-columns: 1fr;
  }
  .help-heading { flex-direction:column; }
  .help-filters,.help-grid { grid-template-columns:1fr; }
  .help-card.featured { grid-column:auto; }

  .calculator-card {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .badge {
    display: none;
  }

  .calculation-card,
  .results {
    padding: 20px;
  }

  .form-grid,
  .money-list,
  .summary-grid,
  #caseSummaryContent {
    grid-template-columns: 1fr;
  }
  .award-grid, .award-custom { grid-template-columns: 1fr; }
  .index-preview-values { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .form-section {
    padding: 16px;
  }

  .form-actions,
  .result-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .form-actions button,
  .result-actions button {
    width: 100%;
  }
}

@media print {
  .sidebar,
  .topbar,
  .back-button,
  .calculation-card,
  .result-actions,
  .toast {
    display: none !important;
  }

  .main {
    margin: 0;
  }

  .content {
    width: 100%;
    padding: 0;
  }

  .calculator-heading {
    margin-bottom: 14px;
  }

  .results {
    margin: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
  }

  .table-shell {
    overflow: visible;
    max-height: none;
  }

  .table-shell th {
    position: static;
  }
}

.locked-dialog { width:min(520px,calc(100% - 32px)); border:0; border-radius:24px; padding:32px; color:#172033; box-shadow:0 24px 80px #07163166; }
.locked-dialog::backdrop { background:#07163199; backdrop-filter:blur(3px); }
.locked-dialog h2 { margin:8px 0 12px; font-size:26px; }
.locked-dialog p { margin:0; color:#5d687d; line-height:1.65; }
.locked-dialog a { color:#285bdc; font-weight:750; }
.locked-dialog-icon { display:block; font-size:30px; }
.locked-dialog-close { position:absolute; right:16px; top:14px; border:0; background:transparent; color:#667085; font-size:26px; cursor:pointer; }
