/* Clearsight: one stylesheet for every page of the site. The directory and the pages the builder makes carry their own styles. */
/* ---------- design tokens ---------- */
:root {
  color-scheme: light;
  /* Colour. --line is for dividers only; field outlines use --control, which has 3 to 1 against white. */
  --navy: #10234C; --navy-2: #1B3A7A; --yellow: #FFCC00; --paper: #FFFFFF; --work: #F1F4F8; --hover: #E4E9F1;
  --text: #10234C; --soft: #52617B; --line: #D9DFE8; --control: #66728A;
  --ok: #18794E; --warn: #B45309; --bad: #B42318;
  /* Type. shortcut: the computer's own fonts, swap for a bundled typeface if one is added to the kit */
  --font: "Avenir Next", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --t-sm: .875rem; --t-base: 1.0625rem; --t-lg: 1.25rem; --t-xl: 1.5rem; --t-2xl: 2rem; --t-hero: clamp(2.25rem, 4.6vw, 3.75rem);
  /* Space */
  --s1: .25rem; --s2: .5rem; --s3: .75rem; --s4: 1rem; --s5: 1.5rem; --s6: 2rem; --s7: 3rem; --s8: 4.5rem;
  /* Shape */
  --r-sm: 4px; --r: 6px; --r-lg: 10px;
  --shadow: 0 1px 2px rgba(16, 35, 76, .08), 0 12px 28px -14px rgba(16, 35, 76, .3);
  --control-h: 2.75rem; --wrap: 80rem;
  /* Breakpoints, for reference (media queries cannot read variables): 48rem tablet, 64rem laptop, 80rem desktop. */
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
/* --bar-h is the height of the sticky toolbar, measured by the script; 0 where the toolbar is not sticky. */
html { scroll-padding-top: calc(var(--bar-h, 0px) + var(--s4)); }
body { margin: 0; background: var(--paper); color: var(--text); font: var(--t-base)/1.6 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { line-height: 1.2; }
a { color: var(--navy); text-underline-offset: .15em; }
/* Two rings, so the outline shows on white and on navy alike. */
:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; box-shadow: 0 0 0 2px var(--yellow); }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--s5); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: var(--s4); top: -5rem; z-index: 10; padding: var(--s3) var(--s4); background: var(--yellow); color: var(--navy); font-weight: 700; }
.skip:focus { top: var(--s4); }
.ic { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hint { font-size: .94rem; font-weight: 400; color: var(--soft); }

/* ---------- buttons, toggles, menus ---------- */
button { font: inherit; cursor: pointer; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-height: var(--control-h); padding: 0 var(--s4); border: 1.5px solid var(--navy); border-radius: var(--r); background: var(--paper); color: var(--navy); font: inherit; font-size: 1rem; font-weight: 600; text-decoration: none; cursor: pointer; transition: background-color .12s; }
.btn:hover { background: var(--hover); }
.btn.primary { background: var(--navy); color: var(--paper); }
.btn.primary:hover { background: var(--navy-2); border-color: var(--navy-2); }
.linkish { padding: var(--s1) 0; border: 0; background: none; color: var(--navy); font-weight: 600; text-align: left; text-decoration: underline; text-underline-offset: .15em; }
.seg { display: inline-flex; }
.seg button { display: inline-flex; align-items: center; gap: var(--s2); min-height: var(--control-h); padding: 0 var(--s3); border: 1.5px solid var(--navy); background: var(--paper); color: var(--navy); font-size: .95rem; font-weight: 600; }
.seg button + button { margin-left: -1.5px; }
.seg button:first-child { border-radius: var(--r) 0 0 var(--r); }
.seg button:last-child { border-radius: 0 var(--r) var(--r) 0; }
.seg button:hover { background: var(--hover); }
.seg button[aria-pressed=true] { background: var(--navy); color: var(--paper); }
.seg button:focus-visible { position: relative; z-index: 1; }
.menu { position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.pop { position: absolute; z-index: 6; top: calc(100% + var(--s2)); left: 0; min-width: 100%; padding: var(--s2); border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); box-shadow: var(--shadow); }
.menu.right .pop { left: auto; right: 0; }
.pop button { display: flex; align-items: center; gap: var(--s3); width: 100%; min-height: var(--control-h); padding: 0 var(--s3); border: 0; border-radius: var(--r-sm); background: none; color: var(--text); font-weight: 600; text-align: left; white-space: nowrap; }
.pop button:hover { background: var(--hover); }

/* ---------- masthead ---------- */
.mast { background: var(--navy); color: var(--paper); }
.mast .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s6); min-height: 4rem; padding-block: var(--s3); }
/* The logo: the white-lettered copy on the navy bar, the black-lettered copy when the page is printed on white paper. */
.brand { display: block; }
.brand img { display: block; width: auto; height: 4.5rem; }
.brand .on-light { display: none; }
@media print { .mast { background: none; color: var(--navy); } .brand .on-dark { display: none; } .brand .on-light { display: block; } }
.mast nav { display: flex; flex-wrap: wrap; gap: 0 var(--s5); margin-left: auto; }
.mast nav a { padding: var(--s2) 0; border-bottom: 2px solid transparent; color: inherit; font-size: .95rem; font-weight: 600; text-decoration: none; }
.mast nav a:hover, .mast nav a[aria-current] { border-bottom-color: var(--yellow); }

/* ---------- hero ---------- */
.hero { display: grid; gap: var(--s7); align-items: center; padding-block: var(--s7); }
.hero h1 { max-width: 18ch; margin: 0; font-size: var(--t-hero); font-weight: 700; line-height: 1.06; letter-spacing: -.02em; text-wrap: balance; }
.lede { max-width: 40rem; margin: var(--s5) 0 0; font-size: var(--t-lg); }
.cta { display: flex; flex-wrap: wrap; gap: var(--s3); margin: var(--s6) 0 0; }
.cta .btn { min-height: 3.25rem; padding-inline: var(--s5); font-size: var(--t-base); }
.also { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s5); margin: var(--s4) 0 0; }
.private { display: flex; gap: var(--s3); max-width: 40rem; margin: var(--s6) 0 0; padding-top: var(--s5); border-top: 1px solid var(--line); color: var(--soft); }
.private strong { display: block; color: var(--text); }
.private .ic { width: 1.75rem; height: 1.75rem; margin-top: .15rem; color: var(--navy); }
.street { width: 100%; max-width: 16rem; margin: 0; justify-self: center; }
.street svg { display: block; width: 100%; height: auto; transform: rotate(-2.5deg); filter: drop-shadow(0 14px 16px rgba(16, 35, 76, .2)); }
.street text { font-family: var(--font); fill: var(--navy); text-anchor: middle; }
.street figcaption { margin-top: var(--s5); font-size: .95rem; color: var(--soft); text-align: center; text-wrap: balance; }

/* ---------- benefits ---------- */
.benefits { border-top: 1px solid var(--line); padding-block: var(--s7); }
.benefits .wrap { display: grid; gap: var(--s6) var(--s7); }
.benefits h2 { margin: 0 0 var(--s3); font-size: var(--t-xl); text-wrap: balance; }
.benefits p { margin: 0; color: var(--soft); }
.benefits ul { display: grid; gap: var(--s5) var(--s6); margin: 0; padding: 0; list-style: none; }
.benefits li .ic { width: 1.75rem; height: 1.75rem; }
.benefits h3 { margin: var(--s2) 0 var(--s1); font-size: 1.1rem; }

/* ---------- workspace ---------- */
.work { background: var(--work); border-top: 1px solid var(--line); padding-bottom: var(--s8); }
.bar { background: var(--work); border-bottom: 1px solid var(--line); }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s5); padding-block: var(--s4); }
.toolbar .title { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s3); }
.toolbar h1 { margin: 0; font-size: var(--t-lg); }
.toolbar .who { margin: 0; font-size: var(--t-sm); color: var(--soft); }
#saved { display: inline-flex; align-items: center; gap: var(--s1); margin-left: var(--s3); font-weight: 600; color: var(--ok); }
#saved.idle { color: var(--soft); font-weight: 400; }
#saved.bad, #say.bad { color: var(--bad); }
.chip { display: inline-flex; align-items: center; gap: var(--s2); min-height: 1.75rem; padding: 0 var(--s2); border: 2px solid var(--navy); border-radius: var(--r-sm); background: var(--yellow); color: var(--navy); font-size: var(--t-sm); font-weight: 700; }
.tools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); margin-left: auto; }
#say { flex-basis: 100%; min-height: 1.7rem; margin: 0; font-weight: 600; }
#say:empty { min-height: 0; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s5); align-items: start; padding-top: var(--s5); }
#pv, .work[data-view=split] #dash, .work[data-view=preview] #dash, .work[data-view=preview] #sections, .work[data-view=preview] #form { display: none; }
.work[data-view=split] #pv, .work[data-view=preview] #pv { display: block; }

/* section navigation */
#secnav > summary { padding: var(--s3) var(--s4); border: 1.5px solid var(--navy); border-radius: var(--r); background: var(--paper); font-weight: 600; cursor: pointer; }
#seclist { margin: var(--s2) 0 0; padding: 0; list-style: none; }
#seclist button { display: flex; align-items: flex-start; gap: var(--s3); width: 100%; padding: var(--s3); border: 0; border-left: 4px solid transparent; border-radius: 0 var(--r) var(--r) 0; background: none; color: var(--text); text-align: left; }
#seclist button:hover { background: var(--hover); }
#seclist button[aria-current] { border-left-color: var(--navy); background: var(--paper); font-weight: 700; }
#seclist small { display: block; font-size: var(--t-sm); font-weight: 400; color: var(--soft); }
#seclist .ic { margin-top: .15em; }
.ic-none { color: var(--control); }
.ic-done { color: var(--ok); }
.clear { margin: var(--s4) 0 0; padding: var(--s3) var(--s3) 0; border-top: 1px solid var(--line); }

/* form */
.pane { padding: var(--s5); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--paper); }
.pane h2 { margin: 0 0 var(--s2); font-size: var(--t-xl); }
.pane h2:focus { outline: 0; box-shadow: none; }
label { display: block; margin-top: var(--s5); font-weight: 600; }
div.hint { margin-top: var(--s1); }
.from { font-size: var(--t-sm); }
.from b { color: var(--navy); }
input, select, textarea { width: 100%; min-height: var(--control-h); margin-top: var(--s2); padding: var(--s2) var(--s3); border: 1px solid var(--control); border-radius: var(--r); background: var(--paper); color: inherit; font: inherit; }
textarea { min-height: 6rem; resize: vertical; }
.tag { display: inline-block; margin-left: var(--s1); padding: 0 .45rem; border: 1.5px solid var(--navy); border-radius: var(--r-sm); font-size: .78rem; font-weight: 700; line-height: 1.5; white-space: nowrap; vertical-align: .08em; }
.tag.M, .tag.N { background: var(--navy); color: var(--paper); }
.tag.C { border-style: dashed; }
.sys { margin-top: var(--s3); border: 1px solid var(--line); border-radius: var(--r); }
.sys > summary { padding: var(--s3) var(--s4); font-weight: 700; cursor: pointer; }
.sys[open] > summary { border-bottom: 1px solid var(--line); }
.sys fieldset { min-width: 0; margin: 0; padding: 0 var(--s4) var(--s4); border: 0; }
.pager { display: flex; flex-wrap: wrap; gap: var(--s3); margin: var(--s6) 0 0; padding-top: var(--s5); border-top: 1px solid var(--line); }
.pager .primary { margin-left: auto; }

/* dashboard */
#dash { padding: var(--s5); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--paper); }
#dash h2, #pv h2 { margin: 0; font-size: var(--t-lg); }
#dash h2:focus { outline: 0; box-shadow: none; }
/* Yellow is only ever a sign plate: a navy line inside a yellow edge, with navy words. */
.plate { margin: 8px; border: 3px solid var(--navy); border-radius: var(--r); background: var(--yellow); box-shadow: 0 0 0 8px var(--yellow); }
.level { display: flex; align-items: center; gap: var(--s3); margin-top: var(--s5); padding: var(--s3) var(--s4); }
.level .ic { width: 2.25rem; height: 2.25rem; }
.level small { display: block; font-size: var(--t-sm); font-weight: 600; }
.level strong { display: block; font-size: 1.6rem; line-height: 1.1; }
.next { margin: var(--s5) 0 0; }
.next strong { display: block; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); margin: var(--s5) 0 0; padding: 0; list-style: none; font-size: .95rem; font-weight: 600; }
.steps li::before { content: ""; display: block; height: 8px; margin-bottom: var(--s2); border-radius: 99px; background: var(--line); }
.steps li.done::before { background: var(--navy); }
.steps li.now::before { background: var(--yellow); box-shadow: inset 0 0 0 2px var(--navy); }
.steps small { display: flex; align-items: center; gap: var(--s1); font-size: .8rem; font-weight: 400; color: var(--soft); }
.steps .ic { width: 1em; height: 1em; }
.bars { margin-top: var(--s4); }
.bars label { display: grid; grid-template-columns: 1fr auto; gap: var(--s1) var(--s3); margin-top: var(--s3); }
.bars label span { font-weight: 400; }
progress { grid-column: 1 / -1; width: 100%; height: .5rem; border: 0; border-radius: 99px; background: var(--line); overflow: hidden; appearance: none; -webkit-appearance: none; }
progress::-webkit-progress-bar { background: var(--line); }
progress::-webkit-progress-value { background: var(--navy); }
progress::-moz-progress-bar { background: var(--navy); }
progress.full::-webkit-progress-value { background: var(--ok); }
progress.full::-moz-progress-bar { background: var(--ok); }
#status details { margin-top: var(--s4); border-top: 1px solid var(--line); }
#status details + details { margin-top: 0; }
#status summary { padding: var(--s3) 0; font-weight: 600; cursor: pointer; }
#status summary .ic { margin-right: var(--s2); color: var(--warn); vertical-align: -.2em; }
#status ul { margin: 0 0 var(--s3); padding-left: 1.1rem; font-size: .95rem; }
#status li { margin: var(--s2) 0; }
#status details p { margin: 0 0 var(--s3); font-size: .95rem; }
.fine { margin: var(--s4) 0 0; padding-top: var(--s4); border-top: 1px solid var(--line); font-size: var(--t-sm); color: var(--soft); }

/* preview */
.pv-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3); }
#pv .hint { margin: var(--s2) 0 var(--s3); }
/* The only raised surface: the preview is a sheet of paper. */
.sheet { margin-inline: auto; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--paper); box-shadow: var(--shadow); overflow: hidden; }
.work[data-device=mobile] .sheet { max-width: 390px; }
.sheet iframe { display: block; width: 100%; height: calc(100vh - var(--bar-h, 0px) - 10rem); min-height: 28rem; border: 0; }

/* ---------- templates, help, footer ---------- */
.info { padding-block: var(--s8) 0; }
.info:last-of-type { padding-bottom: var(--s8); }
.info h1 { margin: 0 0 var(--s3); font-size: var(--t-2xl); }
.info h2 { margin: var(--s6) 0 var(--s2); font-size: var(--t-lg); }
.info > p, .info li, .info dd { max-width: 46rem; }
.docs { display: grid; gap: 0 var(--s7); margin: var(--s5) 0 0; padding: 0; list-style: none; }
.docs li { padding: var(--s4) 0; border-top: 1px solid var(--line); }
.docs strong { display: block; }
.docs span { display: block; color: var(--soft); }
.docs a, footer a { display: inline-block; padding-block: var(--s1); }
.info ol { padding-left: 1.4rem; }
.info ol li { margin-bottom: var(--s2); }
.info dl { display: grid; grid-template-columns: max-content 1fr; gap: var(--s2) var(--s5); margin: 0; }
.info dt { font-weight: 700; }
.info dd { margin: 0; }
.figs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s5) var(--s6); margin: var(--s6) 0 0; padding: 0; list-style: none; }
.figs li { padding-top: var(--s3); border-top: 3px solid var(--navy); }
.figs strong { display: block; font-size: var(--t-2xl); line-height: 1.15; }
.figs li > span { color: var(--soft); }
.audit { width: 100%; max-width: 70rem; margin-top: var(--s5); border-collapse: collapse; font-size: .95rem; }
.audit caption { padding-bottom: var(--s2); font-weight: 700; text-align: left; }
.audit th, .audit td { padding: var(--s2) var(--s3) var(--s2) 0; border-top: 1px solid var(--line); font-weight: 400; text-align: left; }
.audit thead th { border-top: 0; font-size: var(--t-sm); font-weight: 700; vertical-align: bottom; }
.audit td { white-space: nowrap; font-variant-numeric: tabular-nums; }
/* Where each item comes from: under the item on a narrow screen, beside it on a wide one. */
.audit .it { display: grid; gap: var(--s1) var(--s5); }
.audit tbody th, .audit tbody td { vertical-align: top; }
.audit .src { font-size: var(--t-sm); color: var(--soft); }
.audit .src span { display: block; }
.audit .src b, .audit thead .src { color: var(--navy); }
.key { max-width: 46rem; margin-top: var(--s4); font-size: var(--t-sm); color: var(--soft); }
.key b, .key strong { color: var(--navy); }
@media (min-width: 64rem) { .audit .it { grid-template-columns: minmax(0, 1fr) 22rem; } }
.audit .n { display: inline-block; min-width: 1.7em; font-weight: 700; }
.audit .bar { display: inline-block; width: calc(var(--n) / 25 * 3.5rem); min-width: 2px; height: .6rem; border-radius: 2px; background: var(--navy); }
footer { background: var(--navy); color: var(--paper); padding-block: var(--s6); font-size: .95rem; }
footer p { margin: 0 0 var(--s2); }
footer a { color: inherit; }
footer .muted { color: #D3DBEA; }

/* ---------- wider screens ---------- */
@media (max-width: 47.99rem) {
  .mast nav { margin-left: 0; }
  .seg button[data-view=split] { display: none; }
  .tools { margin-left: 0; }
}
@media (min-width: 48rem) {
  .benefits ul { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .docs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .figs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .audit .bar { width: calc(var(--n) / 25 * 10rem); }
  .pane { padding: var(--s6); }
  .cols { grid-template-columns: minmax(0, 1fr) 17rem; }
  #sections { grid-column: 1 / -1; }
  .work[data-view=split] .cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 64rem) {
  .hero { grid-template-columns: minmax(0, 1fr) 20rem; gap: var(--s8); padding-block: var(--s8) var(--s7); }
  .street { max-width: 20rem; }
  .benefits .wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr); }
  .bar { position: sticky; top: 0; z-index: 5; }
  .cols { grid-template-columns: 13rem minmax(0, 1fr) 17rem; }
  #sections { grid-column: auto; }
  .work[data-view=split] .cols { grid-template-columns: 13rem repeat(2, minmax(0, 1fr)); }
  #secnav > summary { display: none; }
  #seclist { margin-top: 0; }
  /* Padding keeps keyboard outlines and the sheet's shadow inside the scrolling columns. */
  #sections, #dash, #pv { position: sticky; top: calc(var(--bar-h, 0px) + var(--s4)); max-height: calc(100vh - var(--bar-h, 0px) - var(--s6)); overflow: auto; }
  #sections, #pv { margin: -.5rem; padding: .5rem; }
  #pv { padding-bottom: var(--s6); }
}
@media (min-width: 80rem) {
  .cols { grid-template-columns: 15rem minmax(0, 1fr) 20rem; }
  .work[data-view=split] .cols { grid-template-columns: 15rem repeat(2, minmax(0, 1fr)); }
}
.work[data-view=preview] .cols { grid-template-columns: minmax(0, 1fr); }
.work[data-view=preview] #pv { position: static; max-height: none; overflow: visible; }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } }
/* ---------- separate pages ---------- */
/* A short page still puts its footer at the bottom of the window. */
body { display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1 0 auto; }
a.linkish { display: inline-block; }
