/* Mastersdomains.com — theme_04 "Warm Paper Field Dossier". Zero external fonts/CDNs. */
:root {
  --bg: #f5efe6;
  --surface: #fffdf9;
  --ink: #292524;
  --accent: #b45309;
  --accent-soft: rgba(180, 83, 9, 0.10);
  --muted: #57534e;
  --line: #e0d5c3;
  --good: #3f6212;
  --warn: #a16207;
  --bad: #b91c1c;
  --radius: 10px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--sans);
  background:
    radial-gradient(ellipse 70% 30% at 50% -8%, rgba(180, 83, 9, 0.07) 0%, transparent 70%),
    var(--bg);
  color: var(--ink);
  line-height: 1.7;
}
a { color: var(--accent); }
code, pre { font-family: var(--mono); }

/* Dossier masthead — centered sheet header */
.masthead {
  text-align: center;
  padding: 56px 24px 40px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 253, 249, 0.9) 0%, rgba(245, 239, 230, 0) 100%);
}
.kicker {
  font-size: 0.7rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent); font-weight: 700; margin: 0 0 14px;
}
.masthead h1 {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 7vw, 4rem);
  margin: 0; letter-spacing: 0.01em; font-weight: 700; line-height: 1.08;
}
.masthead .accent { color: var(--accent); font-style: italic; }
.tagline {
  color: var(--muted); max-width: 720px; margin: 16px auto 0;
  font-size: 1.02rem; font-family: var(--serif); font-size: 1.08rem;
}
.rule-orn { color: var(--accent); letter-spacing: 0.4em; font-size: 0.8rem; margin-top: 18px; }

/* Hero quick probe — field worksheet */
.quick {
  max-width: 920px; margin: 30px auto 0;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px 26px;
  box-shadow: 0 10px 34px rgba(41, 37, 36, 0.08), 0 1px 0 rgba(255,255,255,0.7) inset;
  text-align: left;
}
.quick h2, .card h3 { font-family: var(--serif); }
.quick-grid { display: grid; gap: 20px; grid-template-columns: minmax(280px, 1fr) minmax(280px, 1fr); align-items: start; }
.quick-note { font-size: 0.8rem; margin: 8px 0; color: var(--muted); }
.quick-out {
  background: #faf6ee; border: 1px dashed var(--line); border-radius: 8px;
  padding: 14px 16px; font-size: 0.85rem; min-height: 120px; overflow-x: auto;
  font-family: var(--mono);
}
.probe-row { display: flex; gap: 8px; }
.probe-row select { width: 110px; flex: none; }
.probe-row input { flex: 1; }
.pill-row { display: flex; flex-wrap: wrap; gap: 6px; }
.pill {
  background: var(--accent-soft); color: var(--accent);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 4px 12px; font-size: 0.74rem; font-weight: 600; cursor: pointer;
  font-family: var(--sans);
}
.pill:hover { border-color: var(--accent); }
.pill.active { background: var(--accent); color: #fffdf9; border-color: var(--accent); }

/* Above-the-fold disclosure bar */
.notice { max-width: 980px; margin: 0 auto; padding: 0 24px; }
.notice .bar {
  margin-top: 22px; border: 1px solid var(--line); border-left: 4px solid var(--accent);
  background: var(--surface); border-radius: var(--radius); padding: 12px 18px;
  font-size: 0.85rem; color: var(--muted);
}
.notice .bar strong { color: var(--ink); }
.notice .bar a { color: var(--accent); }

/* 3-card methodology matrix — dossier field notes */
.matrix {
  max-width: 980px; margin: 34px auto 0; padding: 0 24px;
  display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.mcard {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px 24px;
  box-shadow: 0 6px 20px rgba(41, 37, 36, 0.05);
}
.mcard .mnum {
  display: inline-block; font-family: var(--serif); font-style: italic;
  font-size: 0.95rem; font-weight: 700;
  color: var(--accent); letter-spacing: 0.06em; margin-bottom: 8px;
}
.mcard h3 { margin: 0 0 8px; font-size: 1.12rem; font-weight: 700; }
.mcard p { margin: 0; font-size: 0.88rem; color: var(--muted); }

/* Progress meter */
.progress-wrap { max-width: 560px; margin: 26px auto 0; }
.progress-bar {
  height: 8px; background: var(--line); border-radius: 999px; overflow: hidden;
}
.progress-fill {
  height: 100%; width: 0%;
  background: var(--accent);
  border-radius: 999px; transition: width .35s ease;
}
.progress-fill.full { background: var(--good); }
#progress-label { display: block; margin-top: 6px; font-size: 0.78rem; color: var(--muted); }

/* Tabs — field worksheet tabs */
.tabs {
  display: flex; gap: 6px; justify-content: center; flex-wrap: wrap;
  max-width: 980px; margin: 30px auto 0; padding: 0 24px;
}
.tab {
  background: var(--surface); color: var(--muted); border: 1px solid var(--line);
  border-radius: 8px 8px 0 0; border-bottom: 2px solid transparent;
  padding: 10px 18px; font-size: 0.86rem; cursor: pointer;
  font-family: var(--sans); letter-spacing: 0.01em;
  transition: color .15s, border-color .15s, background .15s;
}
.tab:hover { color: var(--ink); border-color: var(--accent); }
.tab.active {
  color: var(--accent); background: var(--surface); border-color: var(--accent);
  border-bottom-color: var(--accent); font-weight: 600;
}
.tab.done::after { content: " ✓"; }
.tab.active.done::after { color: var(--accent); }

main { max-width: 980px; margin: 0 auto 72px; padding: 32px 24px 0; }
.tabpane { display: none; }
.tabpane.active { display: block; }
.domain { margin-top: 48px; }

/* Dossier sheet — centered paper card */
.sheet {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px 28px;
  box-shadow: 0 14px 44px rgba(41, 37, 36, 0.10), 0 1px 0 rgba(255,255,255,0.8) inset;
}
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px;
}
.card h3, .sheet h3 { margin: 0 0 12px; font-size: 1.12rem; font-weight: 700; font-family: var(--serif); }
.card h3::before, .sheet h3::before {
  content: ""; display: inline-block; width: 22px; height: 3px;
  background: var(--accent); margin-right: 10px; vertical-align: middle;
  border-radius: 2px;
}
.card p { margin: 8px 0; }

.bento {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}
.bento .card { margin-bottom: 0; }

.row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; align-items: end; }
.row label { min-width: 130px; }
button {
  background: var(--accent); color: #fffdf9; border: 0; border-radius: 8px;
  padding: 10px 20px; font-size: 0.88rem; font-weight: 600; cursor: pointer;
  font-family: var(--sans);
}
button:hover { filter: brightness(1.08); }
button:disabled { opacity: 0.45; cursor: not-allowed; }
button.ghost { background: transparent; color: var(--accent); border: 1px solid var(--line); font-weight: 500; }
button.ghost:hover { border-color: var(--accent); }
select {
  background: var(--surface); color: var(--ink); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 14px; font-size: 0.86rem; font-family: var(--sans);
}

.grid-form { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
label { display: block; font-size: 0.78rem; color: var(--muted); letter-spacing: 0.02em; }
input, select, textarea {
  width: 100%; margin-top: 5px; background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px;
  font-size: 0.9rem; font-family: var(--sans);
}
textarea { font-family: var(--mono); font-size: 0.76rem; resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible, .tab:focus-visible, .pill:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 1px;
}

.out {
  background: #faf6ee; border: 1px dashed var(--line); border-radius: 8px;
  padding: 16px; font-size: 0.86rem; overflow-x: auto; min-height: 2.4em;
}
.out table { border-collapse: collapse; width: 100%; font-size: 0.8rem; }
.out th, .out td { text-align: right; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.out th:first-child, .out td:first-child { text-align: left; }
.out th { color: var(--muted); font-weight: 600; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; }
.out tr.best td { color: var(--good); font-weight: 600; }
.out tr.fail td { color: var(--bad); }
.out tr.warn td { color: var(--warn); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.stat { background: #faf6ee; border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.stat .k { font-size: 0.68rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.07em; }
.stat .v { font-size: 1.12rem; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; font-family: var(--serif); }
.stat .v.bad { color: var(--bad); }
.stat .v.warn { color: var(--warn); }
.stat .v.good { color: var(--good); }
.stat .v.accent { color: var(--accent); }

.chart { background: #faf6ee; border: 1px dashed var(--line); border-radius: 8px; padding: 12px; overflow-x: auto; }
.chart svg { display: block; min-width: 640px; width: 100%; height: auto; }

.muted { color: var(--muted); }
.warn-text { color: var(--warn); }
.bad-text { color: var(--bad); }
.good-text { color: var(--good); }
.accent-text { color: var(--accent); }

.verdict-badge {
  display: inline-block; font-weight: 700; font-size: 1.05rem;
  padding: 6px 18px; border-radius: 999px; letter-spacing: 0.04em;
}
.verdict-PASS, .verdict-CONFORMANT, .verdict-proceed { background: rgba(63, 98, 18, 0.10); color: var(--good); border: 1px solid var(--good); }
.verdict-REVIEW, .verdict-review { background: rgba(161, 98, 7, 0.10); color: var(--warn); border: 1px solid var(--warn); }
.verdict-FAIL, .verdict-NON-COMPLIANT, .verdict-UNVERIFIED, .verdict-reject { background: rgba(185, 28, 28, 0.08); color: var(--bad); border: 1px solid var(--bad); }
.verdict-PASS, .verdict-FAIL, .verdict-REVIEW, .verdict-CONFORMANT, .verdict-NON-COMPLIANT, .verdict-UNVERIFIED, .verdict-proceed, .verdict-review, .verdict-reject { font-size: 0.9rem; padding: 4px 14px; }

/* Collapsible FAQ */
.faq details {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); padding: 0;
}
.faq details + details { margin-top: 10px; }
.faq summary {
  cursor: pointer; padding: 16px 20px; font-weight: 600; font-size: 0.95rem;
  list-style: none; font-family: var(--serif);
}
.faq summary::before { content: "+"; color: var(--accent); font-weight: 700; margin-right: 10px; }
.faq details[open] summary::before { content: "–"; }
.faq details p { padding: 0 20px 18px; margin: 0; color: var(--muted); font-size: 0.9rem; }
.faq details code { font-size: 0.82rem; }

/* Printable summary card */
.print-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: #fffdf9; padding: 18px 22px; font-family: var(--serif);
}
.print-card h4 { margin: 0 0 8px; font-size: 0.95rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.print-card dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; margin: 0; font-size: 0.9rem; }
.print-card dt { color: var(--muted); }
.print-card dd { margin: 0; font-weight: 600; }
@media print {
  body { background: #fff; }
  .tabs, .notice, .matrix, .progress-wrap, .quick, button, .row { display: none !important; }
  .tabpane { display: block !important; }
  .sheet, .card, .print-card { box-shadow: none; border-color: #999; }
}

.foot {
  border-top: 1px solid var(--line);
  padding: 32px 24px 48px; color: var(--muted); font-size: 0.84rem;
  text-align: center;
}
.foot p { margin: 6px 0; }
.foot a { margin: 0 4px; }

@media (max-width: 720px) {
  .masthead { padding: 40px 20px 32px; }
  .hero-inner, .card, .quick, .matrix, .sheet { padding-left: 18px; padding-right: 18px; }
  .quick-grid { grid-template-columns: 1fr; }
  .matrix { grid-template-columns: 1fr; }
  .probe-row { flex-direction: column; }
  .probe-row select { width: 100%; }
  .row label { min-width: 100%; }
  main { padding-top: 24px; }
}
