/* shaferwood.com
   Light is the default everywhere. Dark is opt-in via the header toggle,
   which sets data-theme on <html>. Nothing switches off the OS setting. */

:root {
  color-scheme: light;
  --ink: #16201a;
  --muted: #576b5c;
  --faint: #83948a;
  --line: #e2e8e3;
  --bg: #ffffff;
  --bg-soft: #f6f9f6;
  --brand: #40803a;            /* logo green #45873f, a shade down to clear 4.5:1 on white */
  --brand-dark: #2f6a2a;
  --brand-soft: #edf5ec;
  --rf: #1a5fc8;               /* Royal Flush blue */
  --rf-soft: #e9f1fd;
  --hero: linear-gradient(180deg, var(--brand-soft) 0%, var(--bg) 100%);
  --maxw: 760px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e7eee8;
  --muted: #a2b3a6;
  --faint: #7f9185;
  --line: #28332a;
  --bg: #111613;
  --bg-soft: #161d18;
  --brand: #6bb764;
  --brand-dark: #8ccd85;
  --brand-soft: #16241a;
  --rf: #5d9ff2;
  --rf-soft: #152336;
}

/* Royal Flush pages: white with a hint of blue, and a blue-to-green wash
   in the hero echoing the gradient screens in the app. */
body.rf {
  --ink: #15202b;
  --muted: #56687a;
  --faint: #8292a3;
  --line: #e1e8f0;
  --bg-soft: #f6f9fc;
  --brand: #1a5fc8;
  --brand-dark: #12479c;
  --brand-soft: #e9f1fd;
  --hero: linear-gradient(118deg, #dfeafb 0%, #e6f1f2 42%, #edf5ec 74%, #ffffff 100%);
}

:root[data-theme="dark"] body.rf {
  --ink: #e8eef3;
  --muted: #9fb0bd;
  --faint: #7d8e9b;
  --line: #26323d;
  --bg: #0f151c;
  --bg-soft: #151d25;
  --brand: #5d9ff2;
  --brand-dark: #85b9f7;
  --brand-soft: #152336;
  --hero: linear-gradient(118deg, #152336 0%, #15262c 44%, #16251b 74%, #0f151c 100%);
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.wrap.wide { max-width: 980px; }

/* ---------------------------------------------------------------- header */
header.site {
  position: sticky; top: 0; z-index: 10;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
/* Blue-to-green hairline on Royal Flush pages: the product color meeting
   the company color. */
body.rf header.site::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--rf) 0%, #2d7f8c 52%, #45873f 100%);
}
:root[data-theme="dark"] body.rf header.site::before {
  background: linear-gradient(90deg, #5d9ff2 0%, #43a3b2 52%, #6bb764 100%);
}
header.site .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; min-height: 64px; flex-wrap: wrap;
}
.brand {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 700; font-size: 17px; letter-spacing: -0.01em;
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
.brand .mark { display: flex; flex: none; color: var(--brand); }
.brandline { display: inline-flex; align-items: center; min-width: 0; }
.brand.sup { font-weight: 600; color: var(--faint); font-size: 15px; }
.brand.sup:hover { color: var(--brand); }
.crumb { color: var(--line); margin: 0 8px; font-size: 16px; }

/* The Royal Flush lockup in the company header: same shape as the
   Shaferwood brand, parked on the right, with its own blue mark. */
.rf-chip {
  border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 15px 7px 12px; font-size: 16px;
  transition: border-color .15s ease, background .15s ease;
}
.rf-chip .mark { color: var(--rf); }
.rf-chip:hover { border-color: var(--rf); background: var(--rf-soft); }

nav.site { display: flex; align-items: center; gap: 20px; }
nav.site a { color: var(--muted); text-decoration: none; font-size: 15px; }
nav.site a:hover, nav.site a[aria-current="page"] { color: var(--brand); }
nav.site a.rf-chip { color: var(--ink); }
nav.site a.rf-chip:hover { color: var(--ink); }

.themetoggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; flex: none; padding: 0;
  border: 1px solid var(--line); border-radius: 50%;
  background: transparent; color: var(--muted); cursor: pointer;
  transition: color .15s ease, border-color .15s ease;
}
.themetoggle:hover { color: var(--brand); border-color: var(--brand); }

/* ------------------------------------------------------------------ hero */
.hero {
  background: var(--hero);
  border-bottom: 1px solid var(--line);
  padding: 64px 0 56px;
}
.hero.company { text-align: center; padding: 76px 0 64px; }
.hero h1 {
  font-size: clamp(31px, 5.6vw, 44px); line-height: 1.14;
  letter-spacing: -0.025em; margin: 0 0 16px;
}
.hero p.lede {
  font-size: clamp(17px, 2.4vw, 20px); color: var(--muted);
  margin: 0 0 28px; max-width: 54ch;
}
.hero.company p.lede { margin-left: auto; margin-right: auto; }

.logo-lockup { display: block; margin: 0 auto 30px; width: 300px; max-width: 76%; height: auto; }
.logo-lockup.dark { display: none; }
:root[data-theme="dark"] .logo-lockup.light { display: none; }
:root[data-theme="dark"] .logo-lockup.dark { display: block; }

.pill {
  display: inline-block; background: var(--brand); color: #fff;
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.05em;
  text-transform: uppercase; padding: 6px 13px; border-radius: 999px;
  margin-bottom: 20px;
}
/* Royal Flush status pill carries the gradient. Every stop stays dark
   enough to clear 4.5:1 against white text. */
body.rf .pill { background: linear-gradient(95deg, #1a5fc8 0%, #246f86 58%, #2f6a2a 100%); }

/* --------------------------------------------------------------- product */
.product-card {
  display: block; border: 1px solid var(--line); border-radius: 14px;
  background: var(--bg); padding: 28px 30px; text-decoration: none; color: inherit;
  box-shadow: 0 1px 2px rgba(20,40,25,.04);
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.product-card:hover {
  border-color: var(--rf); transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(20,40,25,.09);
}
:root[data-theme="dark"] .product-card { box-shadow: none; }
:root[data-theme="dark"] .product-card:hover { box-shadow: 0 8px 22px rgba(0,0,0,.4); }
.product-card .eyebrow {
  font-size: 12.5px; font-weight: 600; letter-spacing: .05em;
  text-transform: uppercase; color: var(--rf); margin: 0 0 8px;
}
.product-card h3 { margin: 0 0 8px; font-size: 22px; letter-spacing: -0.015em; }
.product-card p { margin: 0 0 14px; color: var(--muted); font-size: 16px; }
.product-card .go { color: var(--rf); font-weight: 600; font-size: 15.5px; }

.btn {
  display: inline-block; background: var(--brand); color: #fff;
  text-decoration: none; font-weight: 600; font-size: 16px;
  padding: 13px 24px; border-radius: 9px; border: 1px solid var(--brand);
  transition: background .15s ease;
}
.btn:hover { background: var(--brand-dark); color: #fff; }
:root[data-theme="dark"] .btn, :root[data-theme="dark"] .btn:hover { color: #0f1a10; }

/* ------------------------------------------------------------------ main */
main { padding: 48px 0 72px; }
main.legal { padding-top: 40px; }

h2 { font-size: 23px; line-height: 1.3; letter-spacing: -0.015em; margin: 44px 0 14px; }
h3 { font-size: 17px; margin: 28px 0 8px; }
h2:first-child, h3:first-child { margin-top: 0; }

p { margin: 0 0 16px; }
a { color: var(--brand); }
a:hover { color: var(--brand-dark); }
ul, ol { margin: 0 0 16px; padding-left: 22px; }
li { margin-bottom: 7px; }
strong { font-weight: 650; }
.muted { color: var(--muted); }

/* --------------------------------------------------------------- feature */
.features {
  display: grid; gap: 26px;
  grid-template-columns: repeat(auto-fit, minmax(228px, 1fr));
  margin: 36px 0 8px;
}
.feature h3 { margin: 0 0 6px; font-size: 16px; }
.feature p { margin: 0; color: var(--muted); font-size: 15.5px; }

/* ------------------------------------------------------------------ note */
.note {
  background: var(--bg-soft); border: 1px solid var(--line);
  border-left: 3px solid var(--brand); border-radius: 6px;
  padding: 16px 18px; margin: 0 0 28px;
}
.note p:last-child { margin-bottom: 0; }

/* ----------------------------------------------------------------- dates */
.dates {
  color: var(--faint); font-size: 14.5px; margin: 0 0 28px;
  padding-bottom: 20px; border-bottom: 1px solid var(--line);
}
.dates span + span::before { content: " · "; }

/* ----------------------------------------------------------------- table */
.tablewrap { overflow-x: auto; margin: 0 0 22px; }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; min-width: 560px; }
th, td { text-align: left; vertical-align: top; padding: 9px 12px; border: 1px solid var(--line); }
th { background: var(--bg-soft); font-weight: 650; }

/* ------------------------------------------------------------------- toc */
.toc {
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 8px; padding: 18px 22px; margin: 0 0 36px;
}
.toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 28px; }
.toc li { margin-bottom: 5px; font-size: 15px; break-inside: avoid; }

/* ---------------------------------------------------------------- footer */
footer.site {
  border-top: 1px solid var(--line); background: var(--bg-soft);
  padding: 34px 0 44px; font-size: 14.5px; color: var(--muted);
}
footer.site a { color: var(--muted); text-decoration: none; }
footer.site a:hover { color: var(--brand); text-decoration: underline; }
footer.site .links { margin-bottom: 14px; }
footer.site .links a { margin-right: 18px; display: inline-block; }
footer.site p { margin: 0 0 6px; }

@media (max-width: 620px) {
  body { font-size: 16.5px; }
  .hero { padding: 44px 0 40px; }
  .hero.company { padding: 52px 0 46px; }
  main { padding: 36px 0 56px; }
  .toc ol { columns: 1; }
  header.site .wrap { min-height: 56px; padding-top: 10px; padding-bottom: 10px; gap: 10px; }
  nav.site { width: 100%; gap: 16px; flex-wrap: wrap; }
  .rf-chip { padding: 6px 13px 6px 10px; font-size: 15px; }
  .product-card { padding: 22px 20px; }
}
