/* Orange (218, 125, 58) is the main colour and deepens from Essential to Comprehensive.
   Teal marks offers and extras; red marks conditions, limits and warnings. */
:root {
  --wash: #f3f2f0;
  --paper: #ffffff;
  --ink: #25201c;
  --ink-2: #655d56;
  --line: #dcd7d1;
  --line-soft: #ebe7e2;
  --brand: #da7d3a;
  --brand-deep: #a4500f;   /* orange dark enough for text on white */
  --brand-ink: #3a1c05;    /* text on the orange */
  --brand-tint: #fff7f0;
  --tier-1: #fbe5d3;
  --tier-2: #f0ad7b;
  --offer: #0f6654;
  --offer-wash: #e4f2ed;
  --alert: #b3261e;
  --alert-wash: #fcedeb;

  --display: "Bricolage Grotesque", "LXGW WenKai TC", "PingFang HK", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --body: "Bricolage Grotesque", "PingFang HK", "PingFang TC", "Microsoft JhengHei", "Noto Sans CJK TC", "Noto Sans TC", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--wash);
  color: var(--ink);
  font: 400 15px/1.5 var(--body);
  font-variant-numeric: tabular-nums;
}
h1, h2, h3, p, ul, fieldset, legend { margin: 0; padding: 0; }
ul { list-style: none; }
fieldset { border: 0; min-width: 0; }
a { color: var(--brand-deep); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brand-deep); outline-offset: 2px; }

h1 { font: 600 28px/1.15 var(--display); letter-spacing: -0.01em; }
h2 { font: 600 19px/1.25 var(--display); }
h3 { font: 600 15px/1.3 var(--display); }

.muted { color: var(--ink-2); }
.boot { padding: 48px; text-align: center; color: var(--ink-2); }

/* ---- frame ---------------------------------------------------------------- */
.topbar {
  display: flex; align-items: center; gap: 28px;
  padding: 0 24px; height: 56px;
  background: var(--brand); color: var(--brand-ink);
}
.brand { display: inline-flex; align-items: baseline; gap: 9px; color: inherit; text-decoration: none; white-space: nowrap; }
.brand-zh { font: 700 22px/1 "LXGW WenKai TC", var(--display); }
.brand-en { font: 500 13px/1 var(--display); }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a {
  color: var(--brand-ink); text-decoration: none; padding: 7px 13px; border-radius: 6px;
  font-weight: 500;
}
.nav a:hover { background: rgb(255 255 255 / 0.2); }
.nav a.is-current { background: rgb(255 255 255 / 0.42); font-weight: 600; }
.topbar-end { display: flex; align-items: center; gap: 16px; }
.topbar .link-btn { color: var(--brand-ink); }
.lang-btn {
  border: 1px solid currentColor; background: transparent; border-radius: 999px;
  padding: 4px 13px; cursor: pointer; font-weight: 500;
}
.topbar .lang-btn { color: var(--brand-ink); }
.demo-banner {
  background: var(--line-soft); color: var(--ink);
  padding: 7px 24px; font-size: 13px; border-bottom: 1px solid var(--line);
}
.page { max-width: 1180px; margin: 0 auto; padding: 28px 24px 72px; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 20px; }
.page-sub { color: var(--ink-2); margin-top: 6px; }
.crumb { display: inline-block; font-size: 13px; margin-bottom: 6px; text-decoration: none; }
.crumb::before { content: "‹ "; }
.inline-link { margin-left: 12px; font-size: 13px; }
.lede { max-width: 62ch; color: var(--ink-2); margin-bottom: 20px; }
.section-title { margin: 30px 0 12px; }
.empty { padding: 28px 0; color: var(--ink-2); }
.notice {
  background: var(--alert-wash); color: var(--alert); border-left: 3px solid var(--alert);
  padding: 10px 14px; border-radius: 0 6px 6px 0; margin: 0 0 18px; max-width: 80ch;
}
.client-notes { color: var(--ink-2); max-width: 70ch; margin: -8px 0 18px; font-style: italic; }
.head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.save-state { font-size: 13px; color: var(--ink-2); margin-right: 6px; }

/* ---- buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 8px 15px; border-radius: 6px; border: 1px solid var(--line);
  background: var(--paper); color: var(--ink); font-weight: 500; cursor: pointer;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { border-color: var(--brand-deep); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); font-weight: 600; }
.btn-primary:hover { background: #cb6f2d; border-color: #cb6f2d; }
.btn-danger { background: var(--alert); border-color: var(--alert); color: #fff; }
.btn-quiet { background: transparent; }
.btn-block { width: 100%; }
.link-btn { background: none; border: 0; padding: 0; color: var(--brand-deep); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; font-size: 13px; }
.link-danger { color: var(--alert); }
.tag {
  display: inline-block; font-size: 12px; padding: 1px 7px; border-radius: 999px;
  background: var(--tier-1); color: var(--brand-ink); white-space: nowrap;
}

/* ---- client list ---------------------------------------------------------- */
.search { width: 100%; max-width: 340px; margin-bottom: 14px; }
.client-list { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.client-list:empty { display: none; }
.client-list li + li { border-top: 1px solid var(--line-soft); }
.client-row {
  display: grid; grid-template-columns: minmax(180px, 1.1fr) 2fr auto; gap: 4px 24px; align-items: center;
  padding: 15px 20px; color: inherit; text-decoration: none;
}
.client-row:hover { background: var(--brand-tint); }
.client-name { font: 600 18px/1.3 var(--display); }
.client-desc { color: var(--ink-2); }
.client-meta { color: var(--ink-2); font-size: 13px; text-align: right; }

/* ---- forms ---------------------------------------------------------------- */
.form { max-width: 860px; }
.form-section { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 20px 22px 22px; margin-bottom: 14px; }
.form-section > h2 { margin-bottom: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 22px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field-wide { grid-column: 1 / -1; }
.field-label { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.field-hint { font-size: 12.5px; color: var(--ink-2); }
input[type="text"], input[type="number"], input[type="date"], input[type="password"], input[type="tel"], input[type="search"], select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper);
}
input:disabled { background: var(--wash); color: var(--ink-2); }
textarea { resize: vertical; line-height: 1.45; }
input:hover, select:hover, textarea:hover { border-color: #a9bab2; }
.money-input { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); }
.money-input:focus-within { outline: 2px solid var(--brand-deep); outline-offset: 2px; }
.money-input input { border: 0; background: transparent; outline: 0; padding-left: 6px; text-align: right; min-width: 0; }
.money-prefix { padding-left: 10px; color: var(--ink-2); font-size: 13px; white-space: nowrap; }
.money-input.is-compact input { padding: 5px 8px 5px 4px; }
.money-input.is-compact .money-prefix { padding-left: 8px; font-size: 12px; }

.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 7px; background: var(--wash); padding: 2px; gap: 2px; width: fit-content; }
.seg-item { position: relative; cursor: pointer; }
.seg-item input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.seg-item span { display: block; padding: 6px 13px; border-radius: 5px; color: var(--ink-2); font-weight: 500; white-space: nowrap; }
.seg-item.is-on span { background: var(--paper); color: var(--brand-ink); box-shadow: 0 0 0 1px var(--brand); }
.seg-item input:focus-visible + span { outline: 2px solid var(--brand-deep); outline-offset: 1px; }
.seg-item input:disabled + span { opacity: 0.45; }
.seg-small .seg-item span { padding: 4px 11px; font-size: 13px; }

.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 6px; width: fit-content; background: var(--paper); }
.stepper button { width: 36px; height: 36px; border: 0; background: none; cursor: pointer; font-size: 18px; color: var(--brand-deep); }
.stepper button:disabled { color: var(--line); cursor: default; }
.stepper output { min-width: 34px; text-align: center; font-weight: 600; }

.needs { display: grid; gap: 12px; }
.need { border: 1px solid var(--line-soft); border-left: 4px solid var(--brand); border-radius: 6px; padding: 12px 16px 14px; }
.need.is-off { border-left-color: var(--line); background: #fafcfb; }
.need legend { float: left; width: 100%; margin-bottom: 10px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.need-name { font: 600 17px/1.3 var(--display); }
.need-blurb { color: var(--ink-2); font-size: 13px; }
.need-controls { clear: both; display: flex; flex-wrap: wrap; gap: 14px 28px; }
.need-controls > div, .need-target { display: flex; flex-direction: column; gap: 5px; }
.need-target { width: 230px; max-width: 100%; }
.need.is-off .need-target { opacity: 0.45; }

.form-error { color: var(--alert); font-weight: 500; margin: 10px 0; }
.form-actions { display: flex; align-items: center; gap: 10px; margin: 18px 0 34px; flex-wrap: wrap; }
.form-delete { margin-left: auto; }
.check { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; font-size: 14px; }
.check input { width: 16px; height: 16px; accent-color: var(--brand); margin: 0; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 6px; }
.checks-column { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 190px; overflow: auto; padding: 8px 10px; border: 1px solid var(--line-soft); border-radius: 6px; }

.dialog { border: 0; border-radius: 12px; padding: 24px 26px; width: min(440px, calc(100vw - 32px)); color: var(--ink); box-shadow: 0 24px 60px rgb(40 25 10 / 0.28); }
.dialog-wide { width: min(700px, calc(100vw - 32px)); }
.dialog::backdrop { background: rgb(30 20 12 / 0.45); }
.dialog h2 { margin-bottom: 12px; }
.dialog p { color: var(--ink-2); margin-bottom: 6px; }
.dialog-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 20px; }
.dialog-left { margin-right: auto; }

.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 9px 18px; border-radius: 999px; z-index: 50; }

.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--brand); }
.login-card { background: var(--paper); border-radius: 14px; padding: 30px 30px 22px; width: min(360px, 100%); display: grid; gap: 16px; }
.login-lang { justify-self: center; }

/* ---- where they stand ----------------------------------------------------- */
.situation { display: grid; grid-template-columns: 1.4fr 1.2fr 1fr 1fr; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; }
.sit { padding: 16px 18px 18px; min-width: 0; }
.sit + .sit { border-left: 1px solid var(--line-soft); }
.sit h3 { color: var(--ink-2); font: 500 13px/1.3 var(--body); margin-bottom: 4px; }
.sit-figure { font: 600 21px/1.25 var(--display); margin-bottom: 8px; }
.sit-line { font-size: 13px; color: var(--ink-2); line-height: 1.45; }
.sit-line + .sit-line { margin-top: 3px; }
.sit-note { color: var(--alert); }
.gapbar { height: 6px; border-radius: 3px; background: var(--tier-1); margin-bottom: 9px; overflow: hidden; }
.gapbar i { display: block; height: 100%; background: var(--brand); border-radius: 3px; }
.situation.is-compact .sit { padding: 11px 14px 12px; }
.situation.is-compact .sit-figure { font-size: 17px; margin-bottom: 6px; }

/* ---- the comparison table ------------------------------------------------- */
.table-tools, .sheet-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; margin: 26px 0 12px; }
.tools-label { font-size: 13px; color: var(--ink-2); }
.tools-gap { flex: 1; }

.depth-mark { display: inline-flex; align-items: flex-end; gap: 2px; margin-left: 6px; vertical-align: baseline; }
.depth-mark i { width: 4px; border-radius: 1px; background: currentColor; opacity: 0.25; }
.depth-mark i:nth-child(1) { height: 6px; }
.depth-mark i:nth-child(2) { height: 10px; }
.depth-mark i:nth-child(3) { height: 14px; }
.depth-mark i.is-on { opacity: 1; }

.compare { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; background: var(--paper); border-radius: 10px; }
.compare .c-label { width: 17%; }
.compare th, .compare td { padding: 9px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line-soft); font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.compare tbody th[scope="row"], .compare tfoot th { font-weight: 400; color: var(--ink-2); font-size: 13px; }
.compare thead .corner { background: var(--wash); border-bottom: 0; }

.compare thead th { position: sticky; top: 0; z-index: 3; }
.compare th.opt { padding: 16px 14px 14px; border-bottom: 0; border-radius: 10px 10px 0 0; }
.compare th.col-essential { background: var(--tier-1); color: var(--brand-ink); }
.compare th.col-balanced { background: var(--tier-2); color: var(--brand-ink); }
.compare th.col-comprehensive { background: var(--brand); color: var(--brand-ink); }
.compare.is-present th.opt { cursor: pointer; }
.opt-name { display: block; font: 600 21px/1.2 var(--display); }
.opt-sum { display: block; font-weight: 400; font-size: 13px; margin: 4px 0 10px; min-height: 2.9em; opacity: 0.92; }
.opt-price { display: block; font-weight: 400; font-size: 13px; }
.opt-price b { font: 600 26px/1.1 var(--display); letter-spacing: -0.01em; margin-right: 3px; }
.opt-price-label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 2px; }
.opt-all { display: block; font-weight: 400; font-size: 12.5px; margin-top: 6px; opacity: 0.9; }
.suggested {
  position: absolute; top: -11px; left: 14px; background: var(--ink); color: #fff;
  font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 999px;
}
.suggest-pick { display: flex; align-items: center; gap: 6px; font-weight: 400; font-size: 12.5px; margin-top: 10px; cursor: pointer; }
.suggest-pick input { accent-color: var(--ink); margin: 0; }

.compare td.col.is-rec, .compare tfoot td.col.is-rec { background: var(--brand-tint); box-shadow: inset 2px 0 0 var(--brand), inset -2px 0 0 var(--brand); }
.compare tfoot tr:last-child td.is-rec { box-shadow: inset 2px 0 0 var(--brand), inset -2px 0 0 var(--brand), inset 0 -2px 0 var(--brand); }
.compare .is-dim { opacity: 0.35; }

.compare tr.group th { padding: 24px 14px 8px; border-bottom: 2px solid var(--ink); background: var(--paper); }
.group-name { font: 600 18px/1.2 var(--display); color: var(--ink); }
.group-hint { margin-left: 12px; font-size: 13px; color: var(--alert); font-weight: 500; }

.plan-name { font-weight: 600; font-size: 15px; display: block; }
.plan-sum { display: block; color: var(--ink-2); font-size: 13px; }
.sample-chip { display: inline-block; font-size: 11px; padding: 0 6px; border-radius: 3px; background: var(--line-soft); color: var(--ink-2); font-weight: 500; }
.not-included, .dash { color: #9aa9a2; }
.row-extra th, .row-extra td { border-top: 1px dashed var(--line); }
.amount { font-weight: 600; font-size: 15px; }
.cell-sub { display: block; font-size: 12.5px; color: var(--ink-2); }
.compare.is-present tr.is-same td { color: var(--ink-2); }

.premium { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 6px; }
.premium-main { font: 600 17px/1.2 var(--display); }
.premium-unit { font-size: 12.5px; color: var(--ink-2); }
.offer-line { margin-top: 5px; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.seal {
  display: inline-block; border: 1.5px solid var(--offer); color: var(--offer); background: var(--offer-wash);
  font-size: 12px; font-weight: 600; line-height: 1.35; padding: 1px 7px; border-radius: 3px; transform: rotate(-1deg);
}
.seal-date { font-weight: 400; }
.offer-sum { font-size: 12.5px; color: var(--ink-2); }
.cell-error { color: var(--alert); font-weight: 500; }
.is-pricing .premium-main, .is-pricing .total-main, .opt-price.is-pricing b { opacity: 0.4; }

.row-why td { font-size: 13px; color: var(--ink-2); }
.compare tfoot th, .compare tfoot td { background: var(--paper); }
.row-total th, .row-total td { border-top: 2px solid var(--ink); padding-top: 14px; }
.total-main { font: 600 22px/1.1 var(--display); margin-right: 4px; }
.offer-total { font-weight: 600; color: var(--offer); }
.fit { font-weight: 500; }
.fit-in { color: var(--offer); }
.fit-over { color: var(--alert); }
.row-note td { font-size: 12.5px; color: var(--ink-2); }
.compare tfoot tr:last-child th, .compare tfoot tr:last-child td { border-bottom: 0; padding-bottom: 16px; }
.compare tfoot tr:last-child th { border-radius: 0 0 0 10px; }
.compare tfoot tr:last-child td:last-child { border-radius: 0 0 10px 0; }

/* extra cover with a time limit: the boost and its end sit side by side */
.boost { margin-top: 8px; }
.boost-steps { display: flex; align-items: flex-end; }
.boost-step { flex: 1; min-width: 0; padding: 6px 9px; border: 1px solid var(--line); background: var(--paper); font-size: 12.5px; line-height: 1.35; }
.boost-step b { display: block; font: 600 15px/1.25 var(--display); }
.boost-step.is-up { border-color: var(--offer); background: var(--offer-wash); padding-top: 12px; border-radius: 5px 5px 0 5px; }
.boost-step:not(.is-up) { border-left: 0; border-radius: 0 5px 5px 0; }
.boost-when { display: block; color: var(--ink-2); }
.boost-label { color: var(--offer); font-weight: 600; }
.boost-cond, .callout-cond { display: block; margin-top: 4px; font-size: 12.5px; color: var(--alert); font-weight: 500; line-height: 1.4; }
.boost-cond::before, .callout-cond::before { content: "! "; font-weight: 700; }
.callout + .callout { margin-top: 8px; }
.callout-title { display: block; font-weight: 600; }
.row-sublabel { display: block; font-size: 12px; margin-top: 3px; line-height: 1.4; }

/* claim example */
.claims { margin: 0; padding: 0; list-style: none; counter-reset: claim; }
.claims li { position: relative; padding: 0 0 8px 22px; counter-increment: claim; }
.claims li::before {
  content: counter(claim); position: absolute; left: 0; top: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--ink); color: #fff; font-size: 10.5px; font-weight: 600; line-height: 16px; text-align: center;
}
.claims li::after { content: ""; position: absolute; left: 7.5px; top: 20px; bottom: 0; width: 1px; background: var(--line); }
.claims li:last-child::after { display: none; }
.claims li.is-zero::before { background: #b9c5bf; }
.claim-label { display: block; font-size: 12.5px; color: var(--ink-2); }
.claim-paid { font: 600 15px/1.3 var(--display); }
.is-zero .claim-paid { color: #8b9a93; font-weight: 500; }
.claim-extra { font-size: 12.5px; color: var(--offer); font-weight: 600; margin-left: 6px; }
.claim-note { display: block; font-size: 12.5px; color: var(--ink-2); }
.claim-own { color: var(--alert); font-weight: 500; }
.claims-total { margin-top: 2px; padding-top: 7px; border-top: 1px solid var(--line); font-weight: 600; }
.claims-foot { margin-top: 5px; font-size: 12px; color: var(--ink-2); font-style: italic; }
.claims-total span { display: block; font-weight: 400; font-size: 12.5px; color: var(--ink-2); }
.compare.is-present tr.row-claims.is-same td, .compare.is-present tr.row-callouts td { color: var(--ink); }

/* tabs: one type of plan at a time */
.type-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 14px; border-bottom: 2px solid var(--ink); }
.type-tabs button {
  border: 0; background: none; cursor: pointer; padding: 9px 18px 8px; border-radius: 8px 8px 0 0;
  font: 600 16px/1.2 var(--display); color: var(--ink-2);
}
.type-tabs button:hover { background: var(--line-soft); }
.type-tabs button.is-current { background: var(--ink); color: #fff; }
.tab-link { border: 0; background: none; padding: 0; cursor: pointer; font: 600 16px/1.3 var(--display); color: var(--ink); text-align: left; text-decoration: underline; text-decoration-color: var(--brand); text-underline-offset: 3px; }
.row-overview th, .row-overview td { padding-top: 14px; padding-bottom: 14px; }
.ov-item + .ov-item { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.ov-line { display: block; font-size: 13px; color: var(--ink-2); }
.row-subtotal th, .row-subtotal td { border-top: 2px solid var(--ink); padding-top: 12px; padding-bottom: 14px; }
.cell-warn { color: var(--alert); }

/* how a bill is shared between plans */
.bill { margin-bottom: 10px; }
.bill-title { display: block; font-weight: 600; margin-bottom: 2px; }
.bill-line { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--ink-2); }
.bill-line b { color: var(--ink); font-weight: 600; white-space: nowrap; }
.bill-own, .bill-own b { color: var(--alert); font-weight: 600; }
.bill-clear { color: var(--offer); font-weight: 600; }
.mix-saving { margin-top: 4px; padding: 6px 9px; border-radius: 5px; background: var(--offer-wash); color: var(--offer); font-weight: 600; font-size: 13px; }

/* editing controls inside cells */
.compare.is-edit select, .compare.is-edit textarea { font-size: 13.5px; padding: 6px 8px; }
.compare.is-edit textarea { font-size: 13px; }
.cell-tools { margin-top: 7px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.mini-field { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--ink-2); width: 100%; }
.row-add th, .row-add td { border-bottom: 0; padding-top: 4px; padding-bottom: 10px; }
.add-btn { border: 1px dashed var(--brand); background: none; color: var(--brand-deep); border-radius: 6px; padding: 4px 12px; font-size: 13px; cursor: pointer; }
.add-btn:hover { background: var(--brand-tint); }
.priced-note { margin-top: 10px; font-size: 12.5px; color: var(--ink-2); }

.versions ul { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; }
.versions li { display: flex; align-items: center; gap: 16px; padding: 11px 18px; }
.versions li + li { border-top: 1px solid var(--line-soft); }
.version-title { font-weight: 600; flex: 1; }

/* ---- presenting ----------------------------------------------------------- */
body.presenting { background: var(--paper); }
body.presenting .topbar, body.presenting .demo-banner { display: none; }
body.presenting .page { max-width: 1320px; padding-top: 22px; }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; padding-bottom: 14px; border-bottom: 3px solid var(--brand); }
.sheet-head h1 { font-size: 34px; }
.sheet-sub { color: var(--ink-2); margin-top: 6px; }
.sheet-meta { text-align: right; color: var(--ink-2); font-size: 13px; }
.sample-stamp { display: inline-block; border: 2px solid var(--ink-2); color: var(--ink-2); font-weight: 700; padding: 1px 12px; border-radius: 4px; transform: rotate(-3deg); margin-bottom: 6px; letter-spacing: 0.04em; }
.sheet-tools { margin: 14px 0; }
.sheet .situation { margin: 16px 0 22px; border-color: var(--line-soft); }
.sheet .compare th, .sheet .compare td { font-size: 15px; }
.sheet .compare tbody th[scope="row"], .sheet .compare tfoot th { font-size: 13.5px; }
.sheet .compare thead .corner { background: var(--paper); }
.sheet-foot { margin-top: 20px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--ink-2); display: grid; gap: 4px; max-width: none; }
.sheet-demo { color: var(--ink); font-weight: 600; }
.sheet-agent { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---- plans and offers ----------------------------------------------------- */
.tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.tabs button { border: 0; background: none; padding: 9px 16px; cursor: pointer; font: 600 16px/1.2 var(--display); color: var(--ink-2); border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs button.is-current { color: var(--ink); border-bottom-color: var(--brand); }
.plans-wrap { overflow-x: auto; }
.plans-table { border: 1px solid var(--line); }
.plans-table .c-label, .plans-table tbody th[scope="row"] { width: 190px; }
.plans-table tbody th[scope="row"] { position: sticky; left: 0; background: var(--paper); z-index: 2; box-shadow: 1px 0 0 var(--line-soft); }
.plans-table thead th { background: var(--brand-tint); border-bottom: 2px solid var(--ink); padding: 14px; }
.plans-table thead .corner { background: var(--brand-tint); border-bottom: 2px solid var(--ink); border-radius: 10px 0 0 0; }
.plans-table tbody tr:last-child th, .plans-table tbody tr:last-child td { border-bottom: 0; }

.offer-list { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.offer-list:empty { display: none; }
.offer-list li + li { border-top: 1px solid var(--line-soft); }
.offer-row {
  display: grid; grid-template-columns: 1.5fr 1.2fr 1.3fr 1fr; gap: 6px 22px; align-items: start;
  width: 100%; text-align: left; border: 0; background: none; padding: 15px 20px; cursor: pointer; line-height: 1.45;
}
.offer-row:hover { background: var(--brand-tint); }
.offer-title { font-weight: 600; }
.offer-benefit { color: var(--offer); font-weight: 600; }
.offer-scope, .offer-when { font-size: 13px; color: var(--ink-2); }
.offer-when { text-align: right; }
.offer-ended .offer-benefit, .offer-paused .offer-benefit { color: var(--ink-2); }
.offer-ended .offer-title, .offer-paused .offer-title { color: var(--ink-2); font-weight: 500; }

/* ---- smaller screens ------------------------------------------------------ */
@media screen and (max-width: 900px) {
  .topbar { height: auto; padding: 10px 16px; flex-wrap: wrap; gap: 8px 16px; }
  .nav { order: 3; flex-basis: 100%; overflow-x: auto; }
  .topbar-end { margin-left: auto; }
  .page { padding: 20px 16px 56px; }
  .demo-banner { padding: 7px 16px; }
  .situation { grid-template-columns: 1fr 1fr; }
  .sit:nth-child(3) { border-left: 0; }
  .sit:nth-child(n + 3) { border-top: 1px solid var(--line-soft); }
  .compare-wrap { overflow-x: auto; margin: 0 -16px; padding: 12px 16px 0; }
  .compare { min-width: 760px; }
  .compare thead th { position: relative; }
  .compare tbody th[scope="row"], .compare tfoot th { position: sticky; left: -16px; background: var(--paper); z-index: 2; box-shadow: 1px 0 0 var(--line-soft); }
  .client-row { grid-template-columns: 1fr auto; }
  .client-desc { grid-column: 1 / -1; grid-row: 2; }
  .offer-row { grid-template-columns: 1fr 1fr; }
  .offer-when { text-align: left; }
}
@media screen and (max-width: 600px) {
  h1 { font-size: 24px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-section { padding: 16px; }
  .situation { grid-template-columns: 1fr; }
  .sit + .sit { border-left: 0; border-top: 1px solid var(--line-soft); }
  .sheet-head { flex-direction: column; align-items: flex-start; }
  .sheet-meta { text-align: left; }
  .offer-row { grid-template-columns: 1fr; }
  .checks-column { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: no-preference) {
  .btn, .nav a, .client-row, .offer-row { transition: background-color 0.12s, border-color 0.12s; }
}

/* ---- print: A4 landscape -------------------------------------------------- */
@page { size: A4 landscape; margin: 9mm 10mm; }
@media print {
  html, body { background: #fff; }
  body { font-size: 9.5pt; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .no-print, .topbar, .demo-banner, .toast { display: none !important; }
  .page { max-width: none; padding: 0; }
  .sheet-head { padding-bottom: 6pt; }
  .sheet-head h1 { font-size: 20pt; }
  .sheet .situation { margin: 8pt 0 10pt; }
  .situation .sit { padding: 6pt 9pt 7pt; }
  .sit-figure { font-size: 12pt; margin-bottom: 4pt; }
  .sit-line { font-size: 8pt; }
  .compare-wrap { overflow: visible; margin: 0; padding: 0; }
  .compare { min-width: 0; }
  .compare thead th { position: relative; }
  .compare-wrap { padding-top: 8pt; }
  .sheet .compare th, .sheet .compare td { font-size: 8.5pt; padding: 3.5pt 7pt; line-height: 1.35; }
  .sheet .compare tbody th[scope="row"], .sheet .compare tfoot th { font-size: 8pt; position: static; box-shadow: none; }
  .compare th.opt { padding: 8pt 7pt 7pt; }
  .opt-name { font-size: 13pt; }
  .opt-sum { font-size: 8pt; min-height: 0; margin: 2pt 0 5pt; }
  .opt-price b { font-size: 15pt; }
  .opt-price, .premium-unit, .cell-sub, .offer-sum, .plan-sum { font-size: 7.5pt; }
  .plan-name { font-size: 9.5pt; }
  .premium-main { font-size: 10.5pt; }
  .total-main { font-size: 13pt; }
  .group-name { font-size: 11pt; }
  .compare tr.group th { padding: 9pt 7pt 3pt; }
  .seal { font-size: 7.5pt; }
  .bill-line, .ov-line, .mix-saving { font-size: 7.5pt; }
  .tab-link { font-size: 10pt; text-decoration: none; }
  .boost-step, .claim-label, .claim-note, .claim-extra, .boost-cond, .callout-cond, .claims-total span, .row-sublabel { font-size: 7.5pt; }
  .boost-step b, .claim-paid { font-size: 9.5pt; }
  .boost-step { padding: 3pt 5pt; }
  .boost-step.is-up { padding-top: 6pt; }
  .claims li { padding-bottom: 4pt; }
  .suggested { font-size: 7.5pt; top: 6pt; left: auto; right: 7pt; }
  .compare .is-dim { opacity: 1; }
  .compare tr { break-inside: avoid; }
  .compare tr.group { break-after: avoid; }
  .sheet-foot { font-size: 7.5pt; margin-top: 8pt; padding-top: 5pt; break-inside: avoid; }
}
