/* Inheritance Plan page (builds on planner.css) */
.plan-page .wrap { max-width: 900px; }
.preview-note { background: var(--accent-soft); border-radius: var(--radius); padding: 12px 16px; font-size: 15px; }

.plan-contents { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 28px; }
.plan-contents a {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px;
}
.plan-contents a:hover { border-color: var(--accent); color: var(--accent); }
.plan-contents span, .section-num {
  display: inline-grid; place-items: center; flex: none;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--brass-soft); color: var(--brass); font: 400 15px/1 var(--display);
}
.section-num { margin-bottom: 10px; }

.holdings-table { width: 100%; border-collapse: collapse; font-size: 15px; margin-top: 8px; }
.holdings-table th { text-align: left; font: 650 12px/1.4 var(--body); color: var(--muted); padding: 8px 0; border-bottom: 1.5px solid var(--ink); }
.holdings-table td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.holdings-table .num { text-align: right; padding-right: 0; white-space: nowrap; font-weight: 600; }
.holdings-table .sub { display: block; color: var(--muted); font-size: 14px; }

/* Calculator */
.calc { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: start; margin-top: 8px; }
.calc-form fieldset { border: 0; padding: 0; margin: 0 0 8px; display: grid; gap: 14px; }
.calc-form legend { font: 650 12px/1 var(--body); color: var(--brass); margin-bottom: 14px; padding: 0; }
.money { position: relative; }
.money span { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.money input[type="text"] { padding-left: 32px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 500 !important; font-size: 16px !important; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }

.result { position: sticky; top: 88px; }
.result-card {
  background: linear-gradient(160deg, var(--navy), var(--navy-2));
  color: var(--on-navy);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-lg);
}
.result-label { font: 650 12px/1 var(--body); color: var(--brass-bright); }
.result-figure { display: block; font: 400 52px/1.1 var(--display); color: #fff; margin: 10px 0 6px; }
.result-line { color: var(--on-navy-muted); font-size: 15px; margin-bottom: 16px; }
.breakdown { width: 100%; border-collapse: collapse; font-size: 14px; }
.breakdown td { padding: 8px 0; border-top: 1px solid rgba(255, 255, 255, 0.1); color: var(--on-navy-muted); }
.breakdown .num { text-align: right; color: var(--on-navy); white-space: nowrap; padding-left: 10px; }
.breakdown .subtotal td { color: #fff; font-weight: 600; }
.result-notes { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; font-size: 14px; color: var(--muted); }
.result-notes li { padding: 2px 0 2px 14px; border-left: 3px solid var(--tape); }

/* Guide */
.safety { background: var(--bad-soft); border-radius: var(--radius); padding: 18px 20px; margin: 8px 0 20px; }
.safety h3 { color: var(--bad); }
.safety ul { margin: 0; padding-left: 20px; font-size: 15px; }
.safety li { margin-bottom: 6px; }
.guide-cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.guide-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; background: var(--bg); break-inside: avoid; }
.guide-card-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 12px; }
.guide-type { font: 650 12px/1.4 var(--body); color: var(--brass); }
.guide-card h3 { font-family: var(--display); font-size: 24px; font-weight: 400; margin: 2px 0 0; }
.guide-amount { font-size: 14px; color: var(--muted); text-align: right; }
.guide-facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0 0 14px; font-size: 15px; padding: 12px 14px; background: var(--surface); border-radius: var(--radius); }
.guide-facts dt { color: var(--muted); }
.guide-facts dd { margin: 0; overflow-wrap: anywhere; }
.guide-facts .mono { font-family: var(--mono); font-size: 13px; }
.guide-steps { margin: 0; padding-left: 0; list-style: none; counter-reset: gs; display: grid; gap: 10px; }
.guide-steps li { counter-increment: gs; position: relative; padding-left: 38px; font-size: 16px; }
.guide-steps li::before {
  content: counter(gs);
  position: absolute; left: 0; top: 0;
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink); font: 600 13px/1 var(--body);
}
.guide-source { font-size: 14px; color: var(--muted); margin: 14px 0 0; }

.will-wording { margin: 8px 0 18px; padding: 20px 22px; border-left: 3px solid var(--brass); background: var(--brass-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-family: var(--display); font-size: 19px; line-height: 1.55; }
.final-actions { margin-top: 32px; justify-content: center; }

@media (max-width: 820px) {
  .calc { grid-template-columns: 1fr; }
  .result { position: static; }
  .plan-contents { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .guide-facts { grid-template-columns: 1fr; gap: 0; }
  .guide-facts dd { margin-bottom: 6px; }
  .guide-card-head { flex-direction: column; gap: 6px; }
  .guide-amount { text-align: left; }
  .result-figure { font-size: 44px; }
}

@media print {
  .plan-page .panel { page-break-before: auto; margin-top: 24px; }
  #guide-section { page-break-before: always; }
  .calc { grid-template-columns: 1fr; }
  .result { position: static; }
  .result-card { background: none; color: #000; box-shadow: none; border: 1px solid #999; }
  .result-figure, .breakdown .subtotal td, .breakdown .num { color: #000; }
  .result-label { color: #555; }
  .breakdown td, .result-line { color: #333; border-color: #ccc; }
  .guide-card { background: none; }
}

/* Locked until purchase */
.plan-page[data-locked="true"] .paid,
.plan-page[data-locked="true"] .plan-contents { display: none; }
.plan-page[data-locked="false"] .paywall { display: none; }
.paywall { border: 1.5px solid var(--accent); box-shadow: var(--shadow-lg); }
.paywall .ticks { margin-top: 18px; }
.paywall-buy { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; justify-content: space-between; padding: 20px 0 8px; border-top: 1px solid var(--line); }
.paywall-buy .price-line { border: 0; margin: 0; padding: 0; }
.preview-note.success { background: color-mix(in srgb, var(--good) 14%, var(--surface)); }
.preview-note.error { background: var(--bad-soft); color: var(--bad); }

/* Example plan page */
.example-tax { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: 36px; align-items: start; margin-top: 8px; }
.example-tax .result { position: static; }
.example-tax .figures h3 { font: 650 16px/1.3 var(--body); margin: 0 0 8px; }
.breakdown-print { width: 100%; border-collapse: collapse; font-size: 15px; }
.breakdown-print td { padding: 9px 0; border-bottom: 1px solid var(--line); }
.breakdown-print td.num { text-align: right; padding-left: 12px; white-space: nowrap; }
@media (max-width: 820px) { .example-tax { grid-template-columns: 1fr; } }
.example-more { position: relative; margin-top: 16px; }
.example-more .guide-cards { filter: blur(5px); max-height: 420px; overflow: hidden; pointer-events: none; user-select: none; }
.example-more-note {
  position: absolute; inset: auto 0 0; padding: 60px 24px 24px; display: grid; gap: 6px; text-align: center;
  background: linear-gradient(to bottom, transparent, var(--surface) 55%);
}
.example-more-note span { color: var(--muted); font-size: 15px; max-width: 520px; margin: 0 auto; }
.example-cta { text-align: center; }
.example-cta p { max-width: 560px; margin: 0 auto; color: var(--muted); }
.example-cta .plan-actions { justify-content: center; margin-top: 20px; }

/* Printed plan */
@media print {
  .plan-page .panel { box-shadow: none; }
  .plan-page .hint, .plan-page .price-note { display: none; }
  .result-card, .result-notes li, .safety, .guide-card, .will-wording, .figures { break-inside: avoid; }
  #will-section { margin-top: 10mm; }
  .figures { margin-bottom: 5mm; }
  .figures h3 { font-size: 12pt; margin: 0 0 2mm; }
  .breakdown-print { width: 100%; border-collapse: collapse; font-size: 10.5pt; }
  .breakdown-print td { padding: 1.6mm 0; border-bottom: 1px solid #ddd; }
  .breakdown-print .num { text-align: right; }
}

/* Valuing, storage and letter sections */
.plan-contents { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.value-steps { margin: 8px 0 20px; padding-left: 22px; display: grid; gap: 8px; font-size: 16px; }
.value-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.value-table th { text-align: left; font: 650 12px/1.4 var(--body); color: var(--muted); padding: 8px 10px 8px 0; border-bottom: 1.5px solid var(--ink); }
.value-table td { padding: 12px 10px 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.value-table .num { text-align: right; padding-right: 0; white-space: nowrap; }
.value-table th.num { padding-right: 0; }
.value-table td:first-child strong { white-space: nowrap; }
.value-table .sub { display: block; color: var(--muted); font-size: 14px; }
.value-table td.today { font-weight: 600; padding-right: 18px; }
.value-table th.num + th.num { padding-left: 18px; }
.value-table td.blank { min-width: 130px; border-bottom: 1px solid var(--ink); }
.value-table tr.total td { font-weight: 650; border-top: 3px double var(--ink); border-bottom: 0; }
.value-table tr.total td.blank { border-bottom: 1.5px solid var(--ink); }
.value-note { font-size: 14px; color: var(--muted); margin: 12px 0 0; max-width: 64ch; }
.storage-tips { margin-top: 8px; }
.letter { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 30px; font-family: var(--display); font-size: 18px; line-height: 1.6; max-width: 680px; }
.letter p { margin: 0 0 14px; }
.letter-holdings { margin: 0 0 16px; padding-left: 22px; display: grid; gap: 10px; font-family: var(--body); font-size: 15px; }
.letter-holdings span { display: block; color: var(--muted); }
.letter-sign { display: grid; grid-template-columns: auto 1fr auto 140px; gap: 12px; align-items: end; margin: 30px 0 6px; font-family: var(--body); font-size: 15px; }
.letter-sign .line { border-bottom: 1px solid var(--ink); height: 24px; }
.letter-name { font-weight: 600; }
@media (max-width: 600px) {
  .value-table thead { display: none; }
  .value-table tr { display: grid; grid-template-columns: 1fr auto; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .value-table td { border: 0; padding: 2px 0; }
  .value-table td:nth-child(2) { grid-column: 1 / -1; grid-row: 2; color: var(--muted); font-size: 14px; }
  .value-table td.today { padding-right: 0; }
  .value-table td.blank { grid-column: 1 / -1; min-width: 0; height: 28px; }
  .value-table tr.total { border-top: 3px double var(--ink); }
  .value-table tr.total td { border-top: 0; }
  .letter { padding: 20px; font-size: 17px; }
  .letter-sign { grid-template-columns: auto 1fr; }
}
@media print {
  #value-section, #storage-section, #letter-section { break-before: page; }
  .value-table { font-size: 10.5pt; }
  .value-table td.blank { height: 9mm; }
  .letter { border: 0; padding: 0; background: none; font-size: 13pt; max-width: none; }
  .letter-holdings li { break-inside: avoid; }
}

/* After paying: save now, couples switch, list on another device */
.plan-page .button[hidden], .elsewhere[hidden], .joint[hidden] { display: none; }
#save-now-row { margin-top: 12px; }
#save-now-row:not(:has(.button:not([hidden]))) { display: none; }
.plan-page .who-bar { margin: 12px 0 0; }
.elsewhere { border: 1.5px solid var(--brass); }
.elsewhere ol { margin: 12px 0 0; padding-left: 22px; display: grid; gap: 10px; }

/* Couples: joint estimate */
.joint { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.joint h3 { margin: 0 0 8px; }
.joint .result-card { max-width: 460px; margin-top: 12px; }
.joint .result-figure { font-size: 36px; }

/* Logins and two-factor codes */
.logins-table { width: 100%; border-collapse: collapse; font-size: 15px; margin-top: 8px; }
.logins-table th { text-align: left; font: 650 12px/1.4 var(--body); color: var(--muted); padding: 8px 10px 8px 0; border-bottom: 1.5px solid var(--ink); }
.logins-table td { padding: 10px 10px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.logins-table td:first-child { width: 28%; }
.logins-table .sub { display: block; color: var(--muted); font-size: 13px; }
.logins-table input, .logins-table select { width: 100%; font: inherit; font-size: 15px; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--ink); }
#logins-error { margin-top: 12px; }
#logins-error[hidden] { display: none; }
@media screen and (max-width: 720px) {
  .logins-table thead { display: none; }
  .logins-table, .logins-table tbody, .logins-table tr, .logins-table td { display: block; width: 100% !important; }
  .logins-table tr { border-bottom: 1px solid var(--line); padding: 10px 0; }
  .logins-table td { border: 0; padding: 4px 0; }
}
@media print {
  .logins-table { font-size: 10pt; }
  .logins-table td { height: 9mm; }
  .logins-table .login-value { display: block; }
  .logins-table tr { break-inside: avoid; }
  #logins-section { break-before: auto; }
  .plan-page h2, .plan-page .section-num { break-after: avoid; }
  .joint { break-inside: avoid; }
}
@media screen and (max-width: 720px) {
  .logins-table td[data-label]::before { content: attr(data-label); display: block; font: 650 11px/1.4 var(--body); color: var(--muted); margin-bottom: 4px; }
}

/* Scam warning, power of attorney, solicitor note and letter of wishes */
.scam-box { margin-bottom: 0; }
.scam-box ul { display: grid; gap: 4px; }
#lpa-section h3 { margin-top: 24px; }
.solicitor-note { margin-top: 24px; padding: 18px 20px; border-left: 3px solid var(--brass); background: var(--brass-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.solicitor-note h3 { margin-bottom: 6px; }
.solicitor-note p { margin: 0; font-size: 15px; }
.wishes-form { display: grid; gap: 18px; }
.wishes-form textarea {
  width: 100%;
  font: 16px/1.5 var(--body);
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  resize: vertical;
}
.wishes-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.wishes-print { font-family: var(--display); font-size: 13pt; line-height: 1.6; }
.wishes-print h3 { font-family: var(--body); font-size: 11pt; margin: 6mm 0 2mm; }
.wishes-print .wish-text { white-space: pre-line; margin: 0; }
.wishes-print .write-in { height: 22mm; border-bottom: 1px solid #999; background: repeating-linear-gradient(transparent 0 7mm, #ccc 7mm calc(7mm + 1px)); margin: 0; }
@media print {
  .wishes-form, #copy-lpa { display: none; }
  #scam-section, #lpa-section, #wishes-section { break-before: page; }
  .solicitor-note { break-inside: avoid; }
  .scam-box { background: none; border: 1px solid #b33; }
}
@media print {
  /* Keep each section number on the same line as its heading, so it can't be left at the bottom of a page. */
  .plan-page .panel > .section-num { float: left; margin: 1.5mm 3mm 0 0; }
  .plan-page .panel > .section-num + h2 { margin-top: 0; }
  .plan-page .panel > * { clear: none; }
}
@media print {
  #cgt-section, #will-section .solicitor-note { break-inside: avoid; }
  #will-section { break-before: page; }
}
.wishes-letter h3 { font-family: var(--body); font-size: 15px; margin: 18px 0 4px; }
.wishes-letter h3:first-of-type { margin-top: 8px; }

/* Free calculator page */
.calc-page .intro { margin-bottom: 8px; }
.calc-upsell { margin-top: 20px; padding: 18px 20px; border: 1px solid var(--line); border-left: 3px solid var(--brass); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--brass-soft); }
.calc-upsell p { font-size: 15px; margin-bottom: 14px; }
.calc-article { max-width: 760px; margin-top: 56px; }
.calc-article h2 { font-size: 30px; margin-top: 44px; margin-bottom: 14px; }
.calc-article ul { max-width: 64ch; padding-left: 22px; }
.calc-article li { margin-bottom: 10px; }
.calc-article li::marker { color: var(--brass); }

/* Branded printed plan: navy cover, running header with the logo, page numbers,
   and a clear split between the personal plan and general guidance. */
@page {
  size: A4;
  margin: 22mm 17mm 20mm;
  @top-left { content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' width='14' height='14'%3E%3Crect width='32' height='32' rx='8' fill='%230f2340'/%3E%3Cpath d='M16 6.2l8.2 3.1v6.3c0 5.1-3.5 8.8-8.2 10.6-4.7-1.8-8.2-5.5-8.2-10.6V9.3z' fill='none' stroke='%23f27a9b' stroke-width='1.9' stroke-linejoin='round'/%3E%3Ccircle cx='16' cy='14.2' r='2.5' fill='%23f27a9b'/%3E%3Cpath d='M14.9 16h2.2l.7 4.6h-3.6z' fill='%23f27a9b'/%3E%3C/svg%3E") "  WalletLegacy"; font: 600 8.5pt "Schibsted Grotesk", sans-serif; color: #0f2340; vertical-align: bottom; padding-bottom: 3mm; border-bottom: 0.6pt solid #c22d57; }
  @top-right { content: "Private and confidential"; font: 650 7.5pt "Schibsted Grotesk", sans-serif; color: #c22d57; vertical-align: bottom; padding-bottom: 3mm; border-bottom: 0.6pt solid #c22d57; }
  @bottom-left { content: "Crypto Inheritance Plan · walletlegacy.com"; font: 400 7.5pt "Schibsted Grotesk", sans-serif; color: #6b7385; vertical-align: top; padding-top: 3mm; }
  @bottom-right { content: "Page " counter(page) " of " counter(pages); font: 400 7.5pt "Schibsted Grotesk", sans-serif; color: #6b7385; vertical-align: top; padding-top: 3mm; }
}
@page :first {
  margin: 0;
  @top-left { content: none; }
  @top-right { content: none; }
  @bottom-left { content: none; }
  @bottom-right { content: none; }
}
@media print {
  html { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body { font-size: 10.5pt; }
  .plan-page .wrap { max-width: none; padding: 0; }
  .plan-page { padding: 0; }

  /* Cover */
  .print-cover {
    display: flex; flex-direction: column; box-sizing: border-box;
    width: 210mm; height: 296.5mm; padding: 20mm 20mm 18mm; overflow: hidden;
    position: relative;
    background: url("/images/rosette.svg") 85mm 45mm / 200mm 200mm no-repeat, linear-gradient(165deg, #102546, #0b1a33 60%);
    color: #eef1f7; break-after: page;
  }
  /* The plan is tied with legal tape, like papers from a solicitor */
  .print-cover::before { content: ""; position: absolute; top: 0; bottom: 0; left: 12mm; width: 5mm; background: linear-gradient(90deg, #b3244d, #d3406a 45%, #b3244d); }
  .print-cover > * { position: relative; margin-left: 6mm; }
  .cover-top { display: flex; justify-content: space-between; align-items: center; }
  .cover-brand { display: flex; align-items: center; gap: 3mm; margin: 0; font: 400 18pt/1 var(--display); color: #fff; letter-spacing: -0.01em; }
  .cover-brand svg { width: 11mm; height: 11mm; }
  .cover-brand span span { color: #f27a9b; }
  .cover-conf { margin: 0; font: 650 8pt/1 var(--body); color: #f27a9b; border: 0.8pt solid rgba(242, 122, 155, 0.6); border-radius: 0.6mm; padding: 2mm 4mm; }
  .cover-main { margin-top: auto; padding-bottom: 14mm; }
  .cover-eyebrow { margin: 0 0 5mm; font: 650 10pt/1 var(--body); color: #f27a9b; }
  .cover-eyebrow::before { content: none; }
  .print-cover h1 { font: 400 38pt/1.08 var(--display); color: #fff; margin: 0 0 6mm; letter-spacing: -0.01em; }
  .print-cover h1 span { display: block; color: #f27a9b; }
  .cover-sub { max-width: 130mm; margin: 0; font-size: 12.5pt; line-height: 1.5; color: #c4cbdb; }
  .cover-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6mm; margin: 0; padding: 7mm 0; border-top: 0.8pt solid rgba(242, 122, 155, 0.5); border-bottom: 0.8pt solid rgba(242, 122, 155, 0.5); }
  .cover-facts dt { font: 650 7.5pt/1.3 var(--body); color: #a9b3c8; margin-bottom: 2mm; }
  .cover-facts dd { margin: 0; font: 600 12.5pt/1.3 var(--body); color: #fff; }
  .cover-note { margin: 7mm 0 0; padding: 0; background: none; border: 0; font-size: 9pt; line-height: 1.5; color: #a9b3c8; max-width: 150mm; }

  /* At a glance */
  .print-glance { break-after: page; }
  .part-eyebrow { margin: 0 0 2mm; font: 650 8.5pt/1 var(--body); color: #c22d57; }
  .glance-title { font: 400 24pt/1.15 var(--display); color: #0f2340; margin: 0 0 5mm; padding-bottom: 3mm; border-bottom: 1.2pt solid #0f2340; }
  .glance-summary { display: grid; grid-template-columns: 1.3fr 1fr 1fr; border: 0.8pt solid #d2d8cf; border-radius: 1mm; background: #fbfbf8; margin-bottom: 5mm; }
  .glance-fig { position: relative; padding: 4mm 5mm; }
  .glance-fig + .glance-fig { border-left: 0.8pt solid #d2d8cf; }
  .glance-fig.is-main::before { content: ""; position: absolute; left: 5mm; top: 0; width: 10mm; height: 1mm; background: #c22d57; }
  .glance-fig span { display: block; font: 650 8pt/1.3 var(--body); color: #4e5c6d; }
  .glance-fig strong { display: block; font: 400 18pt/1.15 var(--display); color: #0f2340; margin: 2mm 0 1.2mm; overflow-wrap: anywhere; }
  .glance-fig.is-main strong { font-size: 24pt; }
  .glance-fig em { display: block; font-style: normal; font-size: 8.5pt; color: #4e5c6d; }
  .glance-held { margin-bottom: 5mm; }
  .glance-held h3 { font: 400 13pt/1.3 var(--display); color: #0f2340; margin: 0 0 2.5mm; }
  .glance-held .dash-alloc { height: 3mm; gap: 0.6mm; border-radius: 0.6mm; margin-bottom: 1mm; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .glance-held .dash-c0 { background: #c22d57; }
  .glance-held .dash-c1 { background: #0f2340; }
  .glance-held .dash-c2 { background: #5a6780; }
  .glance-held .dash-c3 { background: #8a94a7; }
  .glance-held .dash-c4 { background: #b0b8c6; }
  .glance-held .dash-c5 { background: #cfd4dd; }
  .glance-table { width: 100%; border-collapse: collapse; font-size: 9.5pt; }
  .glance-table thead th { text-align: left; font: 650 7.5pt/1 var(--body); color: #4e5c6d; padding: 2mm 0 1.5mm; }
  .glance-table .num { text-align: right; white-space: nowrap; padding-left: 4mm; }
  .glance-table tbody tr { border-top: 0.6pt solid #d2d8cf; }
  .glance-table tbody th, .glance-table tbody td { padding: 1.6mm 0; vertical-align: baseline; }
  .glance-table tbody th { text-align: left; font-weight: 600; color: #0f2340; }
  .glance-table tbody th small { font-weight: 400; font-size: 8.5pt; color: #4e5c6d; margin-left: 2.5mm; }
  .glance-table .dash-swatch { display: inline-block; width: 2.2mm; height: 2.2mm; border-radius: 0.4mm; margin-right: 2.3mm; vertical-align: 0.1mm; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .glance-table td.num + td.num { color: #4e5c6d; width: 1%; }
  .glance-parts { display: grid; grid-template-columns: 1fr 1fr; gap: 5mm; margin-bottom: 6mm; }
  .glance-part { border: 0.8pt solid #d2d8cf; border-radius: 1mm; padding: 4mm 5mm; }
  .glance-part.personal { border: 1.2pt solid #c22d57; background: #f4dde4; }
  .glance-part h3 { font: 400 11.5pt/1.3 var(--display); color: #0f2340; margin: 0 0 1mm; }
  .glance-part p { margin: 0 0 3mm; font-size: 9pt; color: #5a6275; }
  .glance-part ol { margin: 0; padding-left: 6mm; display: grid; gap: 0.8mm; font-size: 10pt; }
  .glance-part li::marker { color: #c22d57; font-weight: 600; }
  .print-glance > h2 { font: 400 13pt/1.3 var(--display); color: #0f2340; margin: 0 0 3mm; }
  .print-glance .first-steps { margin: 0; padding-left: 6mm; display: grid; gap: 1mm; font-size: 9.5pt; }

  /* Section headings */
  .plan-page .panel { margin-top: 0; padding-top: 2mm; }
  .plan-page .panel h2, .plan-page .plan-head h2 { font: 400 20pt/1.2 var(--display); color: #0f2340; margin: 0; }
  .plan-page .section-num { width: 9mm; height: 9mm; background: #0f2340; color: #f27a9b; font-size: 12pt; }
  .plan-page .panel > .section-num, .plan-head .section-num { float: left; margin: 0.5mm 3.5mm 0 0; }
  .section-tag { clear: both; display: block; margin: 2.5mm 0 6mm; padding-bottom: 2.5mm; border-bottom: 0.6pt solid #d2d8cf; font: 650 7.5pt/1.3 var(--body); color: #6b7385; }
  .section-tag.personal { color: #c22d57; border-bottom-color: #c22d57; }
  .section-tag.personal::before { content: "✓  "; }
  .plan-head { display: block; }
  .plan-head .plan-meta { display: none; }
  .plan-total { display: none; }
  .part-divider { break-before: page; padding-top: 70mm; }
  .part-divider h2 { font: 400 30pt/1.1 var(--display); color: #0f2340; margin: 0 0 5mm; }
  .part-divider p:last-child { max-width: 130mm; font-size: 11.5pt; line-height: 1.55; color: #3b4356; border-top: 0.8pt solid #c22d57; padding-top: 5mm; }

  /* Brand colours for the figures */
  .holdings-table th, .value-table th, .logins-table th { border-bottom-color: #0f2340; color: #6b7385; }
  .holdings-table .num { color: #0f2340; }
  .result-card { background: linear-gradient(160deg, #0f2340, #102546); color: #eef1f7; border: 0; border-radius: 1mm; }
  .result-card .result-label { color: #f27a9b; }
  .result-card .result-figure { color: #fff; }
  .result-card .result-line, .result-card .breakdown td { color: #a9b3c8; border-color: rgba(255, 255, 255, 0.12); }
  .result-card .breakdown .num, .result-card .breakdown .subtotal td { color: #fff; }
  .guide-card { background: #faf8f3; border-color: #e3dccb; }
  .guide-steps li::before { background: #0f2340; color: #f27a9b; }
  .print-footer { border-top: 0.8pt solid #c22d57; color: #5a6275; }
}
@media print {
  #logins-section { break-before: page; }
  .section-tag { break-after: avoid; }
}
@media print {
  .print-glance { padding-top: 3mm; }
  .print-glance .glance-title { font: 400 26pt/1.15 var(--display); color: #0f2340; margin: 1mm 0 7mm; }
  .plan-page .section-tag { max-width: none; }
}
@media print {
  .plan-page .logins-table td { height: auto; padding: 2.2mm 3mm 2.2mm 0; }
  #login-tips { font-size: 9.5pt; gap: 1mm; }
  #will-section { margin-top: 0; }
}

/* Example plan: Part 1 and Part 2 headings */
.part-heading { margin: 48px 0 -8px; padding-top: 20px; border-top: 2px solid var(--brass-bright); }
.part-heading span { font: 650 12px/1 var(--body); color: var(--brass); }
.part-heading h2 { font-size: 32px; margin: 8px 0 6px; }
.part-heading p { margin: 0; color: var(--muted); }

/* Printed plan inner pages read as a document, not boxes on a page:
   no panels or cards, tape section numerals, certificate double rules and
   accounting-style totals. */
@media print {
  .plan-page .panel { background: none; border: 0; border-radius: 0; box-shadow: none; }
  .plan-page .panel h2 { font-size: 24pt; line-height: 1.1; }
  .plan-page .section-num,
  .plan-page .panel > .section-num {
    width: auto; height: auto; background: none; border-radius: 0;
    margin: 0 4mm 0 0; padding: 0.5mm 4mm 0.5mm 0; border-right: 0.8pt solid #c22d57;
    color: #c22d57; font: 400 24pt/1.1 var(--display);
  }
  .section-tag { margin: 3mm 0 7mm; padding-bottom: 3mm; border-bottom: 2.4pt double #0f2340; color: #4e5c6d; }
  .section-tag.personal { color: #c22d57; border-bottom-color: #0f2340; }
  .section-tag.personal::before { content: none; }

  .holdings-table td, .value-table td, .logins-table td { border-bottom-color: #d2d8cf; }
  .holdings-table th, .value-table th, .logins-table th { border-bottom: 1.2pt solid #0f2340; }
  .value-table .sub, .holdings-table .sub { font-size: 9pt; }
  .value-table tr.total td { border-top: 2.4pt double #0f2340; color: #0f2340; }
  .value-note { font-size: 8.5pt; }

  .safety, .scam-box { background: none; border: 0; border-left: 1.2mm solid #a8321f; border-radius: 0; padding: 1mm 0 1mm 5mm; }
  .guide-cards { gap: 0; }
  .guide-card { background: none; border: 0; border-top: 1.2pt solid #0f2340; border-radius: 0; padding: 4mm 0 6mm; }
  .guide-type { color: #c22d57; }
  .guide-card h3 { font-size: 17pt; }
  .guide-facts { background: none; border-radius: 0; padding: 2mm 0; border-top: 0.6pt solid #d2d8cf; border-bottom: 0.6pt solid #d2d8cf; font-size: 9.5pt; }
  .guide-steps li { padding-left: 9mm; }
  .guide-steps li::before { width: auto; height: auto; background: none; border-radius: 0; display: block; color: #c22d57; font: 400 14pt/1.1 var(--display); }
  .result-notes li { background: none; border-radius: 0; padding: 1mm 0 1mm 4mm; border-left: 0.8mm solid #c22d57; }
  .will-wording, .solicitor-note { background: none; border-radius: 0; border-left: 1mm solid #c22d57; padding: 1mm 0 1mm 6mm; }
}
@media print {
  .plan-page tfoot.print-only { display: table-footer-group; }
  .holdings-table tr.total td { font-weight: 650; color: #0f2340; border-top: 2.4pt double #0f2340; border-bottom: 0; padding-top: 3mm; }
  .plan-page #tax-section { break-before: page; }
  .value-table th:first-child, .value-table td:first-child { width: 27%; }
  .value-table td:nth-child(2) { font-size: 9pt; color: #4e5c6d; }
}
@media print {
  /* Figures and the estimate side by side, so section 2 fits on one page */
  .plan-page #tax-section .calc { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: 8mm; align-items: start; }
  .plan-page #tax-section .figures { margin: 0; }
  .breakdown-print { font-size: 9.5pt; }
  .breakdown-print td { padding: 1.5mm 0; border-bottom-color: #d2d8cf; }
  .breakdown-print td.num, .breakdown-print td:last-child { text-align: right; padding-left: 3mm; }
  #tax-section .result-card { padding: 5mm; }
  #tax-section .result-figure { font-size: 30pt; }
  #tax-section .breakdown { font-size: 9pt; }
  #tax-section .breakdown td { padding: 1.5mm 0; }
  #tax-section .result-notes { font-size: 8.5pt; margin-top: 4mm; gap: 2.5mm; }
  #tax-section .disclaimer { font-size: 8.5pt; color: #4e5c6d; margin-top: 6mm; border-top: 0.6pt solid #d2d8cf; padding-top: 3mm; }
}

/* On screen, section headings match the printed plan: a tape numeral beside the title */
@media screen {
  .plan-page .section-num {
    width: auto; height: auto; border-radius: 0; background: none;
    float: left; margin: 2px 16px 0 0; padding-right: 16px; border-right: 1px solid var(--tape);
    color: var(--tape); font: 400 34px/1.1 var(--display);
  }
  .plan-page .panel > h2 { line-height: 1.2; padding-bottom: 14px; margin-bottom: 16px; border-bottom: 3px double var(--ink); }
  .plan-page .panel > .hint { clear: left; margin-bottom: 22px; }
  .plan-page .plan-head { padding-bottom: 14px; margin-bottom: 8px; border-bottom: 3px double var(--ink); }
  .plan-page .plan-head .plan-meta { clear: left; }
  .plan-page .safety { background: none; border-radius: 0; border-left: 4px solid var(--bad); padding: 4px 0 4px 20px; }
  .plan-page .guide-cards { gap: 0; }
  .plan-page .guide-card { background: none; border: 0; border-top: 1.5px solid var(--ink); border-radius: 0; padding: 18px 0 24px; }
  .plan-page .guide-facts { background: none; border-radius: 0; padding: 8px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .plan-page .guide-steps li::before { width: auto; height: auto; border-radius: 0; background: none; display: block; color: var(--tape); font: 400 20px/1.2 var(--display); }
  .plan-page .guide-steps li { padding-left: 30px; }
  .example-tax + .disclaimer, #tax-section .disclaimer { border-top: 1px solid var(--line); padding-top: 14px; }
}

/* Planning for the bill: five calculations under the estimate */
.whatif { margin-top: 36px; }
.whatif[hidden] { display: none; }
.whatif-title { font: 400 28px/1.15 var(--display); margin: 0 0 4px; }
.whatif-intro { color: var(--muted); margin: 0 0 18px; }
.whatif-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; }
.whatif-item { border-top: 1.5px solid var(--ink); padding: 16px 0 26px; break-inside: avoid; }
.whatif-item h4 { font: 400 21px/1.2 var(--display); margin: 0 0 8px; color: var(--ink); }
.whatif-item p { font-size: 15px; margin: 0 0 12px; color: var(--ink-soft); }
.whatif-item .whatif-answer { padding-left: 12px; border-left: 3px solid var(--tape); color: var(--ink); font-weight: 500; }
.whatif-item .whatif-answer.good { border-left-color: var(--good); }
.whatif-item .whatif-answer.bad { border-left-color: var(--bad); }
.whatif-item .whatif-small { font-size: 13.5px; color: var(--muted); }
.whatif-table { width: 100%; border-collapse: collapse; font-size: 14.5px; margin: 0 0 12px; }
.whatif-table th { text-align: left; font: 650 12px/1.4 var(--body); color: var(--muted); padding: 6px 0; border-bottom: 1.2px solid var(--ink); }
.whatif-table td { padding: 7px 0; border-bottom: 1px solid var(--line); }
.whatif-table .num { text-align: right; padding-left: 10px; white-space: nowrap; }
.whatif-table tr.now td { font-weight: 650; }
@media (max-width: 820px) { .whatif-grid { grid-template-columns: 1fr; } }

/* Who gets what */
.heirs { margin: 8px 0 28px; }
.heirs[hidden] { display: none; }
.heirs h3 { font: 400 22px/1.2 var(--display); margin: 0 0 6px; }
.heirs-table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 8px 0 14px; }
.heirs-table th { text-align: left; font: 650 12px/1.4 var(--body); color: var(--muted); padding: 6px 10px 6px 0; border-bottom: 1.2px solid var(--ink); }
.heirs-table td { padding: 8px 10px 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.heirs-table .num { text-align: right; padding-right: 0; white-space: nowrap; }
.heirs-table input { width: 100%; font: inherit; font-size: 15px; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); }
.heirs-table .heir-name { font-weight: 650; }
.heirs-table .write-in-row td { height: 30px; }
.heirs-note { font-size: 14px; color: var(--muted); margin: 0; max-width: 70ch; }

@media print {
  #whatif { break-before: page; margin-top: 0; }
  .whatif-title { font-size: 20pt; }
  .whatif-intro { font-size: 9.5pt; margin-bottom: 4mm; }
  .whatif-grid { gap: 0 8mm; }
  .whatif-item { padding: 3mm 0 4mm; border-top: 1pt solid #0f2340; }
  .whatif-item h4 { font-size: 13pt; margin-bottom: 1.5mm; }
  .whatif-item p { font-size: 8.8pt; margin-bottom: 2mm; line-height: 1.45; }
  .whatif-item .whatif-small { font-size: 8pt; }
  .whatif-table { font-size: 8.8pt; margin-bottom: 2mm; }
  .whatif-table th { font-size: 7.5pt; padding: 1mm 0; }
  .whatif-table td { padding: 1.2mm 0; }
  .heirs { break-inside: avoid; margin-bottom: 8mm; }
  .heirs h3 { font-size: 14pt; }
  .heirs-table { font-size: 9.5pt; }
  .heirs-table .write-in-row td { height: 8mm; }
  .heirs-note { font-size: 8.5pt; }
}
.heirs-table th.num { text-align: right; }
#heirs-input .num { padding-right: 16px; }
#heirs-input td:first-child { padding-top: 16px; }
#heirs-input td:last-child { width: 50%; }
@media (max-width: 600px) {
  #heirs-input thead { display: none; }
  #heirs-input tr { display: grid; grid-template-columns: 1fr auto; padding: 8px 0; border-bottom: 1px solid var(--line); }
  #heirs-input td { border: 0; padding: 2px 0; }
  #heirs-input td:last-child { grid-column: 1 / -1; width: auto; }
}

/* Adding to the list and logins on the plan page itself */
.plan-edit { display: grid; gap: 28px; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.plan-edit h3 { font: 400 22px/1.2 var(--display); margin: 0; }
.plan-edit .form { gap: 14px; }
.holdings-table .link-button, .logins-table .link-button { display: block; margin-top: 6px; font-size: 13px; color: var(--muted); }
.add-login { margin-top: 18px; }
.add-login label { display: block; font-weight: 650; margin-bottom: 7px; }
.add-login-row { display: flex; gap: 10px; flex-wrap: wrap; }
.add-login-row input { flex: 1 1 260px; font: 16px var(--body); padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); }
.plan-edit [hidden] { display: none !important; }

/* Dashboard at the top of the plan. It's the one part of the plan that's a
   tool rather than a document, so it reads like an app, but it keeps the
   page's column so its left edge lines up with the text above. */
/* It uses the same dark "console" look as the Security Check-up and the
   Executor Kit dashboards: the page's tokens are swapped for the console's
   palette inside it, so every rule below works in both. */
.dashboard {
  --bg: #0b1628;
  --bg-deep: #11213a;
  --surface: #0d1a2e;
  --ink: #e8ecf1;
  --ink-soft: #cbd3df;
  --muted: #8d9bb3;
  --line: #1d2f4c;
  --line-strong: #2b4167;
  --accent-hover: #c22d57;
  --tape: #f27a9b;
  --good: #79c9a2;
  --bad: #f39a8a;
  --shadow-sm: none;
  margin-block: 8px 40px; display: grid; gap: 10px;
  padding: 18px; color: var(--ink); font-size: 15px;
  background: radial-gradient(120% 60% at 100% 0%, rgba(242, 122, 155, 0.07), transparent 60%), linear-gradient(180deg, #0b1628, #08111f);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg);
}
.dashboard .dash-bar { border-bottom: 1px solid var(--line); padding: 2px 4px 14px; }
.dashboard .dash-title h2 { color: #fff; display: flex; align-items: center; gap: 12px; }
.dashboard .dash-title h2::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 4px rgba(121, 201, 162, 0.16); flex: none; }
.dashboard .dash-btn.is-primary { background: #c22d57; border-color: #c22d57; color: #fff; }
.dashboard .dash-btn.is-primary:hover { background: #d3406a; border-color: #d3406a; }
.dashboard .dash-summary { gap: 10px; background: none; border: 0; overflow: visible; }
.dashboard .dash-summary::before { display: none; }
.dashboard .dash-figure { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.dashboard .dash-figure + .dash-figure { border-left: 1px solid var(--line); }
.dashboard .dash-figure::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--fig-tone, #8fb8d8); }
.dashboard .dash-figure.is-main { --fig-tone: var(--tape); }
.dashboard .dash-figure:first-child::after { display: none; }
.dashboard .dash-figure h3 { font-size: 13px; }
.dashboard .dash-num { color: #fff; }
.dashboard .dash-num[data-trend="up"] { color: var(--good); }
.dashboard .dash-num[data-trend="down"] { color: var(--bad); }
.dashboard .dash-figure:has([data-trend="up"]) { --fig-tone: var(--good); }
.dashboard .dash-figure:has([data-trend="down"]) { --fig-tone: var(--bad); }
.dashboard .dash-figure:nth-child(3) { --fig-tone: #f0a35e; }
.dashboard .dash-card-head h3 { font: 650 14px/1.3 var(--body); color: var(--ink); display: flex; align-items: center; gap: 8px; }
.dashboard .dash-card-head h3::before { content: ""; width: 6px; height: 6px; border: 1.5px solid var(--tape); border-radius: 1px; }
.dashboard .dash-cols { gap: 10px; }
.dashboard .dash-plot .area { fill: #79c9a2; opacity: 0.1; }
.dashboard .dash-plot .hatch { stroke: #79c9a2; opacity: 0.12; }
.dashboard .dash-plot .line { stroke: #79c9a2; }
.dashboard .dash-plot .grid { stroke: #22365a; }
.dashboard .dash-dot { background: #08111f; border-color: #79c9a2; }
.dashboard .dash-tip { background: #e8ecf1; color: #08111f; }
.dashboard .dash-c1 { background: #8fb8d8; }
.dashboard .dash-c2 { background: #f0a35e; }
.dashboard .dash-c3 { background: #d9c27a; }
.dashboard .dash-c4 { background: #79c9a2; }
.dashboard .dash-c5 { background: #5a6780; }
.dashboard .dash-steps li.done { background: var(--good); }
.dashboard .dash-tick svg { color: #08111f; }
.dashboard .dash-link:hover { background: #e8ecf1; color: #08111f; border-color: #e8ecf1; }
.dashboard .dash-privacy { padding: 4px 4px 0; }
.dashboard .dash-chart.is-empty { background: repeating-linear-gradient(135deg, transparent 0 7px, #0b1628 7px 8px); }
.dashboard svg { fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.dashboard a { text-underline-offset: 3px; }

.dash-bar { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px 24px; flex-wrap: wrap; padding-bottom: 16px; border-bottom: 2px solid var(--ink); }
.dash-title h2 { margin: 0; font: 400 clamp(28px, 4vw, 36px)/1.1 var(--display); text-wrap: balance; }
.dash-title p { margin: 6px 0 0; font-size: 14px; color: var(--muted); max-width: 60ch; }
.dash-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.dash-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; font: 650 15px/1 var(--body); color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); cursor: pointer; transition: background 0.15s var(--ease-out), border-color 0.15s var(--ease-out), transform 0.15s var(--ease-out); }
.dash-btn svg { width: 17px; height: 17px; flex: none; }
.dash-btn:hover { border-color: var(--ink); background: var(--bg); }
.dash-btn:active { transform: translateY(1px); }
.dash-btn:disabled { cursor: progress; opacity: 0.7; }
.dash-btn.is-primary { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.dash-btn.is-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

/* The three figures, on one strip rather than three cards */
.dash-summary { position: relative; overflow: hidden; display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.dash-summary::before { content: ""; position: absolute; width: 300px; height: 300px; left: -110px; top: -120px; background: var(--ink); opacity: 0.07; -webkit-mask: var(--rosette) center / contain no-repeat; mask: var(--rosette) center / contain no-repeat; pointer-events: none; }
.dash-figure { position: relative; padding: 20px 24px 22px; display: grid; align-content: start; gap: 6px; }
.dash-figure + .dash-figure { border-left: 1px solid var(--line); }
.dash-figure h3 { margin: 0; font: 650 14px/1.3 var(--body); color: var(--muted); }
.dash-num { margin: 2px 0 0; font: 400 30px/1.1 var(--display); color: var(--ink); letter-spacing: -0.01em; }
.dash-figure.is-main .dash-num { font-size: 44px; }
.dash-num[data-trend="up"] { color: var(--good); }
.dash-sign { font: 500 0.8em/1 var(--body); margin-right: 2px; vertical-align: 0.1em; }
.dash-num[data-trend="down"] { color: var(--bad); }
.dash-num.is-words { font: 600 19px/1.3 var(--body); padding-top: 8px; }
.dash-sub { margin: 0; font-size: 14px; color: var(--muted); }
.dash-sub a { color: var(--ink); font-weight: 600; }
.dash-figure:first-child::after { content: ""; position: absolute; left: 24px; top: 0; width: 44px; height: 4px; background: var(--tape); }

.dash-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 18px 22px 20px; min-width: 0; }
.dash-card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 16px; }
.dash-card-head h3 { margin: 0; font: 400 22px/1.2 var(--display); }
.dash-count { font: 600 14px/1 var(--body); color: var(--muted); }

.dash-seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden; }
.dash-seg button { font: 600 14px/1 var(--body); color: var(--muted); background: transparent; border: 0; padding: 8px 12px; cursor: pointer; transition: background 0.15s var(--ease-out), color 0.15s var(--ease-out); }
.dash-seg button + button { border-left: 1px solid var(--line-strong); }
.dash-seg button:hover { color: var(--ink); background: var(--bg); }
.dash-seg button[aria-pressed="true"] { background: var(--ink); color: var(--surface); }
.dash-seg button:focus-visible { outline-offset: -3px; }

/* Value over time */
.dash-chart { display: grid; grid-template-columns: 52px 1fr; grid-template-rows: 240px auto; column-gap: 10px; border-radius: var(--radius-sm); cursor: crosshair; touch-action: pan-y; }
.dash-chart:focus-visible { outline: 2px solid var(--tape); outline-offset: 6px; }
.dash-yaxis { position: relative; font-size: 12.5px; color: var(--muted); }
.dash-yaxis span { position: absolute; right: 0; transform: translateY(-50%); white-space: nowrap; }
.dash-plot { position: relative; }
.dash-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.dash-plot .grid { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.dash-plot .area { fill: var(--ink); stroke: none; opacity: 0.05; }
.dash-plot .hatch { stroke: var(--ink); stroke-width: 1; opacity: 0.16; }
.dash-plot .line { stroke: var(--ink); stroke-width: 2.25; vector-effect: non-scaling-stroke; }
.dash-layer { position: absolute; inset: 0; pointer-events: none; }
.dash-cross { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--ink); opacity: 0; transition: opacity 0.15s var(--ease-out); }
.dash-dot { position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--surface); border: 2.5px solid var(--tape); }
.dash-tip { position: absolute; display: grid; gap: 2px; padding: 8px 11px; background: var(--ink); color: var(--surface); border-radius: var(--radius-sm); box-shadow: var(--shadow-md); transform: translate(-50%, calc(-100% - 14px)); white-space: nowrap; opacity: 0; transition: opacity 0.15s var(--ease-out); }
.dash-tip strong { font: 400 19px/1.1 var(--display); }
.dash-tip span { font-size: 12.5px; opacity: 0.8; }
.dash-tip.is-left { transform: translate(calc(-100% + 12px), calc(-100% - 14px)); }
.dash-tip.is-right { transform: translate(-12px, calc(-100% - 14px)); }
.dash-chart.is-active .dash-cross { opacity: 0.25; }
.dash-chart.is-active .dash-tip { opacity: 1; }
.dash-print-mark { position: absolute; top: 0; bottom: 0; display: flex; align-items: flex-end; border-left: 1.5px dashed var(--tape); padding: 0 0 8px 6px; font: 600 12.5px/1 var(--body); color: var(--tape); white-space: nowrap; }
.dash-print-mark.is-end { border-left: 0; border-right: 1.5px dashed var(--tape); padding: 0 6px 8px 0; transform: translateX(-100%); }
.dash-xaxis { grid-column: 2; display: flex; justify-content: space-between; gap: 12px; padding-top: 8px; font-size: 12.5px; color: var(--muted); }
.dash-chart.is-empty { display: grid; grid-template: none / none; place-items: center; min-height: 180px; cursor: default; border: 1px dashed var(--line-strong); background: repeating-linear-gradient(135deg, transparent 0 7px, var(--bg) 7px 8px); }
.dash-chart-empty { margin: 0; padding: 20px; max-width: 46ch; text-align: center; color: var(--muted); font-size: 15px; background: var(--surface); }
.dash-chart-read { margin: 12px 0 0; font-size: 14px; color: var(--muted); }
.dash-chart-read:empty { display: none; }

/* Where it's held */
.dash-cols { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; align-items: start; }
.dash-alloc { display: flex; gap: 2px; height: 14px; border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 8px; }
.dash-alloc span { flex: 1 1 0; min-width: 3px; transition: opacity 0.15s var(--ease-out); }
.dash-c0 { background: var(--tape); }
.dash-c1 { background: var(--ink); }
.dash-c2 { background: color-mix(in srgb, var(--ink) 68%, var(--surface)); }
.dash-c3 { background: color-mix(in srgb, var(--ink) 46%, var(--surface)); }
.dash-c4 { background: color-mix(in srgb, var(--ink) 30%, var(--surface)); }
.dash-c5 { background: color-mix(in srgb, var(--ink) 18%, var(--surface)); }
.dash-alloc .is-dim, .dash-table tr.is-dim { opacity: 0.35; }
.dash-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.dash-table thead th { padding: 8px 0 6px; text-align: left; font-weight: 400; }
.dash-table thead th.num { text-align: right; }
.dash-table thead button { font: 650 13px/1 var(--body); color: var(--muted); background: none; border: 0; padding: 4px 0; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.dash-table thead button:hover { color: var(--ink); }
.dash-table thead th[aria-sort="ascending"] button, .dash-table thead th[aria-sort="descending"] button { color: var(--ink); }
.dash-table thead th[aria-sort="descending"] button::after, .dash-table thead th[aria-sort="ascending"] button::after { content: ""; width: 5px; height: 5px; border: solid currentColor; border-width: 0 1.75px 1.75px 0; transform: translateY(-2px) rotate(45deg); }
.dash-table thead th[aria-sort="ascending"] button::after { transform: translateY(1px) rotate(-135deg); }
.dash-table tbody tr { border-top: 1px solid var(--line); transition: opacity 0.15s var(--ease-out), background 0.15s var(--ease-out); }
.dash-table tbody tr:hover { background: var(--bg); }
.dash-table tbody th, .dash-table tbody td { padding: 11px 0; vertical-align: top; }
.dash-table tbody th { text-align: left; font-weight: 600; padding-right: 12px; }
.dash-table tbody th small { display: block; margin: 3px 0 0 20px; font-weight: 400; font-size: 13.5px; color: var(--muted); }
.dash-table td.num { text-align: right; white-space: nowrap; padding-left: 14px; }
.dash-table td.num + td.num { color: var(--muted); width: 1%; }
.dash-name { display: inline-flex; align-items: center; gap: 10px; }
.dash-swatch { width: 10px; height: 10px; border-radius: 2px; flex: none; }
.dash-empty { margin: 0; padding: 18px; font-size: 15px; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); }
.dash-empty a { color: var(--ink); font-weight: 600; }
.dash-empty[hidden] { display: none; }

/* Things to do */
.dash-steps { list-style: none; margin: -4px 0 6px; padding: 0; display: flex; gap: 3px; }
.dash-steps li { flex: 1; height: 5px; background: var(--bg-deep); border-radius: 1px; }
.dash-steps li.done { background: var(--good); }
.dash-checklist { list-style: none; margin: 0; padding: 0; }
.dash-checklist li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 15px; line-height: 1.35; }
.dash-checklist li:last-child { border-bottom: 0; }
.dash-checklist label { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.dash-checklist input { width: 20px; height: 20px; margin: 0; accent-color: var(--good); flex: none; cursor: pointer; }
.dash-tick { display: inline-grid; place-items: center; flex: none; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line-strong); }
.dash-tick svg { width: 12px; height: 12px; stroke-width: 3.5; color: var(--surface); }
.dash-checklist li.done .dash-tick { background: var(--good); border-color: var(--good); }
.dash-checklist li.done > span:not(.dash-tick), .dash-checklist li.done label span { color: var(--muted); }
.dash-link { margin-left: auto; flex: none; font: 600 14px/1 var(--body); color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 7px 10px; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background 0.15s var(--ease-out), color 0.15s var(--ease-out); }
.dash-link:hover { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.dash-all-done { color: var(--good); font-weight: 600; }
.dash-done { margin-top: 6px; border-top: 1px solid var(--line); }
.dash-done summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 12px 0 2px; font: 600 14px/1 var(--body); color: var(--muted); }
.dash-done summary::-webkit-details-marker { display: none; }
.dash-done summary::before { content: ""; width: 6px; height: 6px; border: solid currentColor; border-width: 0 1.75px 1.75px 0; transform: rotate(-45deg); transition: transform 0.15s var(--ease-out); }
.dash-done[open] summary::before { transform: rotate(45deg); }
.dash-done summary:hover { color: var(--ink); }
.dash-done[hidden] { display: none; }

.dash-privacy { display: flex; gap: 10px; align-items: flex-start; margin: 0; font-size: 14px; color: var(--muted); max-width: 72ch; }
.dash-privacy svg { width: 18px; height: 18px; flex: none; color: var(--good); margin-top: 1px; }

/* While balances are being looked up */
.dashboard.is-loading .dash-num, .dashboard.is-loading #dash-rows td { color: transparent; border-radius: var(--radius-sm); background: linear-gradient(90deg, var(--bg-deep) 30%, var(--bg) 50%, var(--bg-deep) 70%) 0 0 / 300% 100%; animation: dash-shimmer 1.3s linear infinite; }
.dashboard.is-loading #dash-refresh svg { animation: dash-spin 0.9s linear infinite; }
@keyframes dash-shimmer { to { background-position: -150% 0; } }
@keyframes dash-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .dashboard.is-loading .dash-num, .dashboard.is-loading #dash-rows td, .dashboard.is-loading #dash-refresh svg { animation: none; }
}

@media (max-width: 860px) {
  .dash-cols { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  .dash-summary { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .dash-figure { padding: 16px 18px 18px; }
  .dash-figure.is-main .dash-num { font-size: 38px; }
  .dash-num { font-size: 25px; }
  .dash-chart { grid-template-columns: 44px 1fr; grid-template-rows: 180px auto; }
  .dash-card { padding: 16px 16px 18px; }
}
@media (max-width: 480px) {
  .dashboard { padding: 12px; }
  .dash-summary { grid-template-columns: 1fr; }
  .dash-actions, .dash-btn { flex: 1 1 auto; justify-content: center; }
  .dash-checklist li { flex-wrap: wrap; }
  .dash-link { margin-left: 32px; }
}

.dash-todo { margin-left: auto; white-space: nowrap; font-size: 14px; font-weight: 600; color: var(--muted); }
.example-page .intro > p, .example-page .intro .field-note { max-width: 760px; }
.example-page .intro .preview-note { width: fit-content; }
.example-page .intro .field-note { font-size: 15px; line-height: 1.55; }
.dash-example-note { margin: 44px 0 20px; max-width: 760px; font-size: 17px; line-height: 1.5; color: var(--ink-soft); }
/* Section 13: the check-up console, on screen and as its own printed page */
.plan-console { margin: 8px 0 24px; }
.plan-console .sc-register { display: none; }
#security-summary .button { white-space: normal; text-align: center; }
.sec-fix-title { font: 400 22px var(--display); margin: 8px 0 10px; }
.dashboard .dash-of { font: 500 15px var(--body); color: var(--muted); margin-left: 2px; }
@media print {
  #security-section { break-before: page; }
  .plan-console { margin: 2mm 0 0; }
  .plan-console .sc-grid-matrix { display: none; }
  .sec-fix-title { break-before: page; font-size: 16pt; }
}
.sec-figs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0 0 18px; }
.sec-figs div { border: 1px solid var(--line); border-top: 3px solid var(--tape); border-radius: var(--radius-sm); background: var(--surface); padding: 12px 14px; }
.sec-figs dt { font: 650 13px var(--body); color: var(--muted); }
.sec-figs dd { margin: 4px 0 0; font: 400 22px var(--display); }
@media (max-width: 560px) { .sec-figs { grid-template-columns: 1fr; } }
