/* Pennyjar — a jar for every savings goal, in the app's own palette (SharedUI's DSColor):
   copper on cream by day, copper on near-black by night. The jar is drawn the way the app draws it. */
:root {
  --bg: #fbf6ee;          /* DSColor.canvas */
  --paper: #ffffff;       /* DSColor.surface */
  --fg: #1f1408;          /* DSColor.textPrimary */
  --muted: #7a6a58;       /* DSColor.textSecondary */
  --line: #eadfce;
  --accent: #b45309;      /* DSColor.accent, copper */
  --ink: #b45309;
  --chip: #fde7cf;        /* DSColor.accentSoft */
  --on-accent: #ffffff;   /* DSColor.textOnAccent */
  --deposit: #047857;     /* DSColor.deposit */
  --withdrawal: #be123c;  /* DSColor.withdrawal */
  --cell-in: #fff3d9;     /* the yellow of the cells a person fills in, in the spreadsheet and in its picture */
  /* The eight goal colors, in the app's order: copper, emerald, blue, violet, rose, cyan, pink, slate. */
  --t0: #b45309; --t1: #047857; --t2: #1d4ed8; --t3: #6d28d9; --t4: #be123c; --t5: #0e7490; --t6: #be185d; --t7: #475569;
  --tint: var(--t0);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --round: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15100a; --paper: #211a12; --fg: #fbf3e7; --muted: #c2b29e;
    --line: #3a2f22; --accent: #fdba74; --ink: #fdba74; --chip: #3a2410; --on-accent: #2a1505;
    --deposit: #34d399; --withdrawal: #fb7185; --cell-in: #3a2c14;
    --t0: #fdba74; --t1: #34d399; --t2: #60a5fa; --t3: #a78bfa; --t4: #fb7185; --t5: #22d3ee; --t6: #f472b6; --t7: #94a3b8;
    color-scheme: dark;
  }
}
.tint-0 { --tint: var(--t0); } .tint-1 { --tint: var(--t1); } .tint-2 { --tint: var(--t2); } .tint-3 { --tint: var(--t3); }
.tint-4 { --tint: var(--t4); } .tint-5 { --tint: var(--t5); } .tint-6 { --tint: var(--t6); } .tint-7 { --tint: var(--t7); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 17px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--ink); }
.wrap { max-width: 48rem; margin: 0 auto; padding: 0 16px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ------------------------------------------------------------------ chrome */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; font-size: 0.9rem; }
.bar a { color: var(--muted); text-decoration: none; }
.bar a:hover { color: var(--fg); }
.bar .id { display: flex; align-items: center; gap: 10px; color: var(--fg); }
.bar .id img { width: 26px; height: 26px; border-radius: 7px; display: block; }

.hero { padding: clamp(20px, 6vw, 44px) 0 12px; }
.kicker { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 0.95rem; margin: 0 0 14px; }
.kicker img { width: 44px; height: 44px; border-radius: 11px; }
h1 { font-family: var(--round); font-size: clamp(1.9rem, 6.4vw, 2.8rem); line-height: 1.08; letter-spacing: -0.025em; margin: 0 0 14px; }
h1 em { font-style: normal; color: var(--accent); }
h2 { font-family: var(--round); font-size: clamp(1.3rem, 4vw, 1.6rem); letter-spacing: -0.02em; margin: 2em 0 0.5em; }
h3 { font-family: var(--round); }
.sub { font-size: clamp(1.03rem, 3.2vw, 1.18rem); color: var(--muted); margin: 0 0 20px; max-width: 38rem; }
.soon { display: inline-block; background: var(--chip); color: var(--ink); font-weight: 650; padding: 8px 14px; border-radius: 999px; font-size: 0.95rem; }
.btn { display: inline-block; background: var(--accent); color: var(--on-accent); text-decoration: none; font: inherit; font-weight: 650; padding: 10px 18px; border-radius: 999px; border: 1px solid var(--accent); cursor: pointer; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn:hover { filter: brightness(1.05); }
.fine { color: var(--muted); font-size: 0.88rem; margin: 8px 0 0; }
section { margin: 2.2em 0; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.2em; }
li { margin: 0.4em 0; }
.reviewed { color: var(--muted); font-size: 0.85rem; }
footer { border-top: 1px solid var(--line); margin-top: 3em; padding: 20px 0 40px; color: var(--muted); font-size: 0.9rem; display: flex; flex-wrap: wrap; gap: 14px; }
footer a { color: var(--muted); }

/* ------------------------------------------------------------------ the jar */
.jar { display: block; width: 100%; height: auto; overflow: visible; }
.jar-glass { fill: var(--tint); fill-opacity: 0.1; }
.jar.open .jar-glass { fill-opacity: 0.22; }
.jar-liquid { fill: var(--tint); transform-origin: 0 100px; transform: scaleY(var(--f, 0)); transition: transform 0.55s cubic-bezier(0.3, 1.25, 0.5, 1); }
.jar-line { fill: none; stroke: var(--tint); stroke-width: 2.73; stroke-linejoin: round; }
.jar-symbol { fill: var(--tint); }
.jar-symbol.on { fill: var(--on-accent); }
@media (prefers-reduced-motion: reduce) { .jar-liquid { transition: none; } }

.hero-grid { display: grid; grid-template-columns: 1fr; gap: 8px 32px; align-items: center; }
.hero-jars { display: flex; align-items: flex-end; gap: 14px; margin: 6px 0 0; }
.hero-jars .jar { flex: none; }
.hero-jars .j1, .hero-jars .j3 { width: 66px; }
.hero-jars .j2 { width: 94px; }
@media (min-width: 700px) {
  .hero-grid { grid-template-columns: 1fr auto; }
  .hero-jars { margin: 0; gap: 18px; }
  .hero-jars .j1, .hero-jars .j3 { width: 84px; }
  .hero-jars .j2 { width: 120px; }
}

/* ------------------------------------------------------------------ the page's centerpiece */

.stage-top { display: grid; grid-template-columns: 78px 1fr; gap: 16px; align-items: center; }
.stage-top .jar { width: 78px; }
@media (min-width: 560px) { .stage-top { grid-template-columns: 110px 1fr; gap: 22px; } .stage-top .jar { width: 110px; } }
.goal-name { font: inherit; font-family: var(--round); font-weight: 650; font-size: 1.1rem; width: 100%; color: var(--fg); background: transparent; border: 0; border-bottom: 1px dashed var(--line); padding: 2px 0; }
.amount { font-family: var(--round); margin: 4px 0 0; font-variant-numeric: tabular-nums; }
.amount b { font-size: clamp(1.9rem, 8vw, 2.5rem); line-height: 1.1; letter-spacing: -0.02em; }
.amount span { display: block; color: var(--muted); font-size: 0.95rem; font-family: var(--font); }
.range { width: 100%; margin: 14px 0 4px; accent-color: var(--tint, var(--accent)); }
.tints { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 2px; }
.tints button { width: 28px; height: 28px; border-radius: 50%; border: 0; background: var(--tint); cursor: pointer; padding: 0; position: relative; }
.tints button[aria-pressed="true"]::after { content: ""; position: absolute; left: 9px; top: 6px; width: 6px; height: 11px; border: solid var(--on-accent); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.tints button[aria-pressed="true"] { outline: 2px solid var(--fg); outline-offset: 2px; }
.plan { margin-top: 14px; background: var(--chip); border-radius: 16px; padding: 12px 16px; }
.plan .k { display: block; font-size: 0.74rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.plan p { margin: 2px 0; }
.plan .line { font-weight: 600; }
.plan .next { font-size: 0.9rem; color: var(--ink); }

.seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; }
.seg label { position: relative; display: block; cursor: pointer; color: var(--fg); }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: block; padding: 6px 12px; border-radius: 999px; font-size: 0.88rem; font-weight: 600; }
.seg input:checked + span { background: var(--accent); color: var(--on-accent); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ------------------------------------------------------------------ cards, tiers, lists */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.feature { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.feature h3 { margin: 0 0 4px; font-size: 1.02rem; }
.feature p { margin: 0; color: var(--muted); font-size: 0.94rem; }
.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.tier { border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; background: var(--paper); }
.tier h3 { margin: 0 0 6px; font-size: 1.02rem; }
.tier.pro { border-color: var(--accent); }
.tier ul { margin: 0; padding-left: 1.1em; font-size: 0.95rem; }
.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.shots img { width: 100%; height: auto; border-radius: 18px; border: 1px solid var(--line); background: var(--paper); }
.honest li b { display: inline; }
.examples { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 14px 0; }
.examples div { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 12px 16px; }
.examples h3 { margin: 0 0 4px; font-size: 1rem; }
.examples p { margin: 0; }
.examples .say { font-weight: 600; }
.examples .why { color: var(--muted); font-size: 0.9rem; margin-top: 4px; }
.more { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; padding: 0; list-style: none; }
.more li { margin: 0; }
.more a { display: block; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; text-decoration: none; color: var(--fg); height: 100%; }
.more a b { display: block; color: var(--ink); }
.more a span { color: var(--muted); font-size: 0.9rem; }
.app-note { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: start; background: var(--paper); border: 1px solid var(--line); border-radius: 22px; padding: 18px; }
.app-note img.shot { width: 150px; height: auto; border-radius: 16px; border: 1px solid var(--line); }
.app-note h2 { margin-top: 0; }
.app-note .soon { margin-top: 4px; }
@media (max-width: 560px) {
  .app-note { grid-template-columns: 1fr; }
  .app-note img.shot { width: 60%; max-width: 220px; justify-self: center; }
}
.answer { background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 14px; padding: 12px 16px; margin: 0 0 8px; }
.answer p { margin: 0.35em 0; }
.noscript, .empty { color: var(--muted); font-size: 0.95rem; }
.hint { color: var(--muted); font-size: 0.9rem; }

/* Legal and help pages */
.doc h2 { font-size: 1.2rem; margin: 1.8em 0 0.5em; }
.doc p, .doc li { line-height: 1.62; }

/* ------------------------------------------------------------------ tables */
.tablewrap { overflow-x: auto; margin: 0.6em 0; }
table.data { width: 100%; border-collapse: collapse; font-size: 0.94rem; background: var(--paper); border-radius: 14px; overflow: hidden; }
table.data caption { text-align: left; color: var(--muted); font-size: 0.88rem; padding: 0 0 6px; }
table.data th, table.data td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
table.data tbody th { font-size: 0.94rem; text-transform: none; letter-spacing: 0; color: var(--fg); font-weight: 650; font-variant-numeric: tabular-nums; }
table.data.cadence tbody th { white-space: nowrap; }
table.data td.n, table.data th.n { white-space: nowrap; font-variant-numeric: tabular-nums; }
table.data td.r, table.data th.r { text-align: right; }
table.data td.wrap-ok { color: var(--muted); font-size: 0.86rem; }
table.data tr.gap td { text-align: center; color: var(--muted); font-size: 0.85rem; padding: 4px 12px; }
table.data tr.on td, table.data tr.on th { background: var(--chip); }
table.data tfoot th, table.data tfoot td { border-bottom: 0; font-weight: 650; }
table.data small { display: block; font-size: 0.78rem; font-weight: 400; color: var(--muted); text-transform: none; letter-spacing: 0; white-space: normal; }
table.data.grid th, table.data.grid td { padding: 7px 3px; text-align: center; font-variant-numeric: tabular-nums; }
table.data.grid thead th small { font-size: 0.7rem; text-transform: none; letter-spacing: 0; font-weight: 400; }
table.data.grid th:first-child { text-align: left; padding-left: 10px; white-space: nowrap; }
table.data.grid td { font-size: 0.88rem; }
table.data.grid thead th { white-space: nowrap; }

/* ------------------------------------------------------------------ calculators */
.calc { background: var(--paper); border: 1px solid var(--line); border-radius: 22px; padding: 18px; box-shadow: 0 1px 0 rgba(0,0,0,0.02), 0 10px 30px -18px rgba(120, 60, 10, 0.35); }
.calc h2 { margin: 0 0 10px; font-size: 1.15rem; }
.calc .fields { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; }
.calc label { display: flex; flex-direction: column; gap: 4px; font-size: 0.85rem; color: var(--muted); min-width: 0; }
.calc input:not([type="range"]):not([type="radio"]):not(.goal-name), .calc select { font: inherit; font-size: 1rem; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); min-width: 0; max-width: 100%; font-variant-numeric: tabular-nums; }
.calc input[type="number"] { width: 8em; }
.calc input[type="date"] { min-width: 9.5em; }
.calc input:focus-visible, .calc select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.calc .fields + .fields { margin-top: 10px; }
.calc .head { display: flex; align-items: baseline; justify-content: space-between; gap: 4px 12px; flex-wrap: wrap; margin-bottom: 12px; }
.calc .head h2 { margin: 0; }
.calc .head small { color: var(--muted); }
.calc input[aria-invalid="true"] { border-color: var(--withdrawal); }
.calc .seg label { flex-direction: row; color: var(--fg); }
.result { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; }
.result .top { display: grid; grid-template-columns: 1fr 56px; gap: 14px; align-items: center; }
.result .top .jar { width: 56px; }
.result .big { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0 0 6px; font-family: var(--round); }
.result .big b { font-size: clamp(2.2rem, 11vw, 3.2rem); line-height: 1; color: var(--accent); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.result .big span { font-size: 1.05rem; font-weight: 600; font-family: var(--font); }
.result p { margin: 0.35em 0; }
.result .line { color: var(--muted); }
.result .says { font-weight: 600; }
.result .warn { color: var(--ink); font-weight: 600; }
.result table.data { margin-top: 10px; }
.result h3 { margin: 18px 0 4px; font-size: 1rem; }
.calc .tools { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }

.fund { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px 12px; margin: 0 0 10px; background: var(--bg); min-width: 0; }
.fund legend { font-size: 0.78rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); padding: 0 6px; }
.fund .fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; align-items: end; }
.fund .name { grid-column: 1 / -1; }
.fund input { width: 100%; }
.calc .fund input[type="number"], .calc .fund input[type="date"] { width: 100%; min-width: 0; }
.fund .remove { justify-self: end; align-self: center; font: inherit; font-size: 0.85rem; background: transparent; border: 0; color: var(--ink); cursor: pointer; padding: 6px 4px; text-decoration: underline; }
@media (min-width: 640px) {
  .fund .fields { grid-template-columns: 2.2fr 1fr 1fr 1.2fr auto; }
  .fund .name { grid-column: auto; }
}

/* ------------------------------------------------------------------ a download, and a spreadsheet drawn */
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.88em; background: var(--chip); padding: 1px 5px; border-radius: 6px; overflow-wrap: anywhere; }
.dl { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 0 0 4px; }
.dl .btn { font-size: 1.05rem; padding: 12px 24px; }
.dl .fine { margin: 0; }
.xl { margin: 1em 0 1.4em; }
.xl figcaption { color: var(--muted); font-size: 0.9rem; margin: 0 0 6px; }
.xl .tablewrap { border: 1px solid var(--line); border-radius: 12px; background: var(--paper); margin: 0; }
.xl table { border-collapse: collapse; font-size: 0.8rem; min-width: 100%; font-variant-numeric: tabular-nums; }
.xl th, .xl td { border: 1px solid var(--line); padding: 3px 8px; white-space: nowrap; text-align: left; font-weight: 400; }
.xl .letters th { background: var(--chip); color: var(--muted); text-align: center; font-size: 0.72rem; font-weight: 600; padding: 2px 8px; }
.xl .nums { background: var(--chip); color: var(--muted); text-align: center; font-size: 0.72rem; font-weight: 600; width: 1%; }
.xl tr.head th:not(.nums) { background: var(--accent); color: var(--on-accent); font-weight: 650; text-align: center; white-space: normal; min-width: 5.5em; font-size: 0.78rem; }
.xl td.in { background: var(--cell-in); }
.xl td.r { text-align: right; }
.xl td.c { text-align: center; }
.xl td.title { font-family: var(--round); font-weight: 650; font-size: 1.05rem; color: var(--ink); border-color: transparent; }
.xl td.plain { border-color: transparent; color: var(--muted); }
.xl td.label { font-weight: 650; }
.xl tr.skip td { text-align: center; color: var(--muted); }
.xl tfoot td, .xl tr.total td { font-weight: 650; }

/* ------------------------------------------------------------------ printable sheets */
.printarea { margin: 1.4em 0; }
.printarea .preview { background: var(--paper); border: 1px solid var(--line); border-radius: 22px; padding: 14px; overflow: hidden; }
.printarea .preview > p.hint { margin: 10px 0 0; text-align: center; }

/* A sheet is drawn in --u, one hundredth of its content width: the preview on a phone and the
   printed page are the same drawing at two sizes. */
.sheet { --u: min(calc((100vw - 64px) / 106), 6px); width: calc(var(--u) * 106); max-width: 100%; margin: 0 auto; padding: calc(var(--u) * 3); background: #fff; color: #1f1408; border: 1px solid #e3d6c2; border-radius: calc(var(--u) * 2); font-family: var(--font); font-variant-numeric: tabular-nums; overflow: hidden; }
.sheet * { margin: 0; }
.sheet-title { font-family: var(--round); font-size: calc(var(--u) * 5); line-height: 1.15; letter-spacing: -0.02em; margin-bottom: calc(var(--u) * 1.6); }
.sheet-fields { display: flex; flex-wrap: nowrap; gap: calc(var(--u) * 3); margin-bottom: calc(var(--u) * 2.4); }
.sheet-fields > div { flex: 1 1 0; min-width: 0; }
.sheet-fields dt { font-size: calc(var(--u) * 1.8); color: #7a6a58; }
.sheet-fields dd { font-size: calc(var(--u) * 3); font-weight: 650; min-height: calc(var(--u) * 4.4); border-bottom: calc(var(--u) * 0.25) solid #1f1408; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet-note { font-size: calc(var(--u) * 2); color: #5a4b3a; margin-top: calc(var(--u) * 2.4); line-height: 1.35; }
.sheet .credit { font-size: calc(var(--u) * 1.7); color: #7a6a58; margin-top: calc(var(--u) * 1); }
.boxes { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(var(--cols), 1fr); grid-template-rows: repeat(var(--rows), 1fr); gap: calc(var(--u) * 0.7); height: calc(var(--u) * 100); --fs: 2.4; --ns: 1.5; }
.sheet-boxes[data-boxes="50"] .boxes { --fs: 3.4; --ns: 2; }
.sheet-boxes[data-boxes="25"] .boxes { --fs: 4.8; --ns: 2.4; }
.boxes li { position: relative; border: calc(var(--u) * 0.3) solid #1f1408; border-radius: calc(var(--u) * 1.2); display: flex; align-items: center; justify-content: center; min-width: 0; }
.boxes .n { position: absolute; left: calc(var(--u) * 0.7); top: calc(var(--u) * 0.4); font-size: calc(var(--u) * var(--ns)); line-height: 1; color: #7a6a58; }
.boxes .v { font-size: calc(var(--u) * var(--fs)); font-weight: 650; }
.boxes li.last { border-style: dashed; }
.thermo { display: block; width: 80%; height: auto; margin: 0 auto; }
.thermo .tube { fill: #fff; stroke: #1f1408; stroke-width: 0.6; }
.thermo .tick { stroke: #1f1408; stroke-width: 0.35; }
.thermo .write { stroke: #1f1408; stroke-width: 0.3; }
.thermo text { font-family: var(--font); fill: #1f1408; }
.thermo .pct { font-size: 3.6px; fill: #7a6a58; }
.thermo .amt { font-size: 4px; font-weight: 650; }
.thermo .head { font-size: 3px; fill: #7a6a58; }
.funds { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: calc(var(--u) * 2.5); }
.funds th, .funds td { border: calc(var(--u) * 0.25) solid #1f1408; padding: 0 calc(var(--u) * 1); height: calc(var(--u) * 7.2); text-align: left; }
.funds thead th { height: calc(var(--u) * 5.5); font-size: calc(var(--u) * 2); font-weight: 650; background: #f6efe3; }
.funds td.num { text-align: right; white-space: nowrap; font-size: calc(var(--u) * var(--nf, 2.4)); }
.funds td.date { text-align: right; white-space: nowrap; font-size: calc(var(--u) * 1.9); }
.funds td.who { font-size: calc(var(--u) * 2.3); line-height: 1.1; }
.funds .clip { max-height: calc(var(--u) * 5.2); overflow: hidden; overflow-wrap: anywhere; }
.funds tfoot th { text-align: right; background: #f6efe3; }

@page { margin: 12mm; }
@media print {
  html, body { background: #fff; }
  body { font-size: 10pt; }
  .wrap { max-width: none; padding: 0; margin: 0; }
  .wrap > *:not(.printarea) { display: none !important; }
  .printarea { margin: 0; }
  .printarea > h2, .printarea .preview > p.hint, .printarea .tools { display: none; }
  .printarea .preview { border: 0; border-radius: 0; padding: 0; background: #fff; overflow: visible; }
  .sheet { --u: 1.8mm; border: 0; border-radius: 0; padding: 0; width: calc(var(--u) * 100); overflow: visible; break-inside: avoid; page-break-inside: avoid; }
}

/* ------------------------------------------------------------------ small screens */
@media (max-width: 560px) {
  .calc { padding: 14px; }
  table.data { font-size: 0.84rem; }
  table.data th, table.data td { padding: 7px 5px; }
  table.data thead th { font-size: 0.66rem; letter-spacing: 0.03em; }
  table.data tbody th { font-size: 0.84rem; }
  table.data.cadence tbody th { white-space: normal; min-width: 5.4em; }
  table.data.grid th, table.data.grid td { padding: 7px 2px; }
  table.data.grid td { font-size: 0.8rem; }
  table.data.grid th:first-child { padding-left: 6px; }
  .calc input[type="number"] { width: 100%; }
  .calc .fields > label { flex: 1 1 8.5em; }
  .calc .fields > label.narrow { flex: 0 1 auto; }
}
.nw { white-space: nowrap; }
