/* Tag Extract — same cream/charcoal system as the landing page.
   External rather than inline so the page's CSP needs no 'unsafe-inline'. */

:root {
  --cream:       #f7f4ed;
  --cream-soft:  #fcfbf8;
  --light-cream: #eceae4;
  --charcoal:    #1c1c1c;
  --charcoal-82: rgba(28,28,28,0.82);
  --muted:       #5f5f5d;
  --charcoal-40: rgba(28,28,28,0.4);
  --charcoal-04: rgba(28,28,28,0.04);
  --ok:          #2f6b4f;
  --err:         #8a3324;
  --inset-button: rgba(255,255,255,0.2) 0 0.5px 0 0 inset,
                  rgba(0,0,0,0.2) 0 0 0 0.5px inset,
                  rgba(0,0,0,0.05) 0 1px 2px 0;
  --max: 1200px;
  --font: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
          "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--charcoal);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-underline-offset: 2px; }
code { font-family: var(--mono); font-size: 0.92em; }

.wrap  { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.inner { max-width: 820px; margin: 0 auto; }
section { padding: 56px 0; }

/* Nav */
nav { border-bottom: 1px solid var(--light-cream); }
.nav-row { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 28px; height: 28px; display: block; }
.brand-name { font-size: 18px; font-weight: 600; letter-spacing: -0.3px; }
.nav-links { display: flex; align-items: center; gap: 20px; }
.nav-links a { font-size: 14px; text-decoration: none; }
.nav-links a:hover { text-decoration: underline; }

/* Buttons and pills */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font: inherit; font-size: 16px; padding: 8px 16px; border-radius: 6px;
  text-decoration: none; cursor: pointer;
  transition: opacity 120ms ease, transform 120ms ease;
}
.btn:active { opacity: 0.8; }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn.primary { background: var(--charcoal); color: var(--cream-soft); border: none; box-shadow: var(--inset-button); }
.btn.primary:hover:not(:disabled) { transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--charcoal); border: 1px solid var(--charcoal-40); }
.btn.ghost:hover:not(:disabled) { background: var(--charcoal-04); }
.btn.small { font-size: 14px; padding: 6px 12px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--cream); border: 1px solid var(--light-cream);
  border-radius: 9999px; padding: 6px 12px; font-size: 13px; color: var(--charcoal-82);
}
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--charcoal); opacity: 0.7; }

/* Header */
.page-head { padding: 56px 0 8px; text-align: center; }
.page-head .eyebrow { margin-bottom: 20px; }
.page-head h1 { font-size: clamp(36px, 5vw, 52px); font-weight: 600; letter-spacing: -1.3px; margin: 0 0 16px; }
.lede { color: var(--muted); font-size: 17px; line-height: 1.55; margin: 0 auto; max-width: 640px; }

h2 { font-size: clamp(24px, 3vw, 30px); font-weight: 600; letter-spacing: -0.7px; margin: 0 0 14px; }

/* Assurance banner */
.assurance {
  border: 1px solid var(--light-cream); border-radius: 14px;
  background: var(--cream-soft); padding: 18px 20px; margin-bottom: 28px;
}
.assurance p { margin: 0 0 8px; font-size: 15px; color: var(--charcoal-82); }
.assurance p:last-child { margin-bottom: 0; }
.assurance-links { font-size: 14px; color: var(--muted); }

/* Form */
.field-label { display: block; font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.field-hint { margin: 0 0 10px; font-size: 14px; color: var(--muted); }
textarea {
  width: 100%; font-family: var(--mono); font-size: 13px; line-height: 1.5;
  padding: 14px; border-radius: 12px; border: 1px solid var(--charcoal-40);
  background: var(--cream-soft); color: var(--charcoal); resize: vertical;
}
textarea:focus-visible { outline: 2px solid var(--charcoal-40); outline-offset: 1px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }

/* Notices */
.notice { border-radius: 12px; padding: 14px 16px; margin-top: 24px; font-size: 15px; }
.notice.error { border: 1px solid var(--err); color: var(--err); background: rgba(138,51,36,0.05); }
.notice.info  { border: 1px solid var(--light-cream); color: var(--charcoal-82); background: var(--cream-soft); }
.notice strong { display: block; margin-bottom: 4px; }

/* Results */
#results:empty { display: none; }
.summary { margin-top: 28px; font-size: 15px; color: var(--ok); font-weight: 600; }

.stages { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.stages li {
  display: flex; gap: 12px; align-items: baseline;
  border: 1px solid var(--light-cream); border-radius: 10px;
  background: var(--cream-soft); padding: 10px 14px; font-size: 14px;
}
.stages .n { font-variant-numeric: tabular-nums; color: var(--muted); min-width: 1.4em; }
.stages .what { flex: 1; }
.stages .val { font-family: var(--mono); font-size: 13px; color: var(--charcoal-82); }

.entry {
  border: 1px solid var(--light-cream); border-radius: 14px;
  background: var(--cream-soft); padding: 18px 20px; margin-top: 16px;
}
.entry h3 { margin: 0 0 12px; font-size: 16px; font-weight: 600; }
.entry.withdrawn h3::after {
  content: "withdrawn";
  margin-left: 8px; padding: 2px 8px; border-radius: 9999px;
  background: var(--charcoal-04); border: 1px solid var(--light-cream);
  font-size: 12px; font-weight: 400; color: var(--muted);
}
.entry dl { margin: 0; display: grid; grid-template-columns: 180px 1fr; gap: 8px 16px; }
@media (max-width: 600px) { .entry dl { grid-template-columns: 1fr; gap: 2px; } }
.entry dt { font-size: 14px; color: var(--muted); }
.entry dd { margin: 0; font-size: 15px; overflow-wrap: anywhere; }
.entry dd .note { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); }
.entry dd.unknown { font-family: var(--mono); font-size: 13px; }

details.raw { margin-top: 18px; border-top: 1px solid var(--light-cream); padding-top: 14px; }
details.raw summary { cursor: pointer; font-size: 15px; }
details.raw pre {
  font-family: var(--mono); font-size: 12.5px; line-height: 1.5;
  background: var(--cream-soft); border: 1px solid var(--light-cream);
  border-radius: 10px; padding: 14px; overflow-x: auto;
}
.foreign { margin-top: 14px; font-size: 14px; color: var(--muted); }
.foreign code { background: var(--charcoal-04); border-radius: 4px; padding: 1px 5px; }

/* Static sections */
.never-grid { list-style: none; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (max-width: 600px) { .never-grid { grid-template-columns: 1fr; } }
.never-grid li {
  border: 1px solid var(--light-cream); border-radius: 10px; background: var(--cream-soft);
  padding: 10px 14px; font-size: 14.5px; color: var(--charcoal-82);
}
.never .lede, .never .footnote { margin-left: 0; }
.footnote { margin-top: 18px; font-size: 14px; color: var(--muted); line-height: 1.6; }
.how p, .where p { color: var(--charcoal-82); font-size: 15.5px; line-height: 1.6; margin: 0 0 12px; }
.nolink { font-weight: 600; }

/* Footer */
footer { border-top: 1px solid var(--light-cream); padding: 40px 0 56px; color: var(--muted); font-size: 14px; }
.foot-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.foot-links { display: flex; gap: 20px; flex-wrap: wrap; }
.foot-links a { color: var(--muted); text-decoration: none; }
.foot-links a:hover { text-decoration: underline; }
