/*
 * DevOps Hive. Cool paper, navy ink, one honey accent.
 * The signature is the flow chain: the path a change takes, drawn as hex-capped
 * nodes joined by a honey line. Everything else stays quiet.
 * Fonts are self-hosted (SIL Open Font License): Schibsted Grotesk, JetBrains Mono.
 */
@font-face { font-family: 'Schibsted Grotesk'; src: url('/static/sites/hive/fonts/schibsted-grotesk-latin-wght-normal.woff2') format('woff2'); font-weight: 400 900; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('/static/sites/hive/fonts/jetbrains-mono-latin-wght-normal.woff2') format('woff2'); font-weight: 400 700; font-display: swap; }

:root {
  --paper: #EEF1F4;
  --sheet: #FFFFFF;
  --ink: #16202B;
  --soft: #4A5969;
  --comb: #C9D1DA;
  --honey: #E2A100;
  --honey-deep: #8A6200;
  --slab: #101820;
  --slab-text: #DCE6EF;

  /* read by the shared sign-in and consent UI (fk-shared.css) */
  --f-bg: var(--sheet);
  --f-fg: var(--ink);
  --f-muted: var(--soft);
  --f-accent: var(--ink);
  --f-accent-fg: #FFFFFF;
  --f-rule: var(--comb);
  --f-font: 'Schibsted Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-radius: 6px;

  --sans: var(--f-font);
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --measure: 38rem;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 1.0625rem; line-height: 1.6; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--honey); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--honey); outline-offset: 2px; border-radius: 3px; }
h1, h2, h3 { line-height: 1.15; margin: 0; font-weight: 750; letter-spacing: -0.015em; }
p { margin: 0 0 1rem; }
code, pre, .code, .copy-src { font-family: var(--mono); font-size: .875em; font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0; }
.wrap { max-width: 70rem; margin: 0 auto; padding: 0 1.25rem; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: .6rem 1rem; z-index: 10; }
.skip:focus { left: .5rem; top: .5rem; }
[hidden] { display: none !important; }

/* header and footer */
.top { background: var(--paper); border-bottom: 1px solid var(--comb); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.75rem; flex-wrap: wrap; padding-top: .5rem; padding-bottom: .5rem; }
.mark { display: inline-flex; align-items: center; gap: .55rem; font-weight: 800; font-size: 1.125rem; letter-spacing: -0.02em; text-decoration: none; }
.top nav { display: flex; gap: 1.25rem; font-size: .9375rem; }
.top nav a { text-decoration: none; padding: .35rem 0; border-bottom: 2px solid transparent; }
.top nav a:hover { border-bottom-color: var(--honey); }
.foot { margin-top: 5rem; border-top: 1px solid var(--comb); padding: 1.75rem 0 4.5rem; font-size: .9375rem; color: var(--soft); }
.foot-in { display: flex; gap: 1.5rem; justify-content: space-between; flex-wrap: wrap; }
.foot p { margin: 0; max-width: 34rem; }
.foot nav { display: flex; gap: 1.25rem; }

/* buttons */
.btn { display: inline-block; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; padding: .7rem 1.15rem; border-radius: 6px; border: 2px solid var(--honey); background: var(--honey); color: var(--ink); }
.btn:hover { background: #F0B41C; border-color: #F0B41C; }
.btn-line { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-line:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-dark { background: transparent; border-color: #55687B; color: var(--slab-text); padding: .45rem .85rem; font-size: .9375rem; }
.btn-dark:hover { background: var(--slab-text); color: var(--slab); border-color: var(--slab-text); }
.btn-danger { background: transparent; border-color: #A3261B; color: #A3261B; }
.btn-danger:hover { background: #A3261B; color: #fff; border-color: #A3261B; }

/* home */
.hero { padding-top: 4.5rem; padding-bottom: 2.5rem; }
.hero h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); font-weight: 800; letter-spacing: -0.03em; max-width: 19ch; }
.lede { font-size: 1.1875rem; color: var(--soft); max-width: var(--measure); margin: 1.25rem 0 0; }
.find { margin-top: 2.25rem; max-width: 30rem; }
.find label { display: block; font-size: .9375rem; font-weight: 600; margin-bottom: .4rem; }
.find input, .stack input, .stack textarea, .stack select, .notify input[type=email] { width: 100%; font: inherit; color: var(--ink); background: var(--sheet); border: 1px solid #9AA7B4; border-radius: 6px; padding: .7rem .85rem; }
.count { color: var(--soft); font-size: .9375rem; margin: 0 0 .5rem; }
.group { margin-top: 2.5rem; }
.group > h2 { font-size: 1.0625rem; font-weight: 700; letter-spacing: 0; color: var(--soft); padding-bottom: .6rem; border-bottom: 2px solid var(--ink); }
.rows { list-style: none; margin: 0; padding: 0; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 30rem); gap: .75rem 2.5rem; align-items: center; padding: 1.35rem 0; border-bottom: 1px solid var(--comb); }
.row-link { text-decoration: none; display: block; }
.row-link h3 { font-size: 1.25rem; }
.row-link:hover h3 { text-decoration: underline; text-decoration-color: var(--honey); text-decoration-thickness: 3px; text-underline-offset: 4px; }
.row-link p { margin: .4rem 0 0; color: var(--soft); font-size: 1rem; max-width: 36rem; }
.empty { padding: 2rem 0; }
.contribute { margin-top: 4rem; padding-top: 2.5rem; padding-bottom: 2.5rem; background: var(--ink); color: #fff; border-radius: 10px; }
.contribute h2 { font-size: 1.6rem; }
.contribute p { color: #C3CEDA; margin: .6rem 0 1.4rem; max-width: var(--measure); }
.note { background: var(--sheet); border-left: 4px solid var(--honey); padding: .7rem .9rem; margin-top: 1rem; max-width: var(--measure); }
.note.bad { border-left-color: #A3261B; }

/* the flow chain */
.flow { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: .45rem 0; margin: 0; padding: 0; font-size: .8125rem; font-weight: 600; }
.flow li { display: flex; align-items: center; }
.flow li + li::before { content: ''; width: 1.1rem; height: 2px; background: var(--honey); flex: none; }
.flow span { position: relative; background: var(--sheet); border: 1px solid var(--comb); padding: .32rem .6rem .32rem 1.45rem; border-radius: 5px; white-space: nowrap; }
.flow span::before { content: ''; position: absolute; left: .5rem; top: 50%; width: .62rem; height: .7rem; transform: translateY(-50%); background: var(--honey); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.flow-big { font-size: .9375rem; margin-top: 1.75rem; }
.flow-big li + li::before { width: 1.9rem; }
.flow-big span { padding: .5rem .85rem .5rem 1.8rem; }
.flow-big span::before { left: .65rem; width: .75rem; height: .85rem; }

/* pattern page */
.pattern { padding-top: 2.5rem; }
.crumb { font-size: .9375rem; color: var(--soft); margin-bottom: 1rem; }
.pattern h1 { font-size: clamp(1.9rem, 4.2vw, 2.9rem); font-weight: 800; letter-spacing: -0.028em; max-width: 24ch; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 23rem); gap: 3rem; margin-top: 3rem; align-items: start; }
.steps h2, .take h2, .config h2, .by h2 { font-size: 1.3rem; margin: 2.25rem 0 1rem; }
.steps > h2:first-child, .take > h2:first-child { margin-top: 0; }
.steps ol { list-style: none; counter-reset: step; margin: 0; padding: 0; max-width: var(--measure); }
.steps ol li { counter-increment: step; position: relative; padding: 0 0 1.5rem 3rem; }
.steps ol li::before { content: counter(step); position: absolute; left: 0; top: -.1rem; width: 2rem; height: 2.2rem; display: grid; place-items: center; font-weight: 800; font-size: .9375rem; background: var(--honey); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.steps ol li:not(:last-child)::after { content: ''; position: absolute; left: calc(1rem - 1px); top: 2.3rem; bottom: .2rem; width: 2px; background: var(--comb); }
.steps h3 { font-size: 1.125rem; margin-bottom: .35rem; }
.steps ol p { margin: 0; color: #2B3947; }
.steps > p { max-width: var(--measure); }
.vars { margin: 0; max-width: var(--measure); }
.vars div { padding: .7rem 0; border-top: 1px solid var(--comb); }
.vars dt code { font-weight: 700; }
.vars dd { margin: .2rem 0 0; color: #2B3947; }
.eg { color: var(--soft); display: block; font-size: .9375rem; }
.take { background: var(--sheet); border: 1px solid var(--comb); border-top: 4px solid var(--honey); border-radius: 8px; padding: 1.5rem; position: sticky; top: 1rem; }
.path { list-style: none; counter-reset: path; margin: 0; padding: 0; }
.path > li { counter-increment: path; position: relative; padding-left: 2.6rem; }
.path > li::before { content: counter(path); position: absolute; left: 0; top: -.15rem; width: 1.8rem; height: 2rem; display: grid; place-items: center; font-weight: 800; font-size: .875rem; color: #fff; background: var(--ink); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.path > li:last-child::before { background: var(--honey); color: var(--ink); }
.take-item + .take-item { margin-top: 1.75rem; padding-top: 1.5rem; border-top: 1px solid var(--comb); }
.take-item + .take-item::before { top: 1.35rem; }
.take .btn { margin-bottom: .25rem; }
.how { list-style: none; counter-reset: how; margin: 2rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; max-width: 60rem; }
.how li { counter-increment: how; position: relative; padding-left: 2.6rem; font-size: 1rem; color: #2B3947; }
.how li::before { content: counter(how); position: absolute; left: 0; top: -.1rem; width: 1.8rem; height: 2rem; display: grid; place-items: center; font-weight: 800; font-size: .875rem; background: var(--honey); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.how strong { display: block; color: var(--ink); }
.take h3 { font-size: 1.0625rem; margin-bottom: .4rem; }
.take p { font-size: .9688rem; color: #2B3947; }
.copy-src { width: 100%; font-family: var(--mono); font-size: .78rem; line-height: 1.5; color: var(--ink); background: var(--paper); border: 1px solid var(--comb); border-radius: 6px; padding: .6rem .7rem; resize: vertical; margin-bottom: .75rem; }
.notify label { display: block; font-size: .9375rem; font-weight: 600; margin-bottom: .35rem; }
.inline { display: flex; gap: .5rem; flex-wrap: wrap; }
.inline input { flex: 1 1 12rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.quiet { font-size: .9375rem; color: var(--soft); margin: 1rem 0 0; }
.config { margin-top: 3.5rem; background: var(--slab); color: var(--slab-text); border-radius: 10px; padding: 1.5rem; }
.config-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.config h2 { margin: 0; color: #fff; }
.config pre { margin: 0; max-height: 36rem; overflow: auto; font-size: .8125rem; line-height: 1.6; tab-size: 2; white-space: pre; }
.config .quiet { color: #8FA1B3; }
.by { margin-top: 2.5rem; color: var(--soft); }
.badge-kit { margin-top: 1.5rem; background: var(--sheet); border: 1px solid var(--comb); border-radius: 8px; padding: 1.25rem; max-width: var(--measure); color: var(--ink); }
.badge-kit h2 { margin-top: 0; }
.badge-kit img { display: block; margin-bottom: .75rem; }

/* forms and prose pages */
.form-page, .prose { padding-top: 3rem; max-width: 44rem; }
.form-page.wide { max-width: 70rem; }
.form-page h1, .prose h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 800; letter-spacing: -0.025em; }
.form-page h2, .prose h2 { font-size: 1.25rem; margin: 2.25rem 0 .6rem; }
.prose p { max-width: var(--measure); }
.stack { display: grid; gap: .4rem; margin-top: 1.5rem; }
.stack label { font-weight: 600; font-size: .9688rem; margin-top: .9rem; }
.stack textarea.code { font-size: .8125rem; line-height: 1.5; white-space: pre; }
.stack .btn { justify-self: start; margin-top: 1.25rem; }
.mine { list-style: none; padding: 0; }
.mine li { padding: .6rem 0; border-bottom: 1px solid var(--comb); display: flex; justify-content: space-between; gap: 1rem; }
.status { color: var(--soft); font-size: .9375rem; white-space: nowrap; }
.review { background: var(--sheet); border: 1px solid var(--comb); border-radius: 8px; padding: 1.25rem; margin-top: 1.5rem; }
.review h2 { margin-top: 0; }
.review pre { background: var(--slab); color: var(--slab-text); padding: 1rem; border-radius: 6px; overflow: auto; max-height: 24rem; font-size: .8125rem; }

@media (max-width: 60rem) {
  .how { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .cols { grid-template-columns: minmax(0, 1fr); gap: 2.25rem; }
  .take { position: static; }
  .row { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 30rem) {
  body { font-size: 1rem; }
  .hero { padding-top: 2.75rem; }
  .top nav { gap: 1rem; }
  .config { padding: 1rem; border-radius: 0; margin-left: -1.25rem; margin-right: -1.25rem; }
  .contribute { border-radius: 0; margin-left: 0; margin-right: 0; }
  .flow-big li + li::before { width: .9rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .btn, .top nav a { transition: background-color .12s, border-color .12s, color .12s; }
}
