/* clydeautomation.co.uk (ADR-0008, Decision 1), started from the owner's
   mockup of 2026-10-04: its site palette, kept light as the mockup kept it.
   Its typefaces are served from the site itself (Decision 4): nothing is
   fetched from another origin, and the page's Content-Security-Policy
   refuses anything that is. */

/* The mockup's two faces, as their makers release them, under the SIL Open
   Font License (fonts/OFL-*.txt). Both reserve their names, so the files are
   never subset or changed here: a changed file would have to be renamed. The
   weight range is the mockup's, 400 to 600, so bold (700) draws at 600 as it
   did there; the serif's optical size follows the text's, as it did there. */
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url(fonts/SourceSerif4Variable-Roman.ttf.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url(fonts/IBMPlexSansVar-Roman-Latin1.woff2) format("woff2"); }

:root {
  color-scheme: light;
  --paper: #ffffff; --ground: #f4f7f7; --ink: #1b2832; --ink-soft: #4a5a64; --rule: #d9e1e4;
  --deep: #0f2530; --green: #0d6e5a; --green-soft: #e4f3ee; --blue: #2f5d7c; --sheet-rule: #c4cfd5;
  --serif: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 15px/1.55 var(--sans); }
a { color: var(--blue); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
h1, h2 { text-wrap: balance; line-height: 1.2; margin: 0; }
[hidden] { display: none !important; }

.nav { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 20px;
  padding: 14px 24px; background: var(--paper); border-bottom: 1px solid var(--rule); }
.nav a.home { letter-spacing: 0.06em; font-size: 0.95rem; font-weight: 700; color: var(--deep); text-decoration: none; }
.nav span { font-size: 0.85rem; color: var(--ink-soft); }
.inner { max-width: 1240px; margin: 0 auto; padding-inline: 24px; }

/* min(…, 100%): a column never wider than a 320px phone leaves it */
.hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(310px, 100%), 1fr)); gap: 36px; padding-block: 44px 40px; align-items: start; }
.hero > * { min-width: 0; }
.from { font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--green); font-weight: 600; }
.hero h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(1.5rem, 3.4vw, 2.1rem); line-height: 1.15; color: var(--blue); margin: 10px 0 18px; }
.letter { font-family: var(--serif); font-size: 1.06rem; line-height: 1.7; }
.letter p { margin: 0 0 0.9em; max-width: 52ch; }
.sig { font-family: var(--serif); font-style: italic; font-size: 1.9rem; color: var(--blue); line-height: 1; margin-top: 4px; }
/* the owner's own "Darren", traced to an SVG in the blue above, once there is one */
img.sig { display: block; height: 3.4rem; width: auto; }

/* the sheet: the trading name's tabs, then each venture's, under its prompt */
.prompt { margin: 0 0 10px; font-size: 0.92rem; color: var(--ink-soft); }
.sheet { background: var(--paper); border: 1px solid var(--sheet-rule); border-radius: 8px; overflow: hidden; font-size: 13px;
  box-shadow: 0 1px 2px rgba(15,37,48,.08), 0 10px 28px rgba(15,37,48,.08); }
.tabs { display: flex; overflow-x: auto; background: #eef2f4; border-bottom: 1px solid var(--sheet-rule); }
.tabs a { font-size: 12px; border-right: 1px solid var(--sheet-rule); color: var(--ink-soft); padding: 8px 12px;
  white-space: nowrap; text-decoration: none; }
.tabs a[aria-selected="true"] { background: var(--paper); color: var(--deep); font-weight: 600; box-shadow: inset 0 -2px 0 var(--green); }
/* a formula line too long for the bar wraps under itself rather than being
   cut, so a phone reader sees how the work runs (the owner, 2026-10-29) */
.fx { display: flex; gap: 10px; padding: 7px 12px; border-bottom: 1px solid var(--sheet-rule); font-family: var(--mono); font-size: 12px;
  color: var(--ink-soft); }
.fx b { color: var(--green); font-weight: 400; min-width: 0; overflow-wrap: anywhere; }
.grid { overflow-x: auto; container-type: inline-size; }
.grid table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
.grid th, .grid td { border: 1px solid #e0e6e9; padding: 7px 10px; text-align: right; white-space: nowrap; }
.grid th { background: #f5f8f9; color: var(--ink-soft); font-weight: 500; font-size: 12px; white-space: normal; }
.grid th:first-child, .grid td:first-child { text-align: left; white-space: normal; min-width: 7.5em; }
.grid td.zero { color: #9aa9b1; }
.grid tr.total td { font-weight: 600; border-top: 2px solid var(--deep); color: var(--deep); }
.grid td.sel { outline: 2px solid var(--green); outline-offset: -2px; background: var(--green-soft); }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 12px;
  border-top: 1px solid var(--sheet-rule); background: #fbfcfc; }
.seg { display: inline-flex; border: 1px solid var(--deep); border-radius: 6px; overflow: hidden; }
.seg button { font: inherit; font-size: 12.5px; border: 0; background: transparent; color: var(--deep); padding: 6px 14px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--deep); color: #ffffff; }
.saved { font-size: 12.5px; color: var(--ink-soft); }
.saved b { color: var(--green); font-variant-numeric: tabular-nums; }
.note { font-size: 11px; color: #6a7a83; padding: 0 12px 10px; background: #fbfcfc; margin: 0; }
/* the total, in the last column, stays in view without scrolling: keyed to
   the sheet's own width, not the screen's, since on a tablet the sheet is a
   half column narrower than on a phone */
@container (max-width: 460px) {
  .grid th, .grid td { padding: 6px 5px; }
  .grid th:first-child, .grid td:first-child { min-width: 0; }
}
@container (max-width: 330px) { .grid th, .grid td { padding-inline: 3px; } }
@media (prefers-reduced-motion: no-preference) { .grid td { transition: background-color .3s ease, color .3s ease; } }

.sec { padding-block: 8px 36px; }
.sec h2 { font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--green); margin-bottom: 14px; }
.sec > .prose { margin-top: 18px; }
/* the link to a page of its own, where its paragraph stood */
.more { margin: 16px 0 0; font-size: 0.92rem; }
/* 220px: five across the 1240px page, so ten cards sit five and five
   rather than four, four and an orphaned two */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.card { background: var(--paper); border: 1px solid var(--rule); border-radius: 6px; padding: 16px; display: grid; gap: 6px; align-content: start; }
.card b { color: var(--deep); }
.card span { color: var(--ink-soft); line-height: 1.5; font-size: 0.92rem; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; counter-reset: s;
  list-style: none; margin: 0; padding: 0; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 2.2em 1fr; gap: 10px; line-height: 1.5; color: var(--ink-soft); }
.steps li::before { content: counter(s); font-family: var(--mono); font-weight: 600; color: var(--green); border: 1px solid var(--green);
  border-radius: 4px; height: 2em; display: grid; place-items: center; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 32px; }
.two > * { min-width: 0; }
.prose { font-family: var(--serif); font-size: 1.02rem; line-height: 1.7; }
.prose p { margin: 0 0 0.9em; max-width: 60ch; }
.prose ul { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; max-width: 60ch; }
.ask { background: var(--deep); color: #e8f0f2; border-radius: 8px; padding: 22px 24px; display: grid; gap: 8px; align-content: start; align-self: start; }
.ask b { font-family: var(--serif); font-size: 1.25rem; font-weight: 600; color: #ffffff; }
.ask span { color: #b9cbd2; line-height: 1.55; }
.ask a { font-family: var(--mono); color: #ffffff; font-size: 0.95rem; overflow-wrap: anywhere; }
/* a client's words: the quote marks are the page's, not the entry's */
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.quote { margin: 0; background: var(--paper); border: 1px solid var(--rule); border-left: 3px solid var(--green); border-radius: 6px;
  padding: 16px 18px; display: grid; gap: 10px; align-content: start; }
.quote blockquote { margin: 0; font-family: var(--serif); font-size: 1.04rem; line-height: 1.6; color: var(--deep); quotes: "\201C" "\201D"; }
.quote blockquote::before { content: open-quote; }
.quote blockquote::after { content: close-quote; }
.quote figcaption { font-size: 0.85rem; color: var(--ink-soft); }

.foot { border-top: 1px solid var(--rule); background: var(--paper); }
.foot .inner { padding-block: 16px; font-size: 0.8rem; color: var(--ink-soft); display: flex; flex-wrap: wrap; gap: 6px 18px; }
.legal { max-width: 700px; margin: 0 auto; padding: 40px 24px 56px; display: grid; gap: 12px; font-family: var(--serif);
  font-size: 1.02rem; line-height: 1.6; }
.legal h1 { font-size: 1.8rem; color: var(--deep); }
.legal dl { margin: 0; display: grid; gap: 12px; }
/* a page of the trading name's copy, in the notice's column */
.page { max-width: 700px; margin: 0 auto; padding: 40px 24px 56px; display: grid; gap: 12px; font-family: var(--serif);
  font-size: 1.02rem; line-height: 1.7; }
.page h1 { font-size: 1.8rem; color: var(--deep); }
.page p { margin: 0; }
.legal dt { font-weight: 700; }
.legal dd { margin: 0; }
.legal address { font-style: normal; }
/* the notice's footer, in the notice's column */
.foot.narrow .inner { max-width: 700px; }

@media (max-width: 480px) {
  .nav, .inner, .legal, .page { padding-inline: 16px; }
}
