/* Trent Dahlin Tutoring — site styles
   Palette: alpine teal accent, summit gold for the "ups", cool paper ground.
   Type: Fraunces (display) + Public Sans (text). */

:root {
  --ground: #F6F7F4;
  --surface: #FFFFFF;
  --ink: #16232B;
  --muted: #5D6B73;
  --rule: #D9DFDC;
  --accent: #0E6B66;
  --accent-ink: #FFFFFF;
  --accent-soft: #E1F0EE;
  --gold: #D99A2B;
  --gold-ink: #16232B;
  --gold-soft: #FBF0D9;
  --danger: #B3261E;
  --shadow: 0 10px 30px rgba(22, 35, 43, .08);
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #101A1D; --surface: #172327; --ink: #E8EEEC; --muted: #9FB0AC; --rule: #2A3A3E;
    --accent: #5ECBC2; --accent-ink: #0B1B1A; --accent-soft: #163634;
    --gold: #E7B65A; --gold-ink: #16232B; --gold-soft: #3A3018; --danger: #FF8A80;
    --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  }
}
:root[data-theme="dark"] {
  --ground: #101A1D; --surface: #172327; --ink: #E8EEEC; --muted: #9FB0AC; --rule: #2A3A3E;
  --accent: #5ECBC2; --accent-ink: #0B1B1A; --accent-soft: #163634;
  --gold: #E7B65A; --gold-ink: #16232B; --gold-soft: #3A3018; --danger: #FF8A80;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font-family: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 720px; }

/* ---------- Type ---------- */
h1, h2, h3, .display {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-weight: 500; line-height: 1.12; letter-spacing: -.012em; margin: 0 0 .5em; text-wrap: balance;
  font-variation-settings: "opsz" 72, "SOFT" 30;
}
h1 { font-size: clamp(2.5rem, 5.4vw, 4.2rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.32rem; line-height: 1.25; }
p { margin: 0 0 1em; }
.lede { font-size: 1.22rem; line-height: 1.5; max-width: 60ch; }
.prose { max-width: 66ch; }
.prose p, .prose li { font-size: 1.06rem; }
.prose h2 { margin-top: 2.4em; }
.prose h3 { margin-top: 1.8em; }
.prose blockquote { margin: 1.5em 0; padding: 0 0 0 1.1em; border-left: 3px solid var(--gold); color: var(--muted); font-style: italic; font-family: "Fraunces", Georgia, serif; font-size: 1.25rem; line-height: 1.4; }
.eyebrow { font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin: 0 0 .8em; }
.muted { color: var(--muted); }
.fine { font-size: .9rem; color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
ul.clean { list-style: none; padding: 0; margin: 0; }
.check { list-style: none; padding: 0; margin: 0 0 1.2em; }
.check li { position: relative; padding-left: 1.7em; margin: 0 0 .6em; }
.check li::before { content: ""; position: absolute; left: .1em; top: .55em; width: .8em; height: .45em; border-left: 2.5px solid var(--gold); border-bottom: 2.5px solid var(--gold); transform: rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  padding: .8em 1.35em; border-radius: 999px; border: 1.5px solid var(--accent);
  background: var(--accent); color: var(--accent-ink); line-height: 1.2;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-gold { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.btn-ghost { background: transparent; color: var(--accent); }
.btn-lg { font-size: 1.08rem; padding: 1em 1.7em; }
.btn[disabled] { opacity: .6; cursor: default; transform: none; box-shadow: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---------- Header ---------- */
.site-head { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--ground) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--rule); }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.wordmark { font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 1.35rem; letter-spacing: -.01em; font-variation-settings: "opsz" 36, "SOFT" 40; }
.wm-light { font-weight: 400; color: var(--muted); }
.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 500; font-size: .98rem; padding: 6px 0; border-bottom: 2px solid transparent; }
.site-nav a:not(.btn):hover, .site-nav a[aria-current="page"] { border-bottom-color: var(--gold); }
.nav-cta { padding: .6em 1.1em; font-size: .95rem; }
.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span:not(.sr-only) { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; }
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 68px; flex-direction: column; align-items: stretch; gap: 0; background: var(--surface); border-bottom: 1px solid var(--rule); padding: 8px 20px 18px; box-shadow: var(--shadow); }
  .site-nav.open { display: flex; }
  .site-nav a:not(.btn) { padding: 12px 0; border-bottom: 1px solid var(--rule); }
  .nav-cta { margin-top: 14px; }
}

/* ---------- Hero ---------- */
.hero { padding: clamp(40px, 7vw, 88px) 0 clamp(36px, 5vw, 64px); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
/* Home-page portrait: rounded photo with a teal offset block and a gold dot */
.portrait.hero-portrait { max-width: 400px; margin: 0 auto; aspect-ratio: auto; background: none; overflow: visible; display: block; border-radius: 0; }
.hero-portrait .frame { position: relative; margin: 14px 18px 18px 14px; }
.portrait.hero-portrait img { display: block; width: 100%; height: auto; border-radius: 22px; box-shadow: var(--shadow); position: relative; z-index: 1; aspect-ratio: 4/5; object-fit: cover; object-position: 50% 18%; }
.hero-portrait .frame::before { content: ""; position: absolute; inset: 18px -18px -18px 18px; border-radius: 22px; background: var(--accent-soft); z-index: 0; }
.hero-portrait .frame::after { content: ""; position: absolute; left: -14px; top: -14px; width: 80px; height: 80px; border-radius: 50%; background: var(--gold-soft); z-index: 0; }
.hero-portrait figcaption { margin-top: 18px; font-size: .92rem; color: var(--muted); text-align: center; line-height: 1.45; }
@media (max-width: 900px) { .portrait.hero-portrait { max-width: 340px; margin-top: 8px; } }
.hero h1 { margin-bottom: .35em; }
.hero h1 .up { color: var(--accent); }
.hero .lede { margin-bottom: 1.4em; }
.hero-cred { margin-top: 1.6em; font-size: .92rem; color: var(--muted); }
.hero-cred strong { color: var(--ink); font-weight: 600; }
.chart-card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 22px 22px 16px; box-shadow: var(--shadow); }
.chart-card figcaption { font-size: .92rem; color: var(--muted); margin-top: 10px; line-height: 1.45; }
.chart-card svg { width: 100%; height: auto; display: block; }
.chart-card .ct { fill: var(--muted); font-family: "Public Sans", system-ui, sans-serif; font-size: 11px; }
.chart-card .cl { fill: var(--ink); font-family: "Public Sans", system-ui, sans-serif; font-size: 12px; font-weight: 600; }
.chart-card .cg { stroke: var(--rule); stroke-width: 1; }
.chart-card .line { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.chart-card .area { fill: var(--accent); opacity: .08; }
.chart-card .dot { fill: var(--surface); stroke: var(--accent); stroke-width: 2.5; }
.chart-card .dot.official { fill: var(--gold); stroke: var(--gold); }
.chart-card .key { display: flex; gap: 18px; font-size: .82rem; color: var(--muted); margin-top: 6px; }
.chart-card .key i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.chart-card .key .k-p i { background: var(--surface); border: 2px solid var(--accent); }
.chart-card .key .k-o i { background: var(--gold); }

/* ---------- Sections ---------- */
.section { padding: clamp(44px, 6vw, 80px) 0; }
.section-tight { padding: clamp(28px, 4vw, 48px) 0; }
.section.alt { background: var(--surface); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.section-head { max-width: 62ch; margin-bottom: clamp(20px, 3vw, 36px); }
.section-head p { font-size: 1.1rem; color: var(--muted); }

/* Two ups strip */
.ups { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 720px) { .ups { grid-template-columns: 1fr; } }
.up-card { display: grid; grid-template-columns: 56px 1fr; gap: 16px; align-items: start; }
.up-card .glyph { width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); }
.up-card .glyph svg { width: 30px; height: 30px; }
.up-card:nth-child(2) .glyph { background: var(--gold-soft); }
.up-card h3 { margin: 4px 0 6px; }
.up-card p { margin: 0; color: var(--muted); }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: step; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }
.step { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 24px 24px 20px; position: relative; }
.step::before { counter-increment: step; content: counter(step); position: absolute; top: -14px; left: 20px; width: 30px; height: 30px; border-radius: 50%; background: var(--gold); color: var(--gold-ink); font-weight: 700; font-size: .95rem; display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.step h3 { margin: 6px 0 8px; }
.step p { margin: 0 0 .6em; color: var(--muted); }
.step .price { color: var(--ink); font-weight: 600; }

/* Stat tiles */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 960px) { .stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .stats { grid-template-columns: 1fr; } }
.stat { padding: 20px 22px; border-top: 3px solid var(--gold); background: var(--surface); border-radius: 0 0 var(--radius) var(--radius); border-left: 1px solid var(--rule); border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.stat .big { font-family: "Fraunces", Georgia, serif; font-size: 2.6rem; line-height: 1; font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.stat .big small { font-size: .5em; color: var(--muted); font-weight: 400; margin-left: .15em; }
.stat .what { margin: 8px 0 0; font-size: .95rem; color: var(--muted); line-height: 1.4; }
.stat .tag { display: inline-block; margin-top: 10px; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--accent); }
.stat .tag.practice { color: var(--gold); filter: brightness(.85); }

/* Results table */
.table-wrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); margin: 18px 0 8px; }
table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: .97rem; font-variant-numeric: tabular-nums; }
th { text-align: left; font-size: .76rem; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 12px 16px; border-bottom: 1px solid var(--rule); background: var(--ground); }
td { padding: 12px 16px; border-bottom: 1px solid var(--rule); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td.gain { font-weight: 700; color: var(--accent); white-space: nowrap; }
.pill { display: inline-block; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.pill.practice { background: var(--gold-soft); color: #7A5410; }
:root[data-theme="dark"] .pill.practice { color: var(--gold); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pill.practice { color: var(--gold); } }

/* Two-column feature (teasers) */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: start; }
@media (max-width: 860px) { .duo { grid-template-columns: 1fr; } }
.teaser { padding: 28px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); }
.teaser h2 { font-size: 1.7rem; }
.teaser p { color: var(--muted); }
.teaser .more { font-weight: 600; text-decoration: none; }
.teaser .more::after { content: " →"; }

/* Scholarship strip */
.strip { background: var(--accent); color: var(--accent-ink); }
.strip .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; padding-top: 26px; padding-bottom: 26px; }
.strip p { margin: 0; max-width: 62ch; }
.strip a.btn { background: var(--surface); color: var(--accent); border-color: var(--surface); }
.strip a.link { color: inherit; }

/* CTA band */
.cta-band { background: var(--surface); border-top: 1px solid var(--rule); }
.cta-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 22px; padding-top: clamp(40px, 6vw, 64px); padding-bottom: clamp(40px, 6vw, 64px); }
.cta-inner h2 { margin-bottom: .3em; }
.cta-inner p { margin: 0; color: var(--muted); max-width: 58ch; }

/* Story / prose pages */
.page-head { padding: clamp(36px, 6vw, 72px) 0 clamp(16px, 3vw, 32px); }
.page-head h1 { max-width: 18ch; }
.page-head .lede { color: var(--muted); }
.story-grid { display: grid; grid-template-columns: minmax(0, 66ch) 300px; gap: clamp(28px, 5vw, 72px); align-items: start; }
@media (max-width: 960px) { .story-grid { grid-template-columns: 1fr; } }
.aside { position: sticky; top: 90px; }
.portrait { border-radius: var(--radius); overflow: hidden; background: var(--accent-soft); aspect-ratio: 4/5; margin-bottom: 18px; display: grid; place-items: center; }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.portrait .placeholder { padding: 24px; text-align: center; color: var(--muted); font-size: .9rem; }
.cred { border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); padding: 18px 20px; }
.cred h3 { font-size: 1.05rem; margin-bottom: .6em; }
.cred ul { margin: 0; padding-left: 1.1em; }
.cred li { margin-bottom: .45em; font-size: .95rem; }
.keys { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 1.6em 0 2em; }
@media (max-width: 640px) { .keys { grid-template-columns: 1fr; } }
.key-card { padding: 20px 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--rule); }
.key-card .k { font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--gold); filter: brightness(.85); }
.key-card h3 { margin: .3em 0 .3em; }
.key-card p { margin: 0; color: var(--muted); font-size: 1rem; }

/* Rules list (philosophy) */
.rules { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 1.2em 0 2em; }
@media (max-width: 640px) { .rules { grid-template-columns: 1fr; } }
.rule { padding: 16px 18px; background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; }
.rule b { display: block; font-family: "Fraunces", Georgia, serif; font-weight: 500; font-size: 1.15rem; margin-bottom: 4px; }
.rule span { color: var(--muted); font-size: .95rem; }

/* Pricing */
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 1.4em 0 1em; }
@media (max-width: 900px) { .tiers { grid-template-columns: 1fr; } }
.tier { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 24px; }
.tier.featured { border-color: var(--accent); box-shadow: var(--shadow); }
.tier h3 { margin-bottom: .2em; }
.tier .for { color: var(--muted); font-size: .95rem; margin-bottom: 1em; min-height: 2.6em; }
.tier ul { padding-left: 1.1em; margin: 0; }
.tier li { margin-bottom: .45em; font-size: .97rem; }
.price-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 18px; padding: 18px 22px; border-radius: var(--radius); background: var(--accent-soft); margin: 1.2em 0; }
.price-line .p { font-family: "Fraunces", Georgia, serif; font-size: 1.9rem; font-weight: 500; }
.price-line .d { color: var(--muted); }

/* Forms */
.form-card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: clamp(20px, 3vw, 32px); }
.field { margin: 0 0 18px; }
.field label, .field .lbl { display: block; font-weight: 600; margin-bottom: 6px; }
.field .help { font-size: .9rem; color: var(--muted); margin: -2px 0 8px; }
.req { color: var(--accent); }
input[type=text], input[type=email], input[type=tel], input[type=number], select, textarea {
  width: 100%; font: inherit; color: inherit; background: var(--ground);
  border: 1px solid var(--rule); border-radius: 10px; padding: 12px 13px; margin: 0;
}
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
textarea { min-height: 120px; resize: vertical; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .row2 { grid-template-columns: 1fr; } }
.checkline { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.checkline input { margin-top: 5px; accent-color: var(--accent); flex: none; }
.err { color: var(--danger); font-size: .9rem; margin-top: 6px; display: none; }
.invalid .err { display: block; }
.invalid input, .invalid textarea, .invalid select { border-color: var(--danger); }
.status { font-size: .95rem; color: var(--muted); }
.status.bad { color: var(--danger); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.hidden { display: none !important; }
.panel { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 24px; }
.panel pre { white-space: pre-wrap; word-break: break-word; font: 14px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--ground); border: 1px solid var(--rule); border-radius: 10px; padding: 12px; max-height: 320px; overflow: auto; }
.book-embed { margin-top: 20px; }
.book-embed iframe { width: 100%; min-height: 640px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); }
.side-note { background: var(--gold-soft); border-radius: var(--radius); padding: 18px 20px; font-size: .97rem; }
.side-note h3 { font-size: 1.05rem; margin-bottom: .4em; }
.contribute { display: flex; flex-wrap: wrap; gap: 12px; margin: 1em 0 .6em; }

/* Utilities */
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.center { text-align: center; }
.small-print { font-size: .9rem; color: var(--muted); }
hr.rule { border: 0; border-top: 1px solid var(--rule); margin: 2.4em 0; }

/* ---------- Footer ---------- */
.site-foot { border-top: 1px solid var(--rule); background: var(--ground); padding: 44px 0 36px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 32px; align-items: start; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr; gap: 22px; } }
.foot-tag { font-family: "Fraunces", Georgia, serif; font-size: 1.15rem; margin: 10px 0 6px; }
.foot-line { color: var(--muted); font-size: .95rem; margin: 0; max-width: 40ch; }
.foot-links { display: grid; gap: 8px; }
.foot-links a { color: var(--ink); text-decoration: none; font-size: .97rem; }
.foot-links a:hover { color: var(--accent); text-decoration: underline; }
.foot-contact p { margin: 0 0 8px; }
.foot-fine { color: var(--muted); font-size: .88rem; }
@media (max-width: 480px) { .hero .btn-row .btn { width: 100%; } }
