/* Shared styles for StackHangar's secondary pages (security, studio). The
   home page keeps its own inline copy of the same tokens. */
:root {
  --bg: #f7f8fa; --surface: #ffffff; --surface-2: #f0f2f5; --border: #e2e5ea;
  --text: #15181e; --muted: #5d6573; --accent: #2f5bea; --accent-hover: #2349c9;
  --accent-ink: #ffffff; --accent-soft: #e8eeff; --ok: #1f7a43; --warn: #a05a00; --warn-soft: #fff3df;
  --radius: 14px;
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d0f13; --surface: #161920; --surface-2: #1d2129; --border: #2a2f3a;
    --text: #e8eaee; --muted: #9aa3b2; --accent: #6d8dff; --accent-hover: #8aa3ff;
    --accent-ink: #0d0f13; --accent-soft: #1d2747; --ok: #4cc77d; --warn: #f0b04f; --warn-soft: #362812;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d0f13; --surface: #161920; --surface-2: #1d2129; --border: #2a2f3a;
  --text: #e8eaee; --muted: #9aa3b2; --accent: #6d8dff; --accent-hover: #8aa3ff;
  --accent-ink: #0d0f13; --accent-soft: #1d2747; --ok: #4cc77d; --warn: #f0b04f; --warn-soft: #362812;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.65 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: var(--mono); font-size: 0.88em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 10; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

.btn { display: inline-flex; align-items: center; justify-content: center; font: 600 15px/1 var(--font); padding: 13px 20px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); white-space: nowrap; }
.btn:hover { text-decoration: none; border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.small { padding: 9px 14px; font-size: 14px; }

header.site { border-bottom: 1px solid var(--border); }
.bar { display: flex; align-items: center; gap: 24px; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 750; font-size: 17px; color: var(--text); }
.logo:hover { text-decoration: none; }
.logo-mark { width: 28px; height: 28px; flex: none; }
.nav { display: flex; gap: 22px; margin-left: 16px; }
.nav a { color: var(--muted); font-size: 15px; font-weight: 500; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); text-decoration: none; }
.bar-cta { margin-left: auto; }
@media (max-width: 880px) { .nav { display: none; } }

.doc { max-width: 720px; margin: 0 auto; padding: 64px 0 96px; }
.kicker { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin: 0 0 12px; }
.doc h1 { font-size: clamp(32px, 5vw, 46px); font-weight: 780; letter-spacing: -0.02em; line-height: 1.12; margin: 0 0 16px; text-wrap: balance; }
.lede { font-size: 19px; color: var(--muted); margin: 0 0 40px; }
.doc h2 { font-size: 24px; letter-spacing: -0.02em; line-height: 1.2; margin: 48px 0 12px; }
.doc h3 { font-size: 18px; margin: 28px 0 6px; }
.doc p, .doc li { color: var(--muted); }
.doc p { margin: 0 0 14px; }
.doc ul { padding-left: 20px; margin: 0 0 14px; }
.doc li { margin-bottom: 8px; }
.doc strong { color: var(--text); }
.callout { border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); padding: 20px 22px; margin: 24px 0; }
.callout.warn { background: var(--warn-soft); border-color: transparent; }
.callout p:last-child { margin-bottom: 0; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }

footer { border-top: 1px solid var(--border); padding: 32px 0 48px; font-size: 14px; color: var(--muted); }
.foot { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 32px; align-items: start; }
.foot-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.foot-groups { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 32px; }
.foot-h { margin: 0 0 10px; font-weight: 650; color: var(--text); }
.foot-groups ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--text); }
@media (max-width: 760px) { .foot { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 900px) and (min-width: 481px) { .foot-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .foot-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .wrap { padding: 0 16px; } .doc { padding-top: 40px; } }

/* Guides and provider pages */
.crumbs { font-size: 14px; color: var(--muted); margin: 0 0 18px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--text); }
.meta { font-size: 14px; color: var(--muted); margin: -24px 0 36px; }
.doc ol { padding-left: 22px; margin: 0 0 14px; }
.doc ol.howto { list-style: none; padding: 0; counter-reset: howto; display: flex; flex-direction: column; gap: 10px; margin: 20px 0 28px; }
.doc ol.howto li { counter-increment: howto; position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px 14px 56px; margin: 0; }
.doc ol.howto li::before { content: counter(howto); position: absolute; left: 16px; top: 14px; width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font: 700 13px/26px var(--font); text-align: center; }
.table-wrap { overflow-x: auto; margin: 0 0 20px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.doc table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
.doc th, .doc td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.doc th { font-weight: 650; color: var(--text); background: var(--surface-2); white-space: nowrap; }
.doc td { color: var(--muted); }
.doc tr:last-child td { border-bottom: 0; }
.facts { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; padding: 0; list-style: none; }
.doc .facts li { margin: 0; font-size: 13px; font-weight: 600; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); padding: 2px 10px; border-radius: 99px; }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 16px 0 8px; }
@media (max-width: 560px) { .cards { grid-template-columns: minmax(0, 1fr); } }
.card { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; color: var(--text); }
.card:hover { text-decoration: none; border-color: var(--muted); }
.card strong { display: block; }
.card span { font-size: 14px; color: var(--muted); }
.small { font-size: 14px; }
.doc time { white-space: nowrap; }

/* Command and config blocks */
.doc pre { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin: 0 0 16px; overflow-x: auto; font-size: 13.5px; line-height: 1.55; }
.doc pre code { font-size: inherit; color: var(--text); }

/* Request-and-approve flow diagram */
.flow { margin: 24px 0 32px; }
.flow ol { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.doc .flow li { position: relative; margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; font-size: 14.5px; }
.doc .flow li.you { border-color: var(--accent); background: var(--accent-soft); }
.flow li:not(:last-child)::after { content: "→"; position: absolute; right: -18px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 700; }
.flow .who { display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text); margin-bottom: 4px; }
.flow figcaption { font-size: 14px; color: var(--muted); margin-top: 12px; }
@media (max-width: 760px) {
  .flow ol { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .flow li:not(:last-child)::after { content: "↓"; right: auto; left: 50%; top: auto; bottom: -22px; transform: translateX(-50%); }
}

/* Studio list form (the only form on the site; a plain POST, no script). */
.join-form { margin: 20px 0 8px; max-width: 560px; }
.join-form label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.join-row { display: flex; flex-wrap: wrap; gap: 10px; }
.join-row input { flex: 1 1 240px; min-width: 0; font: 400 15px/1.2 var(--font); padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.join-row input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.join-row button { cursor: pointer; }
.join-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.join-note { font-size: 13px; color: var(--muted); margin-top: 10px; }
