/* Blackfern Labs — practical security consultancy */

:root {
  color-scheme: light;
  --bg: #f6f7f5;
  --white: #ffffff;
  --ink: #24282b;
  --muted: #535a5f;
  --fern: #2f5e3e;
  --fern-deep: #214530;
  --fern-wash: #e5eee7;
  --line: #d9ddd8;
  --line-strong: #9ba39d;
  --control: #737c76;
  --alert: #9b2c2c;
  --alert-wash: #fbecec;
  --flag: #6b4e00;
  --flag-wash: #fff4cc;
  --focus: #1b3a26;

  --head: "Franklin Gothic Medium", "Franklin Gothic", "ITC Franklin Gothic", "Libre Franklin", "Arial Narrow", Arial, sans-serif;
  --body: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --gutter: clamp(1rem, 4vw, 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 1.03rem; line-height: 1.6; }
img, svg { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4 { font-family: var(--head); font-weight: 500; line-height: 1.15; margin: 0 0 0.5em; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 1.5rem + 2.6vw, 3.3rem); }
h2 { font-size: clamp(1.6rem, 1.3rem + 1.3vw, 2.25rem); }
h3 { font-size: 1.35rem; }
h4 { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); }
p, ul, ol { margin: 0 0 1em; }
a { color: var(--fern); text-underline-offset: 0.18em; }
a:hover { color: var(--fern-deep); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.wrap { width: 100%; max-width: 74rem; margin: 0 auto; padding: 0 var(--gutter); }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 20; background: var(--ink); color: #fff; padding: 0.6rem 1rem; text-decoration: none; }
.skip-link:focus { top: 1rem; color: #fff; }
.review-banner { background: var(--flag-wash); color: var(--flag); font-size: 0.85rem; padding: 0.45rem 0; border-bottom: 1px solid #e3cf86; }
.review-banner p { margin: 0; }
.pending { background: var(--flag-wash); color: var(--flag); border: 1px dashed #c9a93a; padding: 0.05em 0.35em; font-weight: 700; font-size: 0.92em; }

/* Header */
.site-header { background: var(--white); border-bottom: 1px solid var(--line); box-shadow: inset 0 -3px 0 var(--fern); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 2rem; padding-top: 0.9rem; padding-bottom: 1rem; }
.brand { display: inline-flex; align-items: center; gap: 0.55rem; font-family: var(--head); font-size: 1.35rem; color: var(--ink); text-decoration: none; }
.brand svg { width: 1.8rem; height: 1.8rem; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 1.4rem; font-size: 0.97rem; }
.site-nav a { color: var(--ink); text-decoration: none; padding: 0.3rem 0; display: inline-block; }
.site-nav a:hover { color: var(--fern); text-decoration: underline; }
.site-nav a[aria-current="page"] { color: var(--fern); text-decoration: underline; text-decoration-thickness: 2px; }
.site-nav .nav-cta { background: var(--fern); color: #fff; padding: 0.45rem 0.9rem; }
.site-nav .nav-cta:hover { background: var(--fern-deep); color: #fff; text-decoration: none; }

.btn { display: inline-block; background: var(--fern); color: #fff; font-family: var(--head); font-size: 1.05rem; text-decoration: none; padding: 0.7rem 1.2rem; border: 0; cursor: pointer; transition: background-color 0.15s ease; }
.btn:hover { background: var(--fern-deep); color: #fff; }

/* Opening */
.opening { padding: clamp(2.25rem, 5vw, 4rem) 0; background: var(--white); border-bottom: 1px solid var(--line); }
.opening .wrap { display: grid; gap: 2rem; align-items: center; }
.eyebrow { font-family: var(--head); color: var(--fern); font-size: 1rem; margin-bottom: 0.75rem; }
.opening .lead { font-size: 1.15rem; max-width: 36rem; }
.service-strip { list-style: none; padding: 0; margin: 1.5rem 0; display: grid; gap: 0.5rem; max-width: 36rem; }
.service-strip a { display: flex; gap: 0.75rem; align-items: baseline; padding: 0.55rem 0.8rem; border-left: 4px solid var(--fern); background: var(--bg); color: var(--ink); text-decoration: none; }
.service-strip a:hover { background: var(--fern-wash); }
.service-strip b { font-family: var(--head); font-weight: 500; font-size: 1.08rem; }
.service-strip span { color: var(--muted); font-size: 0.92rem; }
.opening .scope { font-size: 0.92rem; color: var(--muted); margin: 1rem 0 0; max-width: 36rem; }
.lifecycle-fig { margin: 0; }
.lifecycle-fig figcaption { font-size: 0.88rem; color: var(--muted); text-align: center; margin-top: 0.5rem; }
@media (min-width: 58rem) { .opening .wrap { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 3.5rem; } }

.lc text { font-family: var(--body); fill: var(--ink); }
.lc .ring { fill: none; stroke: var(--line-strong); stroke-width: 2; stroke-dasharray: 3 6; }
.lc .node { fill: var(--white); stroke: var(--fern); stroke-width: 2; }
.lc .num { fill: var(--fern); }
.lc .num-t { fill: #fff; font-family: var(--head); font-size: 15px; }
.lc .t { font-family: var(--head); font-size: 16px; }
.lc .s { font-size: 12.5px; fill: var(--muted); }
.lc .c1 { font-family: var(--head); font-size: 17px; }
.lc .c2 { font-size: 12.5px; fill: var(--muted); }

/* Sections */
.section { padding: clamp(2.75rem, 6vw, 4.5rem) 0; }
.section-white { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.lede { max-width: 42rem; color: var(--muted); font-size: 1.08rem; }

/* Fit list */
.fit { display: grid; gap: 1.5rem; }
.fit ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; }
.fit li { padding-left: 1.75rem; position: relative; }
.fit li::before { content: ""; position: absolute; left: 0; top: 0.35rem; width: 1rem; height: 1rem; border: 2px solid var(--fern); }
.fit li::after { content: ""; position: absolute; left: 0.32rem; top: 0.5rem; width: 0.35rem; height: 0.55rem; border-right: 2px solid var(--fern); border-bottom: 2px solid var(--fern); transform: rotate(40deg); }
.fit .not { color: var(--muted); font-size: 0.95rem; border-top: 1px solid var(--line); padding-top: 1rem; }
@media (min-width: 58rem) { .fit { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 3rem; } .fit ul { grid-template-columns: 1fr 1fr; } }

/* At a glance table */
.glance-wrap { overflow-x: auto; margin: 1.75rem 0 0; }
.glance { width: 100%; border-collapse: collapse; background: var(--white); min-width: 46rem; font-size: 0.95rem; }
.glance th, .glance td { text-align: left; vertical-align: top; padding: 0.8rem 1rem; border: 1px solid var(--line); }
.glance thead th { font-family: var(--head); font-weight: 500; font-size: 1.05rem; background: var(--fern); color: #fff; border-color: var(--fern); }
.glance thead th:first-child { background: var(--white); border-color: var(--line); }
.glance tbody th { font-family: var(--head); font-weight: 500; width: 13rem; background: var(--bg); }

/* Spec sheets */
.spec { background: var(--white); border: 1px solid var(--line); border-top: 4px solid var(--fern); margin-top: 2rem; }
.spec-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; align-items: baseline; padding: 1.25rem 1.4rem 0.5rem; }
.spec-head h3 { margin: 0; font-size: 1.55rem; }
.spec-head .code { font-family: var(--head); color: var(--fern); font-size: 0.95rem; }
.spec-intro { padding: 0 1.4rem; max-width: 46rem; }
.spec-grid { display: grid; gap: 0; border-top: 1px solid var(--line); margin-top: 0.75rem; }
.spec-grid > div { padding: 1rem 1.4rem; border-bottom: 1px solid var(--line); }
.spec-grid ul { margin: 0; padding-left: 1.1rem; }
.spec-grid li { margin-bottom: 0.3rem; }
.spec-grid li::marker { color: var(--fern); }
.spec-grid p { margin: 0; }
.spec-foot { padding: 0.85rem 1.4rem; font-size: 0.92rem; color: var(--muted); background: var(--bg); }
@media (min-width: 58rem) {
  .spec-grid { grid-template-columns: 1.3fr 1fr 1fr; }
  .spec-grid > div + div { border-left: 1px solid var(--line); }
}

/* Scenarios */
.scenarios { list-style: none; padding: 0; margin: 1.75rem 0 0; }
.scenarios li { display: grid; gap: 0.5rem 2.5rem; padding: 1.25rem 0; border-top: 1px solid var(--line-strong); }
.scenarios li:last-child { border-bottom: 1px solid var(--line-strong); }
.scenarios h3 { font-size: 1.2rem; margin: 0; }
.scenarios .tag { display: inline-block; font-size: 0.75rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line-strong); padding: 0 0.4rem; margin-bottom: 0.35rem; }
.scenarios p { margin: 0; }
.scenarios .via { font-size: 0.9rem; color: var(--muted); margin-top: 0.4rem; }
@media (min-width: 58rem) { .scenarios li { grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); } }

/* Licence note */
.licence { background: var(--fern-wash); padding: 1.1rem 1.3rem; max-width: 52rem; margin-top: 1.5rem; }
.licence h3 { font-size: 1.1rem; }
.licence p { margin: 0; }

/* Resource */
.res { display: grid; gap: 2rem; align-items: center; }
.res-preview { background: var(--white); border: 1px solid var(--line); padding: 1rem 1.2rem; font-size: 0.9rem; max-width: 26rem; }
.res-preview p { font-family: var(--head); font-size: 1.05rem; margin: 0 0 0.5rem; }
.res-preview table { width: 100%; border-collapse: collapse; }
.res-preview td, .res-preview th { border-top: 1px solid var(--line); padding: 0.35rem 0.25rem; text-align: left; }
.res-preview th { font-weight: 400; color: var(--muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; }
@media (min-width: 58rem) { .res { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 3rem; } }

/* About */
.about { display: grid; gap: 2rem; }
.about p { max-width: 40rem; }
.limits { list-style: none; padding: 0; margin: 0; background: var(--white); border: 1px solid var(--line); }
.limits li { padding: 0.65rem 1rem; border-bottom: 1px solid var(--line); font-size: 0.97rem; }
.limits li:last-child { border-bottom: 0; }
@media (min-width: 58rem) { .about { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 3rem; } }

/* Contact */
.contact-grid { display: grid; gap: 2rem; }
@media (min-width: 58rem) { .contact-grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.85fr); gap: 3rem; align-items: start; } }
.side > * + * { margin-top: 1rem; }
.notice { background: var(--alert-wash); border-left: 4px solid var(--alert); padding: 0.9rem 1.1rem; }
.notice h3 { color: var(--alert); font-size: 1.05rem; margin-bottom: 0.3rem; }
.notice p { margin: 0 0 0.5rem; font-size: 0.95rem; }
.notice p:last-child { margin: 0; }
.direct, .next { background: var(--white); border: 1px solid var(--line); padding: 0.9rem 1.1rem; font-size: 0.97rem; }
.direct h3, .next h3 { font-size: 1.05rem; margin-bottom: 0.3rem; }
.direct p, .next p { margin: 0; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.preview-flag { background: var(--flag-wash); color: var(--flag); border: 1px dashed #c9a93a; padding: 0.6rem 0.9rem; font-size: 0.9rem; font-weight: 700; margin: 0 0 1rem; }
.enquiry-form { background: var(--white); border: 1px solid var(--line); border-top: 4px solid var(--fern); padding: 1.4rem clamp(1rem, 3vw, 1.9rem) 1.6rem; }
.enquiry-form h3 { margin-bottom: 0.2rem; }
.form-required-note { font-size: 0.9rem; color: var(--muted); margin-bottom: 1.25rem; }
.field-row { display: grid; gap: 0 1.25rem; }
@media (min-width: 42rem) { .field-row { grid-template-columns: 1fr 1fr; } }
.field { margin-bottom: 1.15rem; }
.field label { display: block; font-family: var(--head); font-size: 1.02rem; margin-bottom: 0.3rem; }
.field .req { color: var(--alert); }
.field .optional { font-family: var(--body); color: var(--muted); font-size: 0.88rem; }
.field-hint { font-size: 0.9rem; color: var(--muted); margin: -0.05rem 0 0.4rem; }
.field input, .field select, .field textarea { display: block; width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--control); border-radius: 0; padding: 0.6rem 0.75rem; min-height: 2.9rem; transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.field textarea { resize: vertical; min-height: 8.5rem; line-height: 1.5; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--fern); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--fern); }
.select-wrap { position: relative; }
.select-wrap select { appearance: none; -webkit-appearance: none; padding-right: 2.4rem; cursor: pointer; }
.select-wrap::after { content: ""; position: absolute; right: 0.95rem; top: 50%; width: 0.45rem; height: 0.45rem; border-right: 2px solid var(--fern); border-bottom: 2px solid var(--fern); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.field [aria-invalid="true"] { border: 2px solid var(--alert); padding: calc(0.6rem - 1px) calc(0.75rem - 1px); background: #fffafa; }
.field-error { color: var(--alert); font-size: 0.9rem; font-weight: 700; margin: 0.35rem 0 0; }
.field-error::before { content: "Error: "; }
.field-count { font-size: 0.8rem; color: var(--muted); text-align: right; margin: 0.25rem 0 0; }
.field-count.is-near { color: var(--alert); font-weight: 700; }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.error-summary { border: 2px solid var(--alert); background: var(--alert-wash); padding: 0.85rem 1.05rem; margin-bottom: 1.3rem; }
.error-summary h4 { color: var(--alert); text-transform: none; letter-spacing: 0; font-size: 1rem; margin: 0 0 0.3rem; }
.error-summary ul { margin: 0; padding-left: 1.2rem; }
.error-summary a { color: var(--alert); font-weight: 700; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1.25rem; margin-top: 0.4rem; }
.form-actions .btn:disabled { background: var(--line-strong); color: var(--ink); cursor: not-allowed; }
.form-privacy { font-size: 0.88rem; color: var(--muted); margin: 0; }
.form-status:empty { display: none; }
.form-status { margin-top: 1.1rem; padding: 0.75rem 1rem; border-left: 4px solid var(--line-strong); background: var(--bg); font-size: 0.97rem; }
.form-status:focus { outline: none; }
.form-status:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.form-status.is-preview { border-left-color: #c9a93a; background: var(--flag-wash); color: var(--flag); }
.form-status.is-success { border-left-color: var(--fern); background: var(--fern-wash); color: var(--fern-deep); }
.form-status.is-error { border-left-color: var(--alert); background: var(--alert-wash); color: var(--alert); }
.form-noscript { border-left: 4px solid var(--line-strong); background: var(--white); padding: 0.75rem 1rem; margin-top: 1rem; }

/* Footer */
.site-footer { background: var(--ink); color: #d9ddda; padding: 2rem 0 1.75rem; font-size: 0.92rem; }
.site-footer a { color: #cfe5d5; }
.site-footer a:hover { color: #fff; }
.footer-top { display: grid; gap: 1rem; }
.footer-top p { margin: 0; max-width: 46rem; }
.footer-top ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; }
.footer-legal { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.35rem 1.5rem; margin-top: 1.4rem; padding-top: 1rem; border-top: 1px solid #454b4f; font-size: 0.88rem; }
.footer-legal p { margin: 0; }
.footer-legal a[aria-current="page"] { color: #fff; }
@media (min-width: 56rem) { .footer-top { grid-template-columns: 1fr auto; } }
@media (max-width: 30rem) { .footer-legal { flex-direction: column; gap: 0.4rem; } }

/* Docs */
.doc { padding: clamp(2rem, 5vw, 3.5rem) 0 3.5rem; }
.doc-head { max-width: 48rem; margin-bottom: 1.75rem; }
.doc-meta { color: var(--muted); font-size: 0.95rem; }
.doc-body { max-width: 42rem; }
.doc-body h2 { font-size: 1.45rem; margin-top: 2rem; }
.doc-body ul { padding-left: 1.2rem; }
.summary { background: var(--fern-wash); padding: 1rem 1.2rem; margin-bottom: 1.5rem; }
.summary p:last-child { margin-bottom: 0; }

/* Checklist */
.cl { max-width: 62rem; }
.cl-meta { list-style: none; padding: 0; margin: 1.25rem 0; display: grid; gap: 0.25rem 2rem; }
.cl-meta li { display: flex; gap: 0.7rem; align-items: flex-end; padding-top: 0.65rem; }
.cl-meta span { font-family: var(--head); white-space: nowrap; }
.cl-meta li::after { content: ""; flex: 1; border-bottom: 1px solid var(--ink); min-width: 4rem; }
@media (min-width: 42rem) { .cl-meta { grid-template-columns: 1fr 1fr; } }
.cl-warn { background: var(--alert-wash); border-left: 4px solid var(--alert); padding: 0.65rem 1rem; font-size: 0.95rem; max-width: 50rem; }
.cl-stages { list-style: none; padding: 0; margin: 1.25rem 0; display: flex; flex-wrap: wrap; gap: 0; }
.cl-stages li { font-family: var(--head); padding: 0.4rem 0.9rem; border: 1px solid var(--fern); color: var(--fern); margin: 0 -1px -1px 0; }
.cl-stages li b { font-weight: 500; background: var(--fern); color: #fff; padding: 0 0.35rem; margin-right: 0.35rem; }
.scroll { overflow-x: auto; margin: 0.75rem 0 0; }
.cl-table { width: 100%; border-collapse: collapse; background: var(--white); font-size: 0.93rem; min-width: 38rem; }
.cl-table caption { text-align: left; font-family: var(--head); font-size: 1.35rem; padding: 0.5rem 0; caption-side: top; }
.cl-table caption span { background: var(--fern); color: #fff; padding: 0 0.45rem; margin-right: 0.5rem; }
.cl-table th, .cl-table td { border: 1px solid var(--line-strong); padding: 0.5rem 0.65rem; text-align: left; vertical-align: top; }
.cl-table thead th { background: var(--fern-wash); font-family: var(--head); font-weight: 500; }
.cl-table td.b { width: 4.5rem; text-align: center; }
.cl-table .box { display: inline-block; width: 1rem; height: 1rem; border: 1.5px solid var(--ink); vertical-align: middle; }
.cl-table small { display: block; color: var(--muted); font-size: 0.85rem; }
.cl-section { margin-top: 1.75rem; }
.cl-notes { list-style: none; padding: 0; margin: 0.5rem 0 0; }
.cl-notes li { border-bottom: 1px solid var(--ink); height: 2.2rem; }
.cl-foot { margin-top: 2rem; padding-top: 0.9rem; border-top: 1px solid var(--line); font-size: 0.86rem; color: var(--muted); }
.print-hint { color: var(--muted); font-size: 0.95rem; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }

@media print {
  @page { size: A4; margin: 14mm; }
  body { background: #fff; color: #000; font-size: 10pt; line-height: 1.4; }
  .skip-link, .review-banner, .site-nav, .print-hint, .no-print, .site-footer { display: none !important; }
  .site-header { box-shadow: none; border-bottom: 2px solid #000; }
  .site-header .wrap, .wrap { padding: 0; max-width: none; }
  a { color: #000; text-decoration: none; }
  .doc { padding: 5mm 0 0; }
  h1 { font-size: 20pt; }
  .scroll { overflow: visible; }
  .cl-table { min-width: 0; font-size: 9pt; }
  .cl-table caption { font-size: 13pt; break-after: avoid; }
  .cl-table caption span { background: none; color: #000; border: 1px solid #000; }
  .cl-table thead th { background: #eee; }
  .cl-table thead { display: table-header-group; }
  .cl-table tr { break-inside: avoid; }
  .cl-stages li { color: #000; border-color: #000; }
  .cl-stages li b { background: none; color: #000; }
  .cl-warn { background: none; border-left-color: #000; }
  .pending { border: 1px dashed #000; background: none; color: #000; }
}
