/* Shared styles for BriefSERP static content pages (guide, template...).
   Same palette and fonts as the app: Fraunces / Inter / IBM Plex Mono,
   ink #1B2420, sage paper #EDF1EE, amber #E8A33D, teal #2F6F62. */

:root {
  --ink: #1B2420;
  --ink-2: #4B5A52;
  --muted: #6B7A72;
  --faint: #8A9992;
  --line: #D7DED8;
  --line-2: #EBEFEC;
  --paper: #EDF1EE;
  --paper-2: #F5F7F5;
  --amber: #E8A33D;
  --amber-ink: #8A5A2A;
  --amber-bg: #FBF3E7;
  --teal: #2F6F62;
  --teal-bg: #DCEAE4;
  --card: 0 1px 2px rgba(27,36,32,0.08), 0 12px 26px -12px rgba(27,36,32,0.30);
  --raised: 0 3px 6px rgba(27,36,32,0.10), 0 24px 44px -16px rgba(27,36,32,0.40);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; background: #E6ECE7; }
body { overflow-x: hidden; }

body {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  color: var(--ink);
  background-color: #E6ECE7;
  background-image: radial-gradient(ellipse 1200px 600px at 50% -10%, #F3F6F3 0%, #EDF1EE 55%, #E6ECE7 100%);
  background-repeat: no-repeat;
  line-height: 1.65;
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--teal); text-underline-offset: 3px; }
a:hover { color: var(--ink); }

.serif { font-family: Fraunces, Georgia, serif; }
.mono { font-family: "IBM Plex Mono", ui-monospace, monospace; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  background: rgba(237, 241, 238, 0.85);
  border-bottom: 1px solid var(--line);
}
.site-header .inner {
  padding: 16px 8%;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 3px rgba(232,163,61,0.18); }
.logo span { font-family: Fraunces, serif; font-weight: 600; color: var(--ink); font-size: 25px; letter-spacing: -0.01em; }
.nav { display: flex; align-items: center; gap: 28px; font-family: "IBM Plex Mono", monospace; font-size: 16px; }
.nav a { color: var(--ink-2); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav .btn { color: var(--paper); white-space: nowrap; }
@media (max-width: 520px) { .nav .btn { padding: 9px 14px; font-size: 14px; } .logo span { font-size: 21px; } .site-header .inner { padding: 12px 6%; } .wrap { padding: 28px 6% 0; } .site-footer { margin: 60px 6% 0; } .brief, .cta { padding: 20px 18px; } }
@media (max-width: 760px) { .nav { gap: 16px; } }

/* Buttons */
.btn {
  display: inline-block;
  background: var(--ink); color: var(--paper);
  padding: 12px 22px; border-radius: 8px;
  font-family: Inter, sans-serif; font-weight: 500; font-size: 16px;
  text-decoration: none;
  box-shadow: 0 6px 16px -8px rgba(27,36,32,0.6);
  transition: transform .15s ease;
  border: 0; cursor: pointer;
}
.btn:hover { transform: translateY(-1px); color: var(--paper); }
.btn-amber { background: var(--amber); color: var(--ink); box-shadow: 0 4px 12px -4px rgba(232,163,61,0.5); }
.btn-amber:hover { color: var(--ink); }
.btn-ghost { background: white; color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.btn-ghost:hover { color: var(--ink); }

/* Layout */
.wrap { padding: 40px 8% 0; }
.article-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 56px; align-items: start; }
@media (max-width: 1000px) { .article-grid { grid-template-columns: minmax(0, 1fr); } .toc { display: none; } }
.prose { max-width: 760px; }

.eyebrow {
  display: inline-block;
  font-family: "IBM Plex Mono", monospace; font-size: 11px; text-transform: uppercase; letter-spacing: .14em;
  color: var(--muted); background: var(--paper-2); border: 1px solid var(--line); border-radius: 4px;
  padding: 4px 8px; margin-bottom: 14px;
}

h1 {
  font-family: Fraunces, serif; font-weight: 600; letter-spacing: -0.02em;
  font-size: clamp(42px, 6vw, 72px); line-height: 1.04; margin: 0 0 18px;
}
h2 {
  font-family: Fraunces, serif; font-weight: 600; letter-spacing: -0.01em;
  font-size: clamp(28px, 3.4vw, 38px); line-height: 1.15;
  margin: 64px 0 16px; padding-top: 26px; border-top: 1px solid var(--line);
  scroll-margin-top: 90px;
}
h3 { font-size: 21px; font-weight: 600; margin: 34px 0 8px; line-height: 1.3; scroll-margin-top: 90px; }
p { margin: 0 0 18px; color: var(--ink-2); }
li { color: var(--ink-2); margin-bottom: 8px; }
strong { color: var(--ink); font-weight: 600; }
.lede { font-size: 21px; line-height: 1.6; color: var(--ink-2); max-width: 760px; }

.byline { font-family: "IBM Plex Mono", monospace; font-size: 13px; color: var(--muted); margin-bottom: 28px; }

/* Answer box (snippet-friendly definition) */
.answer {
  background: white; border: 1px solid var(--line); border-left: 3px solid var(--amber);
  border-radius: 10px; padding: 18px 22px; box-shadow: var(--card); margin: 8px 0 24px;
}
.answer p { margin: 0; color: var(--ink); }

/* Cards */
.card { background: white; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--card); padding: 20px 22px; }
.card + .card { margin-top: 14px; }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps > li { counter-increment: step; position: relative; padding-left: 52px; margin-bottom: 14px; }
.steps > li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; left: 0; top: 2px;
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: "IBM Plex Mono", monospace; font-size: 12px; color: var(--amber-ink); background: var(--amber-bg);
}

/* Checklist */
ul.check { list-style: none; padding: 0; }
ul.check li { position: relative; padding-left: 30px; }
ul.check li::before {
  content: ""; position: absolute; left: 0; top: 7px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--teal-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232F6F62' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 10px no-repeat;
}

/* Tables */
.table-wrap { overflow-x: auto; background: white; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--card); margin: 10px 0 24px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 520px; }
th { text-align: left; font-family: "IBM Plex Mono", monospace; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); background: #F2F5F2; padding: 10px 14px; border-bottom: 1px solid var(--line); }
td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); color: var(--ink); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td .tag { font-family: "IBM Plex Mono", monospace; font-size: 12px; color: var(--teal); border: 1px solid var(--teal-bg); border-radius: 4px; padding: 1px 6px; white-space: nowrap; }

/* Brief document (example + template) */
.brief {
  position: relative; background: white; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--raised); padding: 26px 28px; margin: 18px 0 28px;
}
.brief-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.brief-title { font-family: Fraunces, serif; font-size: 22px; font-weight: 600; }
.stamp {
  display: inline-block; transform: rotate(-3deg);
  border: 2px solid var(--teal); border-radius: 3px; color: var(--teal); background: rgba(47,111,98,0.04);
  font-family: "IBM Plex Mono", monospace; font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  padding: 4px 10px;
}
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin-bottom: 18px; }
.metric { background: var(--paper-2); border: 1px solid var(--line-2); border-radius: 6px; padding: 8px 10px; }
.metric .k { font-family: "IBM Plex Mono", monospace; font-size: 10px; text-transform: uppercase; letter-spacing: .14em; color: var(--faint); }
.metric .v { font-family: Fraunces, serif; font-size: 18px; color: var(--ink); }
.field { padding: 14px 0; border-top: 1px solid var(--line-2); }
.field:first-of-type { border-top: 0; }
.field .label { font-family: "IBM Plex Mono", monospace; font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); margin-bottom: 6px; }
.field p, .field li { font-size: 16px; margin-bottom: 4px; color: var(--ink); }
.field ul, .field ol { margin: 0; padding-left: 20px; }
.field .hint { color: var(--faint); font-size: 14px; }
.outline-h2 { font-weight: 600; }
.outline-h3 { padding-left: 18px; color: var(--ink-2) !important; }
.gap { border-left: 2px solid var(--amber); padding-left: 10px; }
.source-note { font-family: "IBM Plex Mono", monospace; font-size: 12px; color: var(--faint); margin-top: 8px; }

/* Template copy block */
pre.template {
  white-space: pre-wrap; word-wrap: break-word; margin: 0;
  font-family: "IBM Plex Mono", monospace; font-size: 14px; line-height: 1.7; color: var(--ink);
  background: var(--paper-2); border: 1px solid var(--line-2); border-radius: 8px; padding: 18px 20px;
  max-height: 560px; overflow: auto;
}
.tabs { display: inline-flex; gap: 4px; background: var(--paper-2); border-radius: 8px; padding: 4px; margin-bottom: 12px; }
.tabs button { font: 500 14px Inter, sans-serif; color: var(--ink-2); background: transparent; border: 0; border-radius: 6px; padding: 7px 14px; cursor: pointer; }
.tabs button[aria-selected="true"] { background: white; color: var(--ink); box-shadow: 0 1px 2px rgba(27,36,32,0.12); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }

/* Callout / CTA */
.cta {
  background: white; border: 1px solid var(--amber); border-radius: 12px; box-shadow: var(--raised);
  padding: 26px 28px; margin: 40px 0;
}
.cta .k { font-family: "IBM Plex Mono", monospace; font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: var(--amber-ink); margin-bottom: 8px; }
.cta h3 { font-family: Fraunces, serif; font-size: 26px; margin: 0 0 8px; }
.note { background: var(--amber-bg); border-radius: 8px; padding: 14px 18px; font-size: 16px; color: var(--ink); margin: 14px 0 22px; }

/* TOC */
.toc { position: sticky; top: 96px; }
.toc .card { padding: 16px 18px; }
.toc .k { font-family: "IBM Plex Mono", monospace; font-size: 10px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); margin-bottom: 8px; }
.toc ol { margin: 0; padding-left: 18px; font-size: 14px; }
.toc li { margin-bottom: 6px; }
.toc a { color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--ink); text-decoration: underline; }
.toc .btn { color: var(--paper); }
.toc .btn.btn-ghost { color: var(--ink); }
.toc .btn { width: 100%; text-align: center; margin-top: 12px; font-size: 14px; padding: 10px 14px; }

/* FAQ */
details.faq { background: white; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--card); margin-bottom: 10px; }
details.faq[open] { border-color: var(--amber); }
details.faq summary { cursor: pointer; list-style: none; padding: 14px 18px; font-size: 18px; font-weight: 500; color: var(--ink); }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; float: right; color: var(--muted); font-family: "IBM Plex Mono", monospace; }
details.faq[open] summary::after { content: "\2212"; color: var(--amber); }
details.faq p { padding: 0 18px 16px; margin: 0; font-size: 16px; }

/* Footer */
.site-footer { margin: 80px 8% 0; padding: 30px 0 40px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; }
.site-footer .brand { display: flex; align-items: center; gap: 8px; font-family: Fraunces, serif; font-weight: 600; }
.site-footer .brand .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); }
.site-footer p { font-size: 13px; color: var(--faint); margin: 4px 0 0; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; font-family: "IBM Plex Mono", monospace; font-size: 13px; }
.site-footer nav a { color: var(--muted); text-decoration: none; }
.site-footer nav a:hover { text-decoration: underline; }

.field ul:has(> li.gap) { list-style: none; padding-left: 0; }
.field li.gap { margin-bottom: 8px; }
.steps h3 { color: var(--ink); margin-top: 0; }

/* Nav dropdowns */
.nav .dd { position: relative; }
.nav .dd summary { list-style: none; cursor: pointer; color: var(--ink-2); }
.nav .dd summary::-webkit-details-marker { display: none; }
.nav .dd summary::after { content: " \25BE"; font-size: 12px; }
.nav .dd summary:hover, .nav .dd summary[aria-current="page"] { color: var(--ink); }
.nav .dd-panel {
  position: absolute; right: 0; top: calc(100% + 12px); z-index: 30;
  min-width: 240px; background: white; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--raised); padding: 8px; display: flex; flex-direction: column;
}
.nav .dd-panel a { padding: 9px 12px; border-radius: 6px; font-size: 15px; color: var(--ink-2); }
.nav .dd-panel a:hover, .nav .dd-panel a[aria-current="page"] { background: var(--paper-2); color: var(--ink); }
.nav .mob { display: none; }
@media (max-width: 760px) { .nav .desk { display: none; } .nav .mob { display: block; } }
.nav .dd-panel { font-family: Inter, sans-serif; }
.nav .dd-panel a { white-space: nowrap; }
