/* Tidy Sum: white wall tile, aqua grout, a spray-bottle label and a cleaning checklist. Square corners, no shadows. */
:root {
  --paper: #f4f9f8; --white: #fff; --ink: #0d2b33; --muted: #3c5a60; --line: #b9d3cf; --tile: #e2f2ef; --grout: #c4e1dc;
  --teal: #006b6d; --teal-dk: #00585b; --lav: #5440b0; --lav-lt: #ece8fb; --loss: #a8271d; --field: #5e7b80;
  --head: "Bricolage Grotesque", "Arial Narrow", Arial, sans-serif;
  --body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --max: 1140px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 400 18px/1.6 var(--body); font-variant-numeric: tabular-nums; }
a { color: var(--teal-dk); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a:hover { color: var(--ink); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 28px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 9; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--lav); outline-offset: 2px; }
h1, h2 { font-family: var(--head); font-weight: 700; line-height: 1.04; letter-spacing: -.015em; margin: 0 0 .45em; }
h1 { font-size: clamp(2.4rem, 5.4vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.5rem); }
h3 { font: 700 1.12rem/1.3 var(--body); margin: 0 0 .4em; }
p { margin: 0 0 1em; }
.lede { font-size: 1.15rem; max-width: 36em; }
.kicker { display: inline-flex; align-items: center; gap: 10px; font: 600 16px/1.2 var(--body); color: var(--teal-dk); margin-bottom: 16px; }
.kicker::before { content: ""; width: 14px; height: 14px; background: var(--teal); flex: none; }

/* Header: white with a teal trim line, like the top row of a tiled wall */
.site-head { background: var(--white); border-top: 8px solid var(--teal); border-bottom: 2px solid var(--ink); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 66px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); padding: 10px 0; }
.brand svg { width: 30px; height: 30px; flex: none; }
.brand span { font: 700 1.7rem/1 var(--head); letter-spacing: -.02em; }
.nav { display: flex; flex-wrap: wrap; gap: 2px; }
.nav a { color: var(--ink); text-decoration: none; font: 600 16px/1 var(--body); padding: 11px 11px; border-bottom: 3px solid transparent; }
.nav a:hover { border-bottom-color: var(--line); }
.nav a[aria-current="page"] { border-bottom-color: var(--teal); color: var(--teal-dk); }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; margin-top: 24px; }
.btn { display: inline-block; background: var(--teal); color: #fff; text-decoration: none; border: 2px solid var(--teal); font: 700 17px/1 var(--body); padding: 14px 20px; cursor: pointer; }
.btn:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.ghost { background: var(--white); color: var(--ink); border-color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: #fff; }

/* Tile wall background (SVG grout lines, 44px tiles) */
.tiles { background-color: var(--white);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44'%3E%3Cpath d='M0 .5H44M.5 0V44' stroke='%23c4e1dc' stroke-width='1.5' fill='none'/%3E%3C/svg%3E"); }

/* Spray-bottle label: the result panel */
.label { background: var(--white); border: 2px solid var(--ink); }
.label-top { background: var(--teal); color: #fff; padding: 10px 18px; display: flex; justify-content: space-between; gap: 12px; align-items: baseline; border-bottom: 2px solid var(--ink); }
.label-top b { font: 700 17px/1.3 var(--body); }
.label-top > span { font: 400 16px/1.3 var(--body); }
.label-in { padding: 16px 20px 18px; }
.label-lab { font: 600 16px/1.3 var(--body); color: var(--muted); }
.big { font: 700 clamp(2.9rem, 6.4vw, 4.1rem)/1 var(--head); color: var(--teal-dk); margin: 6px 0 4px; letter-spacing: -.02em; }
.big.neg { color: var(--loss); }
.sub { font-size: 17px; margin: 0; }
.rows { list-style: none; margin: 12px 0 0; padding: 0; }
.rows li { display: flex; justify-content: space-between; gap: 14px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
.rows li span:last-child { font-weight: 600; text-align: right; white-space: nowrap; }
.rows li.sum { border-bottom: 0; border-top: 2px solid var(--ink); margin-top: 4px; padding-top: 9px; font-weight: 700; }
.rows li.minus span:last-child { color: var(--loss); }
.rows li.head { border-bottom: 2px solid var(--ink); font-weight: 700; padding-top: 14px; }
/* Checklist rows: a square tick box before each line */
.check-list { list-style: none; margin: 0; padding: 0; }
.check-list li { position: relative; padding: 0 0 0 34px; margin: 0 0 12px; }
.check-list li::before { content: ""; position: absolute; left: 0; top: 4px; width: 20px; height: 20px; border: 2px solid var(--ink); background: var(--white); }
.check-list li::after { content: ""; position: absolute; left: 7px; top: 7px; width: 6px; height: 11px; border: solid var(--teal); border-width: 0 3px 3px 0; transform: rotate(45deg); }

/* Hero */
.hero { padding: 56px 0 60px; border-bottom: 2px solid var(--ink); }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 54px; align-items: center; }
.hero-copy { background: var(--white); padding: 22px 24px 20px; border: 2px solid var(--ink); }
.hero-copy h1 { margin-top: 2px; }

/* Sections */
.block { padding: 56px 0; background: var(--white); border-bottom: 2px solid var(--ink); }
.block.plain { background: var(--paper); }
.two { display: grid; grid-template-columns: .85fr 1.15fr; gap: 54px; }
.tools4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 28px; border-top: 2px solid var(--ink); border-left: 2px solid var(--ink); }
.tools4 a { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); background: var(--white); }
.tools4 .no { display: block; background: var(--tile); border-bottom: 2px solid var(--ink); padding: 12px 16px; font: 700 2rem/1 var(--head); color: var(--teal-dk); }
.tools4 .t { display: block; font: 700 18px/1.3 var(--body); padding: 14px 16px 6px; }
.tools4 .d { display: block; font-size: 16px; color: var(--muted); padding: 0 16px; flex: 1; }
.tools4 .go { display: block; padding: 12px 16px 16px; font-weight: 700; color: var(--teal-dk); }
.tools4 a:hover { background: var(--paper); }
.tools4 a:hover .t { text-decoration: underline; }
.quotes { list-style: none; margin: 0; padding: 0; }
.quotes li { border-left: 4px solid var(--teal); padding: 2px 0 2px 18px; margin: 0 0 24px; }
.quotes q { display: block; font-size: 18px; font-style: italic; }
.quotes .src { display: block; font-size: 15px; color: var(--muted); margin-top: 4px; }
.quotes .fix { display: block; font-size: 16px; margin-top: 6px; }

/* Workbook band */
.shelf { border-bottom: 2px solid var(--ink); padding: 54px 0; }
.shelf .two { align-items: start; }
.shelf .panel { background: var(--white); border: 2px solid var(--ink); padding: 26px 28px 24px; }
.shelf .check-list { margin: 0 0 22px; }
.shelf small { display: block; margin-top: 14px; font-size: 15px; color: var(--ink); max-width: 36em; }
.price { display: inline-block; background: var(--lav-lt); border: 2px solid var(--ink); font: 700 16px/1.2 var(--body); padding: 5px 10px; margin-bottom: 14px; }

/* Tool pages */
.tool-head { padding: 44px 0 26px; }
.tool-head .lede { margin-bottom: 0; }
.tool-wrap { padding: 0 0 56px; }
.tool { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: start; }
form fieldset { border: 2px solid var(--ink); background: var(--white); margin: 0 0 20px; padding: 18px 20px 6px; min-width: 0; }
form legend { font: 700 18px/1.2 var(--body); padding: 0 8px; margin-left: -8px; background: var(--white); }
form legend b { display: inline-block; background: var(--teal); color: #fff; width: 26px; height: 26px; line-height: 26px; text-align: center; margin-right: 8px; font-size: 15px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 14px; }
.field { margin-bottom: 16px; min-width: 0; }
.field label, .field .lab { display: block; font: 600 16px/1.3 var(--body); margin-bottom: 6px; }
.hint { font-size: 15px; color: var(--muted); margin-top: 5px; line-height: 1.45; }
input[type=text], select { width: 100%; font: 400 18px/1.2 var(--body); font-variant-numeric: tabular-nums; color: var(--ink); background: var(--white); border: 2px solid var(--field); border-radius: 0; padding: 11px 12px; min-height: 48px; }
select { appearance: none; -webkit-appearance: none; padding-right: 36px;
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%230d2b33' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 12px center; }
input[type=text]:focus, select:focus { border-color: var(--ink); outline: 3px solid var(--lav); outline-offset: 0; }
input[aria-invalid="true"] { border-color: var(--loss); background: #fff3f1; }
.affix { position: relative; }
.affix i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--muted); pointer-events: none; font-size: 18px; }
.affix input { padding-left: 28px; }
.affix.suf i { left: auto; right: 12px; }
.affix.suf input { padding-left: 12px; padding-right: 44px; }
.check { display: flex; gap: 10px; align-items: flex-start; font: 400 17px/1.4 var(--body); margin-bottom: 14px; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--teal); flex: none; }
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.seg { display: flex; flex-wrap: wrap; border: 2px solid var(--field); }
.seg label { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 12px; font: 600 16px/1.2 var(--body); cursor: pointer; min-height: 46px; }
.seg label + label { border-left: 2px solid var(--field); }
.seg input { accent-color: var(--teal); width: 18px; height: 18px; margin: 0; }
.seg label:has(input:checked) { background: var(--tile); }
.result { position: sticky; top: 20px; }
.msg { font-size: 16px; margin-top: 14px; padding: 10px 14px; background: var(--lav-lt); border-left: 4px solid var(--lav); }
.msg:empty { display: none; }
.note { font-size: 15px; color: var(--muted); }

/* Tables */
.tbl { width: 100%; border-collapse: collapse; font-size: 17px; margin-top: 12px; }
.tbl th, .tbl td { text-align: right; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th:first-child, .tbl td:first-child { text-align: left; padding-left: 0; }
.tbl th:last-child, .tbl td:last-child { padding-right: 0; }
.tbl thead th { font-weight: 700; font-size: 15px; border-bottom: 2px solid var(--ink); color: var(--ink); line-height: 1.3; }
.tbl td small { display: block; font-size: 14px; color: var(--muted); font-weight: 400; }
.tbl td.neg { color: var(--loss); }
.tbl tr.base td { background: var(--tile); font-weight: 700; }

/* Policy text */
.policy-text { background: var(--white); border: 2px dashed var(--field); padding: 16px 18px; font-size: 17px; }
.policy-text p { margin: 0 0 .8em; }
.policy-text p:last-child { margin: 0; }
.copy-row { display: flex; gap: 14px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.copy-row .note { margin: 0; }

/* Explain */
.explain { background: var(--white); border-top: 2px solid var(--ink); padding: 48px 0 52px; }
.cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px; }
.formula { font: 600 16px/1.5 ui-monospace, Menlo, Consolas, monospace; background: var(--paper); border-left: 4px solid var(--teal); padding: 10px 12px; }
.prose { max-width: 46em; }
.prose h2 { font-size: 2rem; margin-top: 1.4em; }
.prose ul { padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.src-tbl { width: 100%; border-collapse: collapse; font-size: 16px; margin: 10px 0 18px; }
.src-tbl th, .src-tbl td { text-align: left; border-bottom: 1px solid var(--line); padding: 8px 8px 8px 0; vertical-align: top; }
.src-tbl thead th { border-bottom: 2px solid var(--ink); }
.checked { display: inline-block; border: 2px solid var(--ink); background: var(--tile); font: 700 16px/1.2 var(--body); padding: 5px 10px; margin: 4px 0 12px; }

/* Mobile result peek */
.peek { display: none; }

/* Footer */
.site-foot { background: var(--ink); color: #e3eeec; padding: 40px 0 34px; font-size: 16px; border-top: 8px solid var(--teal); }
.site-foot .wrap { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 30px; }
.site-foot a { color: #fff; }
.site-foot strong { font: 700 1.6rem/1 var(--head); color: #fff; display: block; margin-bottom: 8px; }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { margin-bottom: 8px; }
.site-foot .fine { grid-column: 1 / -1; border-top: 1px solid #47646a; padding-top: 18px; margin: 6px 0 0; font-size: 15px; color: #d3e2df; }

@media (max-width: 960px) {
  .hero .wrap, .two, .tool { grid-template-columns: 1fr; gap: 34px; }
  .tools4 { grid-template-columns: 1fr 1fr; }
  .cols { grid-template-columns: 1fr; gap: 10px; }
  .result { position: static; }
  .site-foot .wrap { grid-template-columns: 1fr; gap: 18px; }
}
@media (max-width: 600px) {
  body { font-size: 17px; }
  .wrap { padding: 0 18px; }
  .site-head .wrap { gap: 0; padding-bottom: 6px; }
  .nav { width: calc(100% + 12px); }
  .nav { justify-content: space-between; margin: 0 -6px; }
  .nav a { padding: 10px 6px; font-size: 16px; }
  .hero { padding: 26px 0 34px; }
  .hero-copy { padding: 18px 16px 16px; }
  .tools4 { grid-template-columns: 1fr; }
  .grid2, .checks { grid-template-columns: 1fr; }
  .grid3 { grid-template-columns: 1fr 1fr; }
  form fieldset { padding: 16px 14px 4px; }
  .label-in { padding: 14px 16px 16px; }
  .tbl { font-size: 16px; }
  .tbl th, .tbl td { padding: 8px 5px; }
  .shelf .panel { padding: 20px 16px; }
  body.has-peek { padding-bottom: 64px; }
  .peek { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; align-items: center; gap: 12px; background: var(--ink); color: #fff; text-decoration: none; padding: 12px 18px; border-top: 4px solid var(--teal); }
  .peek.off { display: none; }
  .peek-l { font-size: 16px; }
  .peek-v { font: 700 1.6rem/1 var(--head); margin-left: auto; }
  .peek-go { font-size: 20px; }
}
@media print { .site-head, .site-foot, .peek, .shelf { display: none; } }
[hidden] { display: none !important; }
.wrap.prose { max-width: var(--max); }
.prose > * { max-width: 46em; }
