/* Jordan public site. Tokens mirror app/frontend/src/styles/tokens.css (Soft Bevel). */
:root {
  --paper: #f3f7f4;
  --header-bg: #eef5f0;
  --panel: #e6efe8;
  --panel-2: #dce8df;
  --well: #ffffff;
  --border: #b7c9bb;
  --grid: #c4d2c7;
  --hi: #ffffff;
  --lo: #b7c9bb;
  --text: #15241a;
  --muted: #5a6f60;
  --accent: #217346;
  --accent-deep: #186038;
  --accent-bright: #3da86a;
  --accent-fade: rgba(33, 115, 70, 0.12);
  --red: #c44b4b;
  --gold: #c4922e;
  --blue: #3d7ab5;
  --shadow: rgba(21, 36, 26, 0.18);
  --bevel-out: inset 0 1px 0 var(--hi), inset 0 -1px 0 var(--lo), 0 1px 0 rgba(21, 36, 26, 0.06);
  --bevel-in: inset 0 1px 2px rgba(21, 36, 26, 0.14), inset 0 -1px 0 var(--hi);
  --btn-face: linear-gradient(180deg, #f8fbf8 0%, #e4eee6 100%);
  --font: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius: 4px;
  --radius-lg: 6px;
  --wrap: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 17px/1.6 var(--font);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-deep); }
code { font-family: var(--mono); font-size: 0.86em; background: var(--panel); padding: 0.1em 0.35em; border-radius: 3px; }
h1, h2, h3 { line-height: 1.18; letter-spacing: -0.015em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 750; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.center { text-align: center; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 780px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } body { font-size: 16px; } }

.skip { position: absolute; left: -999px; top: 8px; background: var(--well); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--btn-face); box-shadow: var(--bevel-out);
  color: var(--text); font-weight: 700; font-size: 0.95rem; text-decoration: none; white-space: nowrap;
}
.btn:hover { color: var(--text); background: linear-gradient(180deg, #ffffff 0%, #e9f2eb 100%); }
.btn-primary {
  color: #fff; border-color: var(--accent-deep);
  background: linear-gradient(180deg, var(--accent-bright) 0%, var(--accent) 55%, var(--accent-deep) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 1px 2px var(--shadow);
}
.btn-primary:hover { color: #fff; background: linear-gradient(180deg, #45b574 0%, #25804e 55%, var(--accent-deep) 100%); }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 0.88rem; }
.btn-lg { min-height: 52px; padding: 0 26px; font-size: 1.05rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--header-bg) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--border);
  box-shadow: inset 0 -1px 0 var(--hi);
}
.header-inner { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand img { height: 30px; width: auto; }
.site-nav { display: flex; gap: 22px; margin-left: auto; }
.site-nav a { color: var(--text); font-weight: 650; font-size: 0.95rem; text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current='page'] { color: var(--accent); }
@media (max-width: 720px) {
  .header-inner { gap: 14px; }
  .site-nav { gap: 14px; }
  .site-nav a:not([href='/learn/']) { display: none; }
}

/* Hero */
.hero { padding: 72px 0 64px; background:
  linear-gradient(var(--paper), transparent 70%),
  repeating-linear-gradient(0deg, transparent 0 31px, rgba(33, 115, 70, 0.05) 31px 32px),
  repeating-linear-gradient(90deg, transparent 0 95px, rgba(33, 115, 70, 0.05) 95px 96px);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 56px; align-items: center; }
.eyebrow { color: var(--accent); font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.78rem; margin-bottom: 14px; }
.lede { font-size: 1.16rem; color: #2f4436; max-width: 38em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 14px; }
.fine { font-size: 0.86rem; color: var(--muted); }
@media (max-width: 1100px) {
  .hero { padding: 48px 0; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
}

/* Product mock */
.mock { margin: 0; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--panel); box-shadow: 0 1px 0 var(--hi) inset, 0 24px 48px -24px rgba(21, 36, 26, 0.35), 0 2px 6px rgba(21, 36, 26, 0.08); overflow: hidden; font-size: 13px; }
.mock-bar { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; background: var(--header-bg); border-bottom: 1px solid var(--border); }
.mock-bar .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--panel-2); box-shadow: var(--bevel-in); }
.mock-title { margin-left: 10px; font-weight: 700; color: var(--muted); }
.mock-body { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.mock-sheet { display: flex; flex-direction: column; min-width: 0; border-right: 1px solid var(--border); }
.mock-fx { display: flex; align-items: center; gap: 8px; padding: 6px 8px; background: var(--panel); border-bottom: 1px solid var(--border); }
.mock-fx .fx-name { font-family: var(--mono); font-size: 12px; background: var(--well); box-shadow: var(--bevel-in); padding: 2px 8px; border-radius: 3px; }
.mock-fx .fx-eq { font-style: italic; color: var(--muted); font-weight: 700; }
.mock-fx code { flex: 1; background: var(--well); box-shadow: var(--bevel-in); padding: 3px 8px; font-size: 12px; }
.mock-fx code b { color: #c45a12; font-weight: 500; }
.mock-fx code i { color: #2f6fed; font-style: normal; }
.mock-grid { flex: 1; overflow: hidden; background: var(--well); }
.mock-grid table { border-collapse: collapse; width: 100%; font-family: var(--mono); font-size: 12px; }
.mock-grid th, .mock-grid td { border: 1px solid var(--grid); padding: 4px 6px; text-align: right; white-space: nowrap; }
.mock-grid thead th, .mock-grid tbody th { background: var(--header-bg); color: var(--muted); font-weight: 500; text-align: center; font-size: 11px; }
.mock-grid tr.hdr td { font-family: var(--font); font-weight: 750; text-align: left; background: #f7faf8; }
.mock-grid td:first-of-type { text-align: left; }
.mock-grid td.gap { color: var(--accent-deep); background: rgba(33, 115, 70, 0.07); }
.mock-grid td.sel { outline: 2px solid var(--accent); outline-offset: -2px; background: var(--accent-fade); }
.mock-tabs { display: flex; gap: 2px; padding: 0 6px; margin-top: auto; background: var(--panel); border-top: 1px solid var(--border); }
.mock-tabs span { padding: 5px 12px; color: var(--muted); font-weight: 650; font-size: 12px; }
.mock-tabs .on { background: var(--well); color: var(--accent); box-shadow: inset 0 2px 0 var(--accent); }
.mock-agent { display: flex; flex-direction: column; gap: 10px; padding: 12px; background: #f7faf8; min-width: 0; }
.msg { padding: 9px 11px; border-radius: var(--radius); line-height: 1.45; }
.msg p { margin: 0 0 8px; }
.msg code { font-size: 11px; }
.msg.user { align-self: flex-end; background: var(--accent); color: #fff; max-width: 92%; }
.msg.agent { background: var(--well); border: 1px solid var(--border); }
.diff { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.diff-head { padding: 4px 8px; background: var(--header-bg); font-weight: 750; font-size: 11px; color: var(--muted); border-bottom: 1px solid var(--border); }
.diff-row { padding: 3px 8px; font-family: var(--mono); font-size: 11px; background: rgba(33, 115, 70, 0.06); border-bottom: 1px solid #e3ece5; }
.diff-row .plus { color: var(--accent); font-weight: 700; margin-right: 6px; }
.diff-actions { display: flex; gap: 6px; padding: 6px 8px; }
.diff-actions span { padding: 2px 10px; border: 1px solid var(--border); border-radius: 3px; background: var(--btn-face); font-weight: 700; font-size: 11px; }
.diff-actions .ok { background: var(--accent); border-color: var(--accent-deep); color: #fff; }
.mock figcaption { padding: 6px 12px; font-size: 11px; color: var(--muted); background: var(--header-bg); border-top: 1px solid var(--border); }
@media (max-width: 560px) {
  .mock-body { grid-template-columns: 1fr; }
  .mock-sheet { border-right: 0; border-bottom: 1px solid var(--border); }
}

/* Sections */
.section { padding: 88px 0; }
.section.tight { padding: 40px 0 8px; }
.section.alt { background: var(--header-bg); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.band { padding: 56px 0 64px; border-top: 1px solid var(--border); background: var(--well); }
.section-title { margin-bottom: 12px; }
.section-title.small { font-size: 1.35rem; margin-top: 56px; }
.section-lede { color: var(--muted); font-size: 1.08rem; margin-bottom: 36px; max-width: 42em; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.more { font-weight: 750; text-decoration: none; white-space: nowrap; }
@media (max-width: 600px) { .section { padding: 60px 0; } }

.cards { display: grid; gap: 18px; }
.cards.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .cards.three { grid-template-columns: 1fr; } }
.card {
  background: var(--well); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 22px 22px 18px; box-shadow: var(--bevel-out);
}
.card p { color: #3c5244; margin: 0; }
.card h3 { margin-bottom: 8px; }
.card.q { border-left: 3px solid var(--accent); }
.card-icon, .step-icon {
  display: inline-grid; place-items: center; width: 40px; height: 40px; margin-bottom: 14px;
  border-radius: var(--radius); border: 1px solid var(--border); background: var(--btn-face); box-shadow: var(--bevel-out);
}
.card-icon svg, .step-icon svg { width: 22px; height: 22px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.article-card h3 a { color: var(--text); text-decoration: none; }
.article-card h3 a:hover { color: var(--accent); }
.article-card h3 a::after { content: ''; position: absolute; inset: 0; }
.article-card { position: relative; transition: border-color 0.15s, transform 0.15s; }
.article-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.kicker { font-size: 0.78rem; font-weight: 800; color: var(--accent); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 8px !important; }

.steps { list-style: none; padding: 0; margin: 36px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; counter-reset: step; }
.steps li { position: relative; padding: 22px; background: var(--well); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--bevel-out); counter-increment: step; }
.steps li::before { content: counter(step); position: absolute; top: 22px; right: 22px; font: 500 0.85rem var(--mono); color: var(--muted); }
.steps p { color: #3c5244; margin: 0; font-size: 0.97rem; }
@media (max-width: 960px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 28px; } }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.checks li { position: relative; padding: 14px 16px 14px 46px; background: var(--well); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--bevel-out); }
.checks li::before { content: ''; position: absolute; left: 16px; top: 18px; width: 16px; height: 16px; border-radius: 3px; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat; }

.faq details { background: var(--well); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 10px; box-shadow: var(--bevel-out); }
.faq summary { cursor: pointer; padding: 16px 48px 16px 18px; font-weight: 750; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 18px; top: 13px; font: 500 1.3rem var(--mono); color: var(--accent); }
.faq details[open] summary::after { content: '−'; }
.faq details p { padding: 0 18px 16px; margin: 0; color: #3c5244; }

.cta { padding: 88px 0; background: linear-gradient(180deg, var(--accent) 0%, var(--accent-deep) 100%); color: #fff; }
.cta h2 { color: #fff; }
.cta p { color: rgba(255, 255, 255, 0.88); font-size: 1.1rem; margin-bottom: 26px; }
.cta a:not(.btn) { color: #fff; }
.cta .btn-primary { background: var(--well); color: var(--accent-deep); border-color: var(--well); }
.cta .btn-primary:hover { background: #eef5f0; color: var(--accent-deep); }

/* Page head (Learn index, 404) */
.page-head { padding: 64px 0 24px; }
.cat-title { font-size: 1.1rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 18px; }

/* Article */
.article-head { padding: 56px 0 32px; border-bottom: 1px solid var(--border); background: var(--header-bg); }
.article-head h1 { font-size: clamp(2rem, 4vw, 2.9rem); }
.crumbs { font-size: 0.9rem; color: var(--muted); margin-bottom: 16px; }
.crumbs a { font-weight: 700; text-decoration: none; }
.meta { font-size: 0.9rem; color: var(--muted); margin: 0; }
.article-grid { display: grid; grid-template-columns: 220px minmax(0, 720px); gap: 56px; justify-content: center; padding-top: 48px; padding-bottom: 72px; }
.article-side { position: relative; }
.toc { position: sticky; top: 88px; font-size: 0.9rem; }
.toc-head { font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.75rem; color: var(--muted); margin-bottom: 10px; }
.toc ol { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--border); }
.toc li a { display: block; padding: 5px 0 5px 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; line-height: 1.35; }
.toc li a:hover { color: var(--accent); border-left-color: var(--accent); }
@media (max-width: 960px) {
  .article-grid { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 32px; }
  .article-side { display: none; }
}

.prose { font-size: 1.06rem; line-height: 1.72; }
.prose h2 { font-size: 1.6rem; margin: 2.2em 0 0.6em; }
.prose h3 { font-size: 1.2rem; margin: 1.8em 0 0.5em; }
.prose h2, .prose h3 { position: relative; }
.prose .anchor { position: absolute; left: -1.1em; color: var(--border); text-decoration: none; font-weight: 500; opacity: 0; }
.prose h2:hover .anchor, .prose h3:hover .anchor { opacity: 1; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1.2em; }
.prose li { margin-bottom: 0.4em; }
.prose blockquote { margin: 1.5em 0; padding: 14px 20px; border-left: 3px solid var(--accent); background: var(--well); border-radius: 0 var(--radius) var(--radius) 0; color: #2f4436; }
.prose blockquote p:last-child { margin: 0; }
.prose pre { background: var(--well); border: 1px solid var(--border); box-shadow: var(--bevel-in); border-radius: var(--radius); padding: 14px 16px; overflow-x: auto; font-size: 0.88rem; line-height: 1.55; }
.prose pre code { background: none; padding: 0; font-size: inherit; }
.table-wrap { overflow-x: auto; margin: 1.4em 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--well); }
.prose table { border-collapse: collapse; width: 100%; font-size: 0.93rem; }
.prose th, .prose td { padding: 8px 12px; border-bottom: 1px solid #e1eae3; text-align: left; vertical-align: top; }
.prose th { background: var(--header-bg); font-weight: 750; border-bottom-color: var(--border); }
.prose tr:last-child td { border-bottom: 0; }
.takeaways { background: var(--well); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--radius); padding: 18px 22px 8px; margin-bottom: 2em; box-shadow: var(--bevel-out); }
.takeaways ul { padding-left: 1.2em; }
.note { margin-top: 3em; padding: 14px 18px; font-size: 0.9rem; color: var(--muted); background: var(--panel); border-radius: var(--radius); }
.article-cta { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 28px 32px; background: var(--well); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--bevel-out); }
.article-cta h2 { font-size: 1.4rem; margin-bottom: 6px; }
.article-cta p { margin: 0; color: #3c5244; }
@media (max-width: 720px) { .article-cta { flex-direction: column; align-items: flex-start; padding: 22px; } }

/* Footer */
.site-footer { padding: 56px 0 32px; background: var(--panel); border-top: 1px solid var(--border); font-size: 0.93rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.footer-grid img { height: 26px; width: auto; margin-bottom: 10px; }
.footer-grid nav { display: flex; flex-direction: column; gap: 8px; }
.footer-grid nav a { color: var(--text); text-decoration: none; }
.footer-grid nav a:hover { color: var(--accent); }
.footer-head { font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.75rem; color: var(--muted); margin: 0 0 4px; }
.disclaimer { margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.82rem; }
.disclaimer p { margin-bottom: 0.6em; max-width: 70em; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > div:first-child { grid-column: 1 / -1; } }
