/* Licence Prep. Plain CSS, no build step. */

@font-face {
  font-family: "Source Serif 4";
  src: url("fonts/source-serif-4.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("fonts/hanken-grotesk.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #241c3a;
  --text: #322d42;
  --muted: #5c566c;
  --paper: #ffffff;
  --wash: #f5f1ea;
  --wash-deep: #e9e2d6;
  --line: #dcd4c6;
  --brand: #a33a1c;
  --brand-dark: #7d2a12;
  --mark: #bfe7dc;
  --error: #8f1d1d;
  --error-wash: #fbeceb;
  --ok-wash: #e2f2ea;
  --serif: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Hanken Grotesk", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --measure: 38rem;
  --page: 70rem;
  --gutter: 1.25rem;
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--paper);
}

img, svg { max-width: 100%; height: auto; }

h1, h2, h3 {
  font-family: var(--serif);
  color: var(--ink);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 1.35rem + 3vw, 3.25rem); font-weight: 560; }
h2 { font-size: clamp(1.5rem, 1.25rem + 1.2vw, 2.05rem); }
h3 { font-size: 1.2rem; line-height: 1.3; }

p, ul, ol, dl { margin: 0 0 1.1em; }
ul, ol { padding-left: 1.25rem; }
li { margin-bottom: 0.4em; }

a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--brand-dark); text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px var(--mark);
  border-radius: 2px;
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: -4rem;
  z-index: 50;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius);
}
.skip:focus { top: 0.75rem; color: #fff; }

.wrap {
  width: 100%;
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.prose { max-width: var(--measure); }
.lede { font-size: 1.2rem; line-height: 1.5; color: var(--text); max-width: 34rem; }
.small { font-size: 0.925rem; color: var(--muted); }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); }
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--ink); }
.brand b { font-weight: inherit; color: var(--brand); }
.brand svg { width: 1.9rem; height: 1.9rem; flex: none; }

.nav-toggle {
  display: none;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.45rem 0.8rem;
  cursor: pointer;
}
.site-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.4rem;
  margin: 0;
  padding: 0;
}
.site-nav li { margin: 0; }
.site-nav a { color: var(--text); text-decoration: none; font-size: 0.98rem; padding: 0.35rem 0; display: inline-block; }
.site-nav a:hover { color: var(--brand-dark); text-decoration: underline; }
.site-nav a[aria-current="page"] { color: var(--ink); font-weight: 650; box-shadow: 0 2px 0 var(--ink); }
.site-nav a.button { color: #fff; padding: 0.55rem 1rem; box-shadow: none; }

@media (max-width: 47.99em) {
  .js .nav-toggle { display: inline-block; }
  .js .site-nav { flex-basis: 100%; }
  .js .site-nav[data-open="false"] { display: none; }
  .site-nav { flex-basis: 100%; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; border-top: 1px solid var(--line); margin-top: 0.4rem; }
  .site-nav li { border-bottom: 1px solid var(--line); }
  .site-nav a { display: block; padding: 0.8rem 0; }
  .site-nav a[aria-current="page"] { box-shadow: none; }
  .site-nav li:last-child { border-bottom: 0; padding-top: 0.8rem; }
  .site-nav a.button { text-align: center; padding: 0.75rem 1rem; }
}

/* Buttons */
.button {
  display: inline-block;
  font: inherit;
  font-weight: 650;
  line-height: 1.2;
  color: #fff;
  background: var(--brand);
  border: 2px solid var(--brand);
  border-radius: var(--radius);
  padding: 0.8rem 1.3rem;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.button.quiet { background: transparent; color: var(--brand-dark); border-color: var(--brand); }
.button.quiet:hover { background: var(--wash); color: var(--brand-dark); }
.button[disabled] { opacity: 0.6; cursor: progress; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.5rem 0 0; }

/* Sections */
main { display: block; }
.band { padding: clamp(2.5rem, 1.5rem + 4vw, 4.5rem) 0; }
.band + .band { border-top: 1px solid var(--line); }
.band.wash { background: var(--wash); }
.band.tight { padding-top: clamp(2rem, 1.2rem + 3vw, 3.25rem); }
.page-head { padding: clamp(2.25rem, 1.5rem + 3vw, 3.75rem) 0 clamp(1.5rem, 1rem + 2vw, 2.25rem); }
.page-head h1 { max-width: 20ch; }
.page-head + .band { border-top: 1px solid var(--line); }

.split { display: grid; gap: 2.25rem; }
@media (min-width: 56em) {
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4rem; align-items: start; }
  .split.lean { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .split.lead { grid-template-columns: minmax(0, 11fr) minmax(0, 9fr); align-items: center; }
}

/* Hero */
.hero { padding-top: clamp(2rem, 1rem + 3.5vw, 4rem); padding-bottom: clamp(2.5rem, 1.5rem + 4vw, 4.5rem); }
.hero h1 { max-width: 15ch; }
.price-line { margin: 1.25rem 0 0; font-size: 1.05rem; }
.price-line strong { background: var(--mark); padding: 0.05em 0.3em; border-radius: 2px; color: var(--ink); }

/* The plan sheet: a small rendering of the document a customer receives */
.sheet {
  margin: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: 0 1px 0 var(--line), 0.6rem 0.6rem 0 var(--wash);
  padding: 1.4rem 1.4rem 1.1rem;
  font-size: 0.93rem;
  line-height: 1.45;
}
.band.wash .sheet { box-shadow: 0 1px 0 var(--line), 0.6rem 0.6rem 0 var(--wash-deep); }
.sheet-flag {
  display: inline-block;
  margin: 0 0 0.9rem;
  padding: 0.15rem 0.5rem;
  font-size: 0.8rem;
  font-weight: 650;
  color: var(--error);
  border: 1px solid currentColor;
  border-radius: 2px;
}
.sheet-title { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; color: var(--ink); margin: 0 0 0.3rem; line-height: 1.2; }
.sheet-meta { margin: 0 0 1rem; color: var(--muted); }
.sheet table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.sheet caption { text-align: left; font-weight: 650; color: var(--ink); padding: 0 0 0.4rem; }
.sheet th, .sheet td { text-align: left; padding: 0.42rem 0; border-top: 1px solid var(--line); vertical-align: top; font-weight: 400; }
.sheet td { text-align: right; white-space: nowrap; padding-left: 1rem; }
.sheet thead th { font-weight: 650; color: var(--ink); border-top: 0; font-size: 0.85rem; }
.sheet thead th + th { text-align: right; }
.sheet .sub th, .sheet .sub td { color: var(--muted); font-size: 0.86rem; padding-top: 0.3rem; padding-bottom: 0.3rem; }
.sheet .sub th { padding-left: 1rem; }
.sheet .total th, .sheet .total td { font-weight: 700; color: var(--ink); border-top: 2px solid var(--ink); }
.sheet .total td span { background: var(--mark); padding: 0.05em 0.35em; border-radius: 2px; }
.sheet-sign { margin: 1.1rem 0 0; padding-top: 0.9rem; border-top: 1px solid var(--line); color: var(--muted); display: flex; flex-wrap: wrap; gap: 0.3rem 1.5rem; }
.sheet-sign span { flex: 1 1 9rem; border-bottom: 1px dotted var(--muted); padding-bottom: 1.1rem; }

/* Ruled rows: used for requirements, inclusions and the like */
.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.rows > li { margin: 0; padding: 0.95rem 0; border-bottom: 1px solid var(--line); }
.rows > li > strong { display: block; color: var(--ink); }
.rows.ticks > li { padding-left: 1.9rem; background: url("tick.svg") no-repeat 0 1.15rem / 1.1rem 1.1rem; }
.rows.crosses > li { padding-left: 1.9rem; background: url("cross.svg") no-repeat 0 1.15rem / 1.1rem 1.1rem; }

/* Steps: a real sequence, so numbered */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps > li {
  counter-increment: step;
  position: relative;
  margin: 0;
  padding: 0 0 1.75rem 3.4rem;
  border-left: 0;
}
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -0.1rem;
  width: 2.3rem;
  height: 2.3rem;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: 50%;
}
.steps > li::after {
  content: "";
  position: absolute;
  left: 1.15rem;
  top: 2.4rem;
  bottom: 0.2rem;
  width: 1.5px;
  background: var(--line);
}
.steps > li:last-child { padding-bottom: 0; }
.steps > li:last-child::after { display: none; }
.steps h3 { margin-bottom: 0.3rem; }
.steps p:last-child { margin-bottom: 0; }
.band.wash .steps > li::before { background: var(--wash); }

/* Notes and callouts */
.note {
  border-left: 4px solid var(--ink);
  background: var(--wash);
  padding: 1rem 1.15rem;
  margin: 0 0 1.25rem;
  max-width: var(--measure);
}
.band.wash .note { background: #fff; }
.note p:last-child { margin-bottom: 0; }
.source { font-size: 0.925rem; color: var(--muted); }

/* Price */
.price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.2rem 0.75rem; margin: 0 0 1rem; }
.price .amount { font-family: var(--serif); font-size: clamp(3rem, 2rem + 5vw, 4.75rem); font-weight: 560; line-height: 1; color: var(--ink); letter-spacing: -0.02em; }
.price .per { font-size: 1.1rem; color: var(--muted); }

/* Tables in body copy */
.table-scroll { overflow-x: auto; margin: 0 0 1.25rem; }
table.plain { border-collapse: collapse; width: 100%; font-size: 0.98rem; }
table.plain th, table.plain td { text-align: left; vertical-align: top; padding: 0.7rem 1rem 0.7rem 0; border-bottom: 1px solid var(--line); }
table.plain thead th { color: var(--ink); border-bottom: 2px solid var(--ink); font-weight: 650; }
table.plain tbody th { font-weight: 650; color: var(--ink); width: 34%; }

/* FAQ */
.faq { border-top: 1px solid var(--line); max-width: 46rem; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 2.25rem 1rem 0;
  position: relative;
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute;
  right: 0.35rem;
  top: 1.35rem;
  width: 0.6rem;
  height: 0.6rem;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: rotate(45deg);
}
.faq details[open] summary::after { transform: rotate(-135deg); top: 1.6rem; }
.faq .answer { padding: 0 0 1.1rem; max-width: var(--measure); }
.faq .answer p:last-child { margin-bottom: 0; }

/* Forms */
.form { max-width: 36rem; }
.field { margin: 0 0 1.25rem; }
.field label, .field .label { display: block; font-weight: 650; color: var(--ink); margin-bottom: 0.3rem; }
.field .hint { display: block; font-size: 0.925rem; color: var(--muted); margin-bottom: 0.4rem; }
.field input, .field textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: #fff;
  border: 1.5px solid #7a7488;
  border-radius: var(--radius);
  padding: 0.7rem 0.8rem;
}
.field textarea { min-height: 8rem; resize: vertical; }
.field input[type="date"] { max-width: 14rem; }
.field input:focus-visible, .field textarea:focus-visible { box-shadow: 0 0 0 3px var(--mark); }
.field [aria-invalid="true"] { border-color: var(--error); border-width: 2px; }
.field .error { display: block; color: var(--error); font-weight: 600; font-size: 0.95rem; margin-top: 0.35rem; }
.field .optional { font-weight: 400; color: var(--muted); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.status { border-radius: var(--radius); padding: 1rem 1.15rem; margin: 0 0 1.5rem; border-left: 4px solid; }
.status:focus { outline: none; }
.status h2 { font-size: 1.25rem; margin-bottom: 0.35rem; }
.status p:last-child { margin-bottom: 0; }
.status.ok { background: var(--ok-wash); border-color: #1f6b4a; }
.status.bad { background: var(--error-wash); border-color: var(--error); }
.status.bad h2 { color: var(--error); }

/* Legal pages */
.legal h2 { font-size: 1.4rem; margin-top: 2.2rem; }
.legal h2:first-child { margin-top: 0; }
.legal { max-width: 44rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--wash); padding: 2.25rem 0 2.5rem; font-size: 0.95rem; color: var(--text); }
.site-footer p { max-width: 52rem; margin-bottom: 0.8rem; }
.site-footer ul { list-style: none; margin: 0 0 1.1rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.3rem 1.4rem; }
.site-footer li { margin: 0; }
.site-footer a, .linklike { color: var(--brand-dark); }
.linklike { font: inherit; background: none; border: 0; padding: 0; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; cursor: pointer; }
.linklike:hover { text-decoration-thickness: 2px; }

/* Cookie choices */
.cookie {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  background: var(--ink);
  color: #fff;
  padding: 1rem 0;
  box-shadow: 0 -2px 12px rgba(36, 28, 58, 0.28);
}
.cookie[hidden] { display: none; }
.cookie .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.5rem; }
.cookie p { margin: 0; flex: 1 1 20rem; font-size: 0.98rem; }
.cookie a { color: #fff; }
.cookie .cookie-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.cookie .button { background: #fff; color: var(--ink); border-color: #fff; padding: 0.6rem 1.1rem; }
.cookie .button:hover { background: var(--mark); border-color: var(--mark); color: var(--ink); }
.cookie :focus-visible { outline-color: #fff; box-shadow: 0 0 0 6px var(--brand); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

@media print {
  .site-header nav, .cookie, .nav-toggle, .actions { display: none !important; }
  body { font-size: 11pt; }
}

.steps + .note { margin-top: 1.75rem; }

/* Independence notice: sits directly under the header on the home and pricing pages */
.indie { background: var(--ink); color: #fff; padding: 0.8rem 0; font-size: 0.98rem; line-height: 1.5; }
.indie p { margin: 0; max-width: 62rem; }
.indie strong { color: var(--mark); font-weight: 650; }
.indie a { color: #fff; }
.indie a:hover { color: var(--mark); }
.indie :focus-visible { outline-color: #fff; box-shadow: 0 0 0 6px var(--brand); }

/* Hero sits on the warm wash so the home page opens differently from the inner pages */
.hero { background: var(--wash); border-bottom: 1px solid var(--line); }
.hero .sheet { box-shadow: 0 1px 0 var(--line), 0.6rem 0.6rem 0 var(--wash-deep); }
.hero h1 { max-width: 17ch; }

/* The application pack illustration */
.sheet .state { display: inline-block; padding: 0.05rem 0.5rem; border-radius: 999px; font-size: 0.82rem; font-weight: 650; background: var(--wash); color: var(--ink); }
.sheet .state.yours { background: var(--mark); }
.sheet td { white-space: normal; }
.sheet .who { display: block; color: var(--muted); font-size: 0.84rem; }
.sheet-flag { color: var(--muted); }

/* Fees side by side: ours and the council's */
.fees { display: grid; gap: 1.25rem; margin: 0 0 1.25rem; }
@media (min-width: 44em) { .fees { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.fee {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 5px solid var(--ink);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem 1.2rem;
}
.fee.ours { border-top-color: var(--brand); }
.fee h3 { font-family: var(--sans); font-size: 0.95rem; font-weight: 650; letter-spacing: 0.02em; color: var(--muted); margin: 0 0 0.6rem; }
.fee .big { font-family: var(--serif); font-size: clamp(2.2rem, 1.6rem + 2.4vw, 3rem); font-weight: 560; line-height: 1.05; color: var(--ink); letter-spacing: -0.02em; margin: 0 0 0.35rem; }
.fee .big small { font-family: var(--sans); font-size: 1rem; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.fee p { margin: 0 0 0.6rem; }
.fee p:last-child { margin-bottom: 0; }
.fee dl { margin: 0; }
.fee dl > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 0 1rem; padding: 0.6rem 0; border-top: 1px solid var(--line); }
.fee dl > div:first-child { border-top: 0; padding-top: 0; }
.fee dl > div:last-child { margin-bottom: 0.6rem; border-bottom: 1px solid var(--line); }
.fee dt { color: var(--ink); font-weight: 650; }
.fee dd { margin: 0; }
.fee dd.amt { font-family: var(--serif); font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2rem); font-weight: 560; line-height: 1.1; color: var(--ink); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.fee dd.parts { grid-column: 1 / -1; color: var(--muted); font-size: 0.925rem; }
.fee .to { font-size: 0.925rem; color: var(--muted); }

table.plain td.num, table.plain th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.plain tfoot th, table.plain tfoot td { border-top: 2px solid var(--ink); border-bottom: 0; font-weight: 700; color: var(--ink); }
.field select { width: 100%; font: inherit; }
.field input[type="number"] { max-width: 10rem; }
.cols { columns: 2; column-gap: 2rem; }
@media (max-width: 30em) { .cols { columns: 1; } }
.cols li { break-inside: avoid; }
.split > * { min-width: 0; }
.sheet .state { white-space: nowrap; }
table.sums { max-width: 40rem; }
table.sums th, table.sums td { padding-right: 0; padding-left: 0.75rem; }
table.sums th:first-child { padding-left: 0; width: auto; }
@media (max-width: 30em) { table.sums { font-size: 0.92rem; } table.sums th, table.sums td { padding-left: 0.5rem; } }
.split p + h2, .split .note + h2, .split ul + h2 { margin-top: 2.2rem; }
