/* Velmato Journal — a quiet broadsheet for personal money systems */
:root {
  --paper: #f7f1e5;
  --paper-deep: #eee4d2;
  --ink: #292b25;
  --olive: #3f4b34;
  --olive-light: #dce1cf;
  --rust: #934329;
  --rust-dark: #71311f;
  --muted: #656458;
  --rule: #c8bda8;
  --white: #fffdf7;
  --serif: Georgia, "Times New Roman", Times, serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; }
a { color: var(--rust-dark); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--rust); text-decoration-thickness: 2px; }
a:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--rust);
  outline-offset: 4px;
  border-radius: 2px;
}
::selection { background: var(--olive-light); color: var(--ink); }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--white);
  font-family: var(--sans);
  font-size: 15px;
  transform: translateY(-180%);
}
.skip-link:focus { transform: translateY(0); color: var(--white); }

.utility-bar {
  border-bottom: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.utility-inner, .masthead, .nav-inner, main, .footer-inner {
  width: min(calc(100% - 48px), var(--max));
  margin-inline: auto;
}
.utility-inner { display: flex; justify-content: space-between; gap: 20px; padding-block: 8px; }
.masthead { padding: 30px 0 24px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 24px; }
.brand { color: var(--olive); text-decoration: none; }
.brand:hover { color: var(--rust-dark); }
.brand-name { display: block; font-size: clamp(38px, 5vw, 66px); line-height: 0.95; letter-spacing: -0.055em; font-weight: 500; }
.brand-sub { display: block; margin-top: 10px; color: var(--muted); font-family: var(--sans); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; }
.masthead-note { max-width: 200px; margin: 0; color: var(--muted); font-size: 14px; font-style: italic; line-height: 1.4; }
.masthead-note:last-child { text-align: right; justify-self: end; }

.site-nav { border-block: 1px solid var(--olive); }
.nav-inner { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0; font-family: var(--sans); }
.site-nav a { display: block; padding: 12px 20px; color: var(--olive); font-size: 13px; font-weight: 650; letter-spacing: 0.055em; text-decoration: none; text-transform: uppercase; }
.site-nav a:hover, .site-nav a[aria-current="page"] { background: var(--olive); color: var(--white); }

main { padding-block: 48px 72px; }
.eyebrow { margin: 0 0 12px; color: var(--rust-dark); font-family: var(--sans); font-size: 12px; font-weight: 750; letter-spacing: 0.15em; line-height: 1.4; text-transform: uppercase; }
.kicker { color: var(--olive); font-family: var(--sans); font-size: 13px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; }
h1, h2, h3 { color: var(--olive); font-weight: 500; line-height: 1.12; }
h1 { margin: 0; font-size: clamp(43px, 7vw, 82px); letter-spacing: -0.045em; }
h2 { margin: 2.2em 0 0.65em; font-size: clamp(27px, 3vw, 36px); letter-spacing: -0.02em; }
h3 { margin: 0 0 10px; font-size: 23px; }
p { margin: 0 0 1.25em; }
ul, ol { padding-left: 1.35em; }
li { margin-bottom: 0.55em; }
.lede { color: #3c3d35; font-size: clamp(21px, 2.3vw, 27px); line-height: 1.5; }
.small { color: var(--muted); font-family: var(--sans); font-size: 14px; line-height: 1.55; }
.space-top { margin-top: 32px; }
.rule { height: 1px; margin: 36px 0; border: 0; background: var(--rule); }

.hero { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(250px, 0.65fr); gap: 64px; padding-bottom: 48px; border-bottom: 3px double var(--olive); }
.hero h1 { max-width: 800px; }
.hero .lede { max-width: 690px; margin-top: 26px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.button { display: inline-block; padding: 11px 18px; border: 1px solid var(--olive); color: var(--olive); font-family: var(--sans); font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-decoration: none; text-transform: uppercase; }
.button:hover { background: var(--olive); color: var(--white); }
.button-solid { background: var(--olive); color: var(--white); }
.button-solid:hover { background: var(--rust-dark); border-color: var(--rust-dark); }
.margin-card { align-self: center; padding: 4px 0 4px 28px; border-left: 1px solid var(--rust); }
.margin-card .folio { display: block; margin-bottom: 20px; color: var(--rust); font-size: 56px; font-style: italic; line-height: 1; }
.margin-card p { font-size: 17px; }
.margin-card p:last-child { margin-bottom: 0; }

.section-heading { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 48px; align-items: start; margin: 52px 0 28px; padding-top: 16px; border-top: 1px solid var(--olive); }
.section-heading h2 { margin: 0; }
.section-heading p { margin: 0; }
.article-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); }
.article-card { display: flex; flex-direction: column; min-height: 100%; padding: 26px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.article-card h3 { margin-top: 6px; }
.article-card h3 a { color: var(--olive); text-decoration: none; }
.article-card h3 a:hover { color: var(--rust-dark); text-decoration: underline; }
.article-card p { font-size: 16px; }
.article-card .card-meta { margin-top: auto; padding-top: 12px; }
.card-number { color: var(--rust); font-family: var(--sans); font-size: 12px; letter-spacing: 0.12em; }

.topic-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin-top: 56px; }
.topic-card { padding-top: 18px; border-top: 5px solid var(--olive); }
.topic-card:nth-child(2) { border-color: var(--rust); }
.topic-card:nth-child(3) { border-color: #8a7954; }
.topic-card h3 { font-size: 28px; }
.topic-card p { font-size: 16px; }

.feature { display: grid; grid-template-columns: 110px minmax(0, 1fr) minmax(220px, 0.45fr); gap: 30px; margin-top: 52px; padding: 32px 0; border-block: 1px solid var(--olive); }
.feature-mark { color: var(--rust); font-size: 74px; font-style: italic; line-height: 1; }
.feature h2 { margin: 0 0 14px; }
.feature-aside { padding-left: 24px; border-left: 1px solid var(--rule); font-size: 16px; }

.page-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 0.35fr); gap: 60px; padding-bottom: 36px; border-bottom: 3px double var(--olive); }
.page-head h1 { font-size: clamp(42px, 6vw, 72px); }
.page-head .lede { margin-top: 22px; }
.page-note { align-self: end; padding-left: 22px; border-left: 1px solid var(--rust); color: var(--muted); font-size: 15px; font-style: italic; }
.prose { max-width: 760px; }
.prose-wide { max-width: 920px; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; margin-top: 36px; }
.note-box { margin: 30px 0; padding: 22px 26px; border-left: 4px solid var(--rust); background: var(--paper-deep); }
.note-box > :last-child { margin-bottom: 0; }
.checklist { margin: 26px 0; padding: 24px 28px; border: 1px solid var(--olive); background: rgba(255, 253, 247, 0.42); list-style: none; }
.checklist li { position: relative; padding-left: 30px; }
.checklist li::before { content: "□"; position: absolute; left: 0; color: var(--rust); font-family: var(--sans); font-weight: 700; }

.article-header { max-width: 960px; margin-bottom: 38px; }
.article-header h1 { font-size: clamp(42px, 6.5vw, 76px); }
.article-header .lede { max-width: 850px; margin: 24px 0; }
.byline { display: flex; flex-wrap: wrap; gap: 8px 24px; padding-top: 18px; border-top: 1px solid var(--rule); color: var(--muted); font-family: var(--sans); font-size: 13px; }
.article-layout { display: grid; grid-template-columns: minmax(0, 740px) minmax(190px, 1fr); gap: 64px; align-items: start; }
.article-body { min-width: 0; }
.article-body h2 { padding-top: 16px; border-top: 1px solid var(--rule); }
.article-body h2:first-child { margin-top: 0; }
.article-body h3 { margin-top: 2em; font-size: 25px; }
.article-body h2 + h3 { margin-top: 0.8em; }
.article-body p, .article-body li { font-size: 18px; }
.article-aside { position: sticky; top: 24px; padding: 20px 0 20px 24px; border-left: 1px solid var(--rust); }
.article-aside h2 { margin: 0 0 12px; font-family: var(--sans); font-size: 12px; font-weight: 750; letter-spacing: 0.12em; text-transform: uppercase; }
.article-aside p, .article-aside li { font-size: 14px; line-height: 1.55; }
.article-aside ul { padding-left: 18px; }
.pull-note { margin: 34px 0; padding: 8px 0 8px 28px; border-left: 2px solid var(--rust); color: var(--olive); font-size: 25px; font-style: italic; line-height: 1.4; }
.table-wrap { max-width: 100%; margin: 28px 0; overflow-x: auto; border: 1px solid var(--rule); }
table { width: 100%; border-collapse: collapse; background: rgba(255, 253, 247, 0.4); font-family: var(--sans); font-size: 14px; line-height: 1.45; }
caption { padding: 14px 16px; color: var(--olive); font-family: var(--serif); font-size: 18px; font-style: italic; text-align: left; }
th, td { min-width: 120px; padding: 13px 15px; border-top: 1px solid var(--rule); text-align: left; vertical-align: top; }
thead th { border-top: 0; background: var(--olive); color: var(--white); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; }
tbody th { color: var(--olive); font-weight: 700; }

.faq { margin-top: 48px; }
.faq details { border-top: 1px solid var(--rule); }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary { position: relative; padding: 18px 36px 18px 0; color: var(--olive); cursor: pointer; font-size: 20px; font-weight: 600; line-height: 1.4; }
.faq summary::after { content: "+"; position: absolute; right: 8px; color: var(--rust); font-family: var(--sans); font-size: 24px; font-weight: 400; }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 36px 8px 0; }
.related { margin-top: 48px; padding: 28px; background: var(--olive); color: var(--white); }
.related h2 { margin: 0 0 16px; padding: 0; border: 0; color: var(--white); }
.related ul { margin: 0; padding: 0; list-style: none; }
.related li { margin: 0; padding: 10px 0; border-top: 1px solid #738068; }
.related a { color: var(--white); }

.site-footer { border-top: 3px double var(--olive); background: var(--paper-deep); }
.footer-inner { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 48px; padding-block: 38px; }
.footer-brand { color: var(--olive); font-size: 30px; line-height: 1.1; }
.footer-inner p, .footer-inner li { font-family: var(--sans); font-size: 13px; line-height: 1.6; }
.footer-inner h2 { margin: 0 0 12px; font-family: var(--sans); font-size: 12px; font-weight: 750; letter-spacing: 0.1em; text-transform: uppercase; }
.footer-inner ul { margin: 0; padding: 0; list-style: none; }
.footer-bottom { padding: 12px 0; border-top: 1px solid var(--rule); color: var(--muted); font-family: var(--sans); font-size: 12px; text-align: center; }

.error-page { max-width: 760px; margin: 30px auto; text-align: center; }
.error-page .error-number { display: block; color: var(--rust); font-size: clamp(100px, 20vw, 210px); font-style: italic; line-height: 0.85; }
.error-page h1 { margin-top: 24px; font-size: clamp(40px, 6vw, 66px); }
.error-nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

@media (max-width: 900px) {
  .masthead { grid-template-columns: 1fr auto; }
  .masthead-note:first-child { display: none; }
  .hero { gap: 36px; }
  .article-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .article-layout { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .article-aside { position: static; padding: 20px 24px; border: 1px solid var(--rule); border-left: 4px solid var(--rust); }
  .article-aside ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
  .feature { grid-template-columns: 80px minmax(0, 1fr); }
  .feature-aside { grid-column: 2; padding: 18px 0 0; border-top: 1px solid var(--rule); border-left: 0; }
}

@media (max-width: 640px) {
  body { font-size: 17px; }
  .utility-inner, .masthead, .nav-inner, main, .footer-inner { width: min(calc(100% - 32px), var(--max)); }
  .utility-inner { justify-content: center; text-align: center; }
  .utility-inner span:last-child { display: none; }
  .masthead { display: block; padding: 25px 0 20px; text-align: center; }
  .brand-name { font-size: 48px; }
  .masthead-note { display: none; }
  .nav-inner { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-nav a { padding: 11px 8px; font-size: 11px; text-align: center; }
  main { padding-block: 32px 52px; }
  h1, .article-header h1, .page-head h1 { font-size: clamp(38px, 12vw, 54px); }
  .hero, .page-head, .section-heading, .two-col { grid-template-columns: 1fr; gap: 24px; }
  .hero { padding-bottom: 34px; }
  .margin-card, .page-note { padding: 18px 0 0; border-top: 1px solid var(--rust); border-left: 0; }
  .margin-card .folio { float: left; margin: 0 18px 8px 0; font-size: 44px; }
  .article-grid, .topic-strip { grid-template-columns: 1fr; }
  .article-card { padding: 22px; }
  .topic-strip { gap: 30px; }
  .feature { grid-template-columns: 1fr; gap: 16px; }
  .feature-mark { font-size: 52px; }
  .feature-aside { grid-column: auto; }
  .byline { display: block; }
  .byline span { display: block; margin-bottom: 5px; }
  .article-body p, .article-body li { font-size: 17px; }
  .pull-note { padding-left: 20px; font-size: 22px; }
  .checklist, .note-box, .related { padding: 20px; }
  th, td { min-width: 135px; padding: 11px 12px; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .article-aside ul { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

@media print {
  .utility-bar, .site-nav, .hero-actions, .article-aside, .site-footer, .related { display: none; }
  body { background: white; color: black; font-size: 11pt; }
  .masthead, main { width: 100%; }
  .article-layout { display: block; }
  a { color: black; }
}
