/* ThoughtRaven — shared stylesheet. No external requests, system fonts only. */

:root {
  --ink: #1F2430;
  --teal: #2B6777;
  --teal-dark: #1F4E5A;
  --cream: #F5F3EE;
  --amber: #E9B44C;
  --white: #FFFFFF;
  --muted: #5A6272;
  --line: #DDD8CC;
  --ok: #2E7D4F;
  --warn: #A05E03;
  --danger: #A03232;
  --radius: 10px;
  --maxw: 68rem;
  font-size: 100%;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--teal); }
a:hover { color: var(--teal-dark); }
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 2px;
}

h1, h2, h3, h4 { line-height: 1.25; color: var(--ink); }
h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin: 0 0 .5rem; }
h2 { font-size: clamp(1.3rem, 3vw, 1.7rem); margin: 2.2rem 0 .6rem; }
h3 { font-size: 1.15rem; margin: 1.6rem 0 .4rem; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 1.1rem; }

/* Header */
.site-header {
  background: var(--ink);
  color: var(--cream);
}
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: .4rem 1.4rem; padding-top: .8rem; padding-bottom: .8rem;
}
.brand {
  font-weight: 700; font-size: 1.15rem; letter-spacing: .02em;
  color: var(--cream); text-decoration: none; display: inline-flex; align-items: center; gap: .5rem;
}
.brand:hover { color: var(--white); }
.brand .mark {
  width: 1.6rem; height: 1.6rem; border-radius: 50%;
  background: var(--teal); color: var(--cream);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .95rem; font-weight: 800;
}
.site-nav { margin-left: auto; display: flex; flex-wrap: wrap; gap: .2rem .9rem; }
.site-nav a {
  color: var(--cream); text-decoration: none; padding: .25rem .1rem;
  border-bottom: 2px solid transparent; font-size: .95rem;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { border-bottom-color: var(--amber); color: var(--white); }

/* Footer */
.site-footer {
  margin-top: 3.5rem; background: var(--ink); color: var(--cream);
  font-size: .9rem;
}
.site-footer .wrap { padding-top: 1.4rem; padding-bottom: 1.6rem; }
.site-footer a { color: var(--amber); }
.site-footer p { margin: .3rem 0; }

/* Hero */
.hero { padding: 2.6rem 0 1.2rem; }
.hero .lede { font-size: 1.12rem; color: var(--muted); max-width: 46rem; }
.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; color: var(--teal); margin-bottom: .4rem;
}

/* Buttons */
.btn {
  display: inline-block; padding: .62rem 1.15rem; border-radius: var(--radius);
  border: 2px solid var(--teal); background: var(--teal); color: var(--white);
  font-weight: 600; text-decoration: none; cursor: pointer; font-size: 1rem;
  font-family: inherit; line-height: 1.4;
}
.btn:hover { background: var(--teal-dark); border-color: var(--teal-dark); color: var(--white); }
.btn.secondary { background: transparent; color: var(--teal); }
.btn.secondary:hover { background: rgba(43, 103, 119, .08); color: var(--teal-dark); }
.btn.amber { background: var(--amber); border-color: var(--amber); color: var(--ink); }
.btn.amber:hover { background: #DCA537; border-color: #DCA537; }
.btn-row { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1.1rem 0; }

/* CTA whose listing URL is not live yet (config.js still has a TODO placeholder) */
a.cta-pending, a.cta-pending:hover { cursor: not-allowed; opacity: .55; text-decoration: none; }
.btn.cta-pending, .btn.cta-pending:hover { background: var(--muted); border-color: var(--muted); color: var(--white); }
.btn.secondary.cta-pending, .btn.secondary.cta-pending:hover { background: transparent; color: var(--muted); border-color: var(--muted); }
.btn.amber.cta-pending, .btn.amber.cta-pending:hover { background: var(--muted); border-color: var(--muted); color: var(--white); }
.cta-pending-note { font-size: .85em; font-weight: 400; }

/* Cards */
.grid { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); margin: 1.2rem 0; }
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .4rem;
}
.card h3 { margin: 0; }
.card p { margin: 0; color: var(--muted); font-size: .95rem; }
.card .spacer { flex: 1; }
.card img { border-radius: 6px; border: 1px solid var(--line); margin-bottom: .4rem; }
.card .price { font-weight: 700; color: var(--ink); }
.tag {
  display: inline-block; align-self: flex-start; font-size: .74rem; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase; padding: .12rem .55rem;
  border-radius: 999px; background: rgba(43,103,119,.12); color: var(--teal);
}
.tag.free { background: rgba(233,180,76,.25); color: #7A5A14; }

/* Panels / notes */
.panel {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.2rem 1.4rem; margin: 1.2rem 0;
}
.note {
  border-left: 4px solid var(--amber); background: rgba(233,180,76,.12);
  padding: .8rem 1rem; border-radius: 0 var(--radius) var(--radius) 0; margin: 1.2rem 0;
  font-size: .95rem;
}
.note.legal { border-left-color: var(--teal); background: rgba(43,103,119,.07); }

/* Forms */
label { font-weight: 600; display: block; margin: .9rem 0 .25rem; }
.hint { font-weight: 400; color: var(--muted); font-size: .88rem; margin: .1rem 0 .3rem; }
input[type="text"], input[type="number"], input[type="date"], input[type="email"], select, textarea {
  width: 100%; padding: .55rem .7rem; font-size: 1rem; font-family: inherit;
  border: 1.5px solid var(--line); border-radius: 8px; background: var(--white); color: var(--ink);
}
textarea { min-height: 14rem; resize: vertical; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); margin: 1rem 0; padding: .8rem 1.1rem 1rem; background: var(--white); }
legend { font-weight: 700; padding: 0 .4rem; }
.field-row { display: flex; flex-wrap: wrap; gap: 1rem; }
.field-row > div { flex: 1 1 12rem; }
.checkline { display: flex; align-items: flex-start; gap: .55rem; margin: .5rem 0; font-weight: 400; }
.checkline input { margin-top: .3rem; width: auto; }

/* Quiz */
.quiz-progress { font-size: .85rem; color: var(--muted); margin-bottom: .4rem; }
.quiz-bar { height: .45rem; border-radius: 999px; background: var(--line); overflow: hidden; margin-bottom: 1.2rem; }
.quiz-bar > div { height: 100%; background: var(--teal); width: 0; transition: width .25s ease; }
.quiz-q h2 { margin-top: 0; }
.quiz-help { color: var(--muted); font-size: .95rem; }
.quiz-options { display: flex; flex-direction: column; gap: .6rem; margin: 1.1rem 0; }
.quiz-options button {
  text-align: left; padding: .8rem 1rem; font-size: 1rem; font-family: inherit;
  border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--cream);
  cursor: pointer; color: var(--ink); line-height: 1.45;
}
.quiz-options button:hover { border-color: var(--teal); background: rgba(43,103,119,.07); }
.quiz-back { background: none; border: none; color: var(--teal); cursor: pointer; font: inherit; padding: 0; text-decoration: underline; }

/* Results */
.duty {
  border: 1px solid var(--line); border-left: 5px solid var(--teal);
  border-radius: var(--radius); background: var(--white); padding: 1rem 1.2rem; margin: .9rem 0;
}
.duty.none { border-left-color: var(--ok); }
.duty.warning { border-left-color: var(--danger); }
.duty h3 { margin: 0 0 .3rem; }
.duty .artref { font-size: .82rem; font-weight: 700; color: var(--teal); letter-spacing: .03em; }
.duty p { margin: .35rem 0; font-size: .95rem; }

/* Result stats / calculator output */
.stat-row { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr)); margin: 1.1rem 0; }
.stat {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: .8rem 1rem;
}
.stat .label { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.stat .value { font-size: 1.45rem; font-weight: 700; color: var(--ink); }
.stat.highlight { border-color: var(--amber); background: rgba(233,180,76,.14); }

/* Tables */
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; background: var(--white); font-size: .95rem; }
th, td { text-align: left; padding: .5rem .7rem; border: 1px solid var(--line); vertical-align: top; }
th { background: rgba(43,103,119,.08); }
tr.total td { font-weight: 700; background: rgba(233,180,76,.14); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* Checks list (ATS checker) */
.check-item { display: flex; gap: .6rem; align-items: flex-start; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.check-item:last-child { border-bottom: none; }
.check-icon { flex: 0 0 auto; width: 1.5rem; height: 1.5rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: .9rem; font-weight: 800; color: var(--white); }
.check-icon.pass { background: var(--ok); }
.check-icon.warn { background: var(--warn); }
.check-icon.fail { background: var(--danger); }
.check-body strong { display: block; }
.check-body span { color: var(--muted); font-size: .92rem; }

/* Calendar */
.cal-month { break-inside: avoid; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1.1rem; }
.cal-month h3 { margin: 0 0 .5rem; }
.cal-month.three { border-color: var(--amber); box-shadow: 0 0 0 2px rgba(233,180,76,.35); }
.cal-month ul { list-style: none; margin: 0; padding: 0; }
.cal-month li { padding: .3rem 0; border-bottom: 1px dashed var(--line); font-variant-numeric: tabular-nums; }
.cal-month li:last-child { border-bottom: none; }
.cal-month .chknum { color: var(--muted); font-size: .85rem; margin-right: .5rem; }
.cal-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); margin: 1.2rem 0; }
.badge-three { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #7A5A14; background: rgba(233,180,76,.3); border-radius: 999px; padding: .1rem .5rem; margin-left: .4rem; }

/* FAQ */
details { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: .7rem 1rem; margin: .6rem 0; }
summary { font-weight: 600; cursor: pointer; }
details p { margin: .6rem 0 .2rem; color: var(--muted); }

/* Utility */
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.center { text-align: center; }
.mt0 { margin-top: 0; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--amber); color: var(--ink);
  padding: .5rem 1rem; z-index: 10; border-radius: 0 0 var(--radius) 0; font-weight: 700;
}
.skip-link:focus { left: 0; }
hr { border: none; border-top: 1px solid var(--line); margin: 2rem 0; }
code { background: rgba(31,36,48,.07); border-radius: 4px; padding: .05rem .35rem; font-size: .92em; }

/* Print (paycheck calendar) */
@media print {
  .site-header, .site-footer, .no-print, .btn, .btn-row, form, details { display: none !important; }
  body { background: #fff; color: #000; }
  .cal-grid { grid-template-columns: repeat(3, 1fr); gap: .5rem; }
  .cal-month { border: 1px solid #999; box-shadow: none; }
  a { color: #000; text-decoration: none; }
}

@media (max-width: 640px) {
  .site-nav { flex-basis: 100%; }
  .hero { padding-top: 1.6rem; }
}
