/* NYAWA Media — editorial design system
   Paper ground, ink type, one brick accent. Rules instead of cards-with-shadows. */

:root {
  --paper: #f7f2e8;
  --paper-2: #fcf9f2;
  --paper-3: #efe8da;
  --ink: #17120e;
  --ink-2: #40362c;
  --muted: #76695a;
  --line: #e2d9c7;
  --rule: #cdc1ab;
  --brick: #bf3826;
  --brick-ink: #8a2a1a;
  --brick-soft: #f6e4de;
  --brand: #d8382a;
  --green: #205442;
  --display: "Fraunces", "Playfair Display", Georgia, serif;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Instrument Sans", ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  --wrap: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
button { font: inherit; color: inherit; }
svg { display: block; flex: none; }

:focus-visible { outline: 2px solid var(--brick); outline-offset: 3px; }

::selection { background: #f2d2c8; color: var(--ink); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 10px 14px;
  font-size: 13px; font-weight: 600;
}
.skip:focus { top: 12px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 26px; }

/* ---------------- masthead ---------------- */

.masthead { background: var(--paper-2); border-bottom: 1px solid var(--line); }

.masthead-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  padding-top: 22px;
  padding-bottom: 18px;
}

.mast-date {
  font-size: 10.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); display: flex; align-items: center; gap: 9px;
}
.mast-brand { text-align: center; }
.brand-link { display: inline-block; }
.brand-link:hover { opacity: .8; }
.brand-logo { display: block; width: 188px; height: auto; margin: 0 auto; }
.mast-tag {
  display: block;
  font-family: var(--serif);
  font-style: italic;
  font-size: 13.5px;
  color: var(--muted);
  margin-top: 8px;
}
.mast-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.mast-icon {
  position: relative;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  color: var(--ink-2);
  border: 1px solid transparent;
}
.mast-icon:hover { color: var(--brick); border-color: var(--line); }
.saved-count {
  position: absolute; top: 1px; right: 1px;
  min-width: 15px; height: 15px; padding: 0 3px;
  background: var(--brick); color: #fff;
  font-size: 9.5px; font-weight: 700; line-height: 15px; text-align: center;
  border-radius: 999px;
}
.saved-count:empty { display: none; }

.sections {
  position: sticky; top: 0; z-index: 40;
  background: var(--paper-2);
  border-top: 1px solid var(--ink);
}
.sections .wrap {
  display: flex; align-items: center; gap: 24px;
  height: 50px;
  overflow-x: auto;
  scrollbar-width: none;
}
.sections .wrap::-webkit-scrollbar { display: none; }
.sections a {
  font-size: 11.5px; font-weight: 650; letter-spacing: .13em; text-transform: uppercase;
  color: var(--ink-2); white-space: nowrap;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.sections a:hover { color: var(--brick); }
.sections a[aria-current="page"] { color: var(--brick); border-bottom-color: var(--brick); }

/* ---------------- generic type bits ---------------- */

.kicker {
  font-family: var(--sans);
  font-size: 10.5px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase;
  color: var(--brick);
  display: flex; align-items: center; gap: 10px;
}
.kicker a { color: var(--brick); }
.kicker a:hover { text-decoration: underline; text-underline-offset: 3px; }
.kicker-flag {
  background: var(--brand); color: #fff; padding: 3px 8px 2px; letter-spacing: .13em;
}
.kicker-cream { color: #e8b9a8; }
.kicker-brick { color: var(--brick); }

.dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .5; display: inline-block; }

.byline {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  font-size: 11.5px; font-weight: 550; letter-spacing: .03em; color: var(--muted);
  margin-top: 14px;
}
.byline-sm { font-size: 11px; margin-top: 10px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 42px; padding: 0 18px;
  border: 1px solid var(--ink);
  background: var(--ink); color: var(--paper);
  font-size: 12px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.btn:hover { background: var(--ink-2); border-color: var(--ink-2); }
.btn-sm { height: 34px; padding: 0 13px; font-size: 10.5px; }
.btn-brick { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-brick:hover { background: var(--brick-ink); border-color: var(--brick-ink); }

/* ---------------- lead ---------------- */

.lead-wrap { padding-top: 26px; }

.lead-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.62fr) minmax(0, 1fr);
  border-bottom: 1px solid var(--rule);
}

.lead { padding-right: 34px; padding-bottom: 34px; }
.lead-img { display: block; overflow: hidden; background: var(--paper-3); margin-bottom: 22px; }
.lead-img img { width: 100%; aspect-ratio: 16 / 9.4; object-fit: cover; transition: transform .8s ease; }
.lead:hover .lead-img img { transform: scale(1.015); }
.lead h1 {
  font-family: var(--display);
  font-size: clamp(34px, 4.4vw, 55px);
  font-weight: 560;
  line-height: 1.02;
  letter-spacing: -.022em;
  margin: 14px 0 0;
  text-wrap: balance;
}
.lead h1 a:hover { color: var(--brick-ink); }
.lead-dek {
  font-family: var(--serif);
  font-size: clamp(17px, 1.7vw, 20px);
  line-height: 1.45;
  color: var(--ink-2);
  margin-top: 16px;
  max-width: 52ch;
}

/* latest column */

.latest { padding: 0 0 26px 34px; border-left: 1px solid var(--line); }
.latest h2 {
  font-family: var(--sans);
  font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  padding-bottom: 9px; margin-bottom: 2px;
  border-bottom: 1px solid var(--ink);
}
.latest ol { list-style: none; padding: 0; margin: 0; }
.latest li {
  display: grid; grid-template-columns: 26px 1fr; gap: 8px;
  padding: 15px 0; border-bottom: 1px solid var(--line);
}
.latest-n {
  font-family: var(--serif); font-size: 19px; line-height: 1.1;
  color: var(--rule); font-variant-numeric: tabular-nums;
}
.latest-kicker {
  font-size: 9.5px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase;
  color: var(--brick); margin-bottom: 4px;
}
.latest h3 {
  font-family: var(--display);
  font-size: 18px; font-weight: 560; line-height: 1.24; letter-spacing: -.005em;
}
.latest h3 a:hover { color: var(--brick-ink); }
.latest-meta { font-size: 10.5px; color: var(--muted); letter-spacing: .04em; margin-top: 6px; }
.latest-more {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 16px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase;
  color: var(--brick);
}
.latest-more:hover { gap: 12px; }

.latest-sub { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 16px; }
.ls-label {
  font-size: 9.5px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase;
  color: var(--brick);
}
.latest-sub p { font-family: var(--serif); font-size: 14.5px; line-height: 1.45; color: var(--ink-2); margin: 6px 0 10px; }
.latest-sub input {
  width: 100%; height: 38px; padding: 0 10px;
  border: 1px solid var(--rule); background: var(--paper);
  font-family: var(--sans); font-size: 13px; color: var(--ink);
}
.latest-sub input:focus { outline: none; border-color: var(--ink); }
.latest-sub .btn { width: 100%; height: 38px; justify-content: center; margin-top: 8px; }
.latest-sub .sub-ok { color: var(--ink); }
.latest-sub .sub-ok svg { color: var(--green); }
.latest-sub .sub-ok span { color: var(--ink-2); font-size: 14px; }
.latest-sub .sub-ok em { color: var(--muted); }

/* ---------------- rails & cards ---------------- */

.rail { padding-top: 46px; }
.rail-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 10px; margin-bottom: 24px;
}
.rail-head h2 {
  font-family: var(--display);
  font-size: clamp(21px, 2.2vw, 26px); font-weight: 600; letter-spacing: -.015em;
}
.rail-head a, .rail-note {
  font-size: 10.5px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase;
  color: var(--brick);
}
.rail-note { color: var(--muted); font-weight: 600; }

.grid-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 34px 28px;
}

.card { display: flex; flex-direction: column; }
.card .thumb {
  display: block; overflow: hidden; background: var(--paper-3);
  aspect-ratio: 4 / 3; margin-bottom: 14px;
}
.card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s ease; }
.card:hover .thumb img { transform: scale(1.035); }
.card h3 {
  font-family: var(--display);
  font-size: 21px; font-weight: 560; line-height: 1.22; letter-spacing: -.012em;
  margin: 8px 0 7px;
  text-wrap: pretty;
}
.card h3 a:hover { color: var(--brick-ink); }
.card .dek {
  font-family: var(--serif);
  font-size: 15.5px; line-height: 1.5; color: var(--ink-2);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card .byline { margin-top: auto; padding-top: 12px; }

/* ---------------- topics ---------------- */

.topic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.topic {
  display: flex; flex-direction: column; gap: 6px;
  padding: 22px 22px 24px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: background .15s ease;
}
.topic:hover { background: var(--paper-2); }
.topic-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); }
.topic-count {
  font-size: 9.5px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase;
}
.topic:hover .topic-top svg { color: var(--brick); transform: translateX(3px); }
.topic-top svg { transition: transform .15s ease, color .15s ease; }
.topic h3 {
  font-family: var(--display); font-size: 24px; font-weight: 560; letter-spacing: -.015em;
  margin-top: 6px;
}
.topic p { font-family: var(--serif); font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }

.pill-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  border: 1px solid var(--rule); padding: 7px 13px;
  font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
}
.pill:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---------------- tool band ---------------- */

.band-tool {
  margin-top: 56px;
  border: 1px solid var(--rule);
  background: var(--paper-2);
  padding: 34px 36px;
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
  flex-wrap: wrap;
}
.band-tool-copy { max-width: 62ch; }
.band-tool h2 {
  font-family: var(--display); font-size: clamp(24px, 2.8vw, 34px);
  font-weight: 560; letter-spacing: -.02em; line-height: 1.12;
  margin: 10px 0 10px;
}
.band-tool p { font-family: var(--serif); font-size: 16px; line-height: 1.55; color: var(--ink-2); }

/* ---------------- newsletter ---------------- */

.band-newsletter { margin-top: 64px; background: var(--ink); color: #f3ebdd; padding: 52px 0 56px; }
.band-inner { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: end; }
.band-mark { width: 30px; height: auto; margin-bottom: 12px; }
.band-news-copy h2 {
  font-family: var(--display); font-size: clamp(30px, 3.6vw, 44px);
  font-weight: 500; line-height: 1.03; letter-spacing: -.022em;
  margin: 14px 0 16px;
}
.band-news-copy p { font-family: var(--serif); font-size: 16.5px; line-height: 1.55; color: #cdc2b1; max-width: 42ch; }
.band-news-form { padding-bottom: 4px; }
.sub-row { display: flex; gap: 10px; }
.sub-row input {
  flex: 1; min-width: 0;
  height: 46px; padding: 0 14px;
  background: transparent; color: #f3ebdd;
  border: 1px solid #57493b;
  font-family: var(--sans); font-size: 14px;
}
.sub-row input::placeholder { color: #8d8072; }
.sub-row input:focus { outline: none; border-color: #cdc2b1; }
.sub-row input[aria-invalid="true"] { border-color: #d1785f; }
.sub-row .btn { height: 46px; }
.sub-note { font-size: 11.5px; color: #9d9184; margin-top: 10px; letter-spacing: .02em; }
.sub-ok { display: flex; gap: 12px; align-items: flex-start; color: #f3ebdd; }
.sub-ok svg { color: #8fc7ad; margin-top: 2px; }
.sub-ok strong { display: block; font-size: 15px; margin-bottom: 3px; }
.sub-ok span { display: block; font-family: var(--serif); font-size: 15px; color: #cdc2b1; }
.sub-ok em { display: block; font-family: var(--sans); font-style: normal; font-size: 11px; color: #8d8072; margin-top: 8px; }

/* ---------------- article ---------------- */

.reading-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60;
  background: transparent; pointer-events: none;
}
.reading-progress span { display: block; height: 100%; width: 0; background: var(--brick); transition: width .1s linear; }

.article { padding-bottom: 70px; }
.article .wrap:first-child { padding-top: 24px; }

.crumbs {
  display: flex; align-items: center; gap: 8px;
  font-size: 10.5px; font-weight: 650; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted);
}
.crumbs a:hover { color: var(--brick); }
.crumbs .sep { color: var(--rule); }

.article-head { max-width: 880px; padding: 26px 0 0; }
.article-head h1 {
  font-family: var(--display);
  font-size: clamp(30px, 4.6vw, 54px);
  font-weight: 560; line-height: 1.03; letter-spacing: -.024em;
  margin: 14px 0 18px;
  text-wrap: balance;
}
.article-dek {
  font-family: var(--serif);
  font-size: clamp(18px, 2vw, 22px); line-height: 1.45; color: var(--ink-2);
  max-width: 60ch;
}
.article-meta {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 14px 0; margin-top: 26px;
}
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--brick-soft); color: var(--brick-ink);
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700; letter-spacing: .02em;
  flex: none;
}
.meta-name { font-size: 13px; font-weight: 650; }
.meta-sub, .meta-when {
  font-size: 11.5px; color: var(--muted); letter-spacing: .03em;
  display: flex; align-items: center; gap: 8px;
}
.meta-when { margin-left: 4px; }
.meta-actions { margin-left: auto; display: flex; gap: 8px; }
.save-btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 34px; padding: 0 12px;
  border: 1px solid var(--rule); background: transparent;
  font-size: 11px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase;
  cursor: pointer;
}
.save-btn:hover { border-color: var(--ink); }
.save-btn.is-on { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.article-hero { margin-top: 30px; }
.article-hero img { width: 100%; aspect-ratio: 16 / 7.4; object-fit: cover; background: var(--paper-3); }
.article-hero figcaption {
  font-size: 11.5px; color: var(--muted); padding-top: 9px; letter-spacing: .02em;
}

.article-body { max-width: 716px; margin: 42px auto 0; }
.article-body p {
  font-family: var(--serif);
  font-size: 19.5px; line-height: 1.68; color: var(--ink);
  margin-bottom: 22px;
}
.article-body p a { color: var(--brick); text-decoration: underline; text-underline-offset: 2px; }
.article-body > p:first-of-type::first-letter {
  float: left;
  font-family: var(--display);
  font-size: 66px; line-height: .8; font-weight: 600;
  padding: 8px 12px 0 0;
  color: var(--brick);
}
.article-body h2 {
  font-family: var(--display);
  font-size: clamp(23px, 2.6vw, 28px); font-weight: 600; letter-spacing: -.015em; line-height: 1.2;
  margin: 38px 0 12px;
}
.article-body ul, .article-body ol {
  font-family: var(--serif);
  font-size: 18.5px; line-height: 1.62;
  padding-left: 22px; margin: 0 0 24px;
}
.article-body li { margin-bottom: 9px; }
.article-body li::marker { color: var(--brick); }
.article-body strong { font-weight: 600; }
.article-body em { font-style: italic; }
.article-body blockquote {
  font-family: var(--display);
  font-size: clamp(21px, 2.5vw, 26px); font-weight: 500; line-height: 1.28; letter-spacing: -.012em;
  border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink);
  padding: 22px 0; margin: 34px 0;
  text-wrap: pretty;
}
.article-body blockquote::before { content: "“"; color: var(--brick); }
.article-body blockquote::after { content: "”"; color: var(--brick); }

.callout {
  border: 1px solid var(--rule);
  background: var(--paper-2);
  padding: 20px 22px;
  margin: 30px 0;
}
.callout .c-label {
  font-size: 10px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase;
  color: var(--brick); margin-bottom: 10px;
}
.callout ul { margin: 0; padding-left: 20px; font-size: 17.5px; line-height: 1.5; }
.callout li { margin-bottom: 6px; }
.callout li:last-child { margin-bottom: 0; }
.callout p { font-size: 16.5px; line-height: 1.55; margin: 0; }
.callout-warn { background: var(--brick-soft); border-color: #dfb9a9; }
.callout-warn p { font-size: 16.5px; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 32px 0 0; }
.tag {
  font-size: 11px; font-weight: 600; letter-spacing: .05em;
  border: 1px solid var(--rule); padding: 5px 10px;
  color: var(--ink-2);
}

.refs { border-top: 1px solid var(--line); margin-top: 32px; padding-top: 16px; }
.refs h3 {
  font-size: 10px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 10px;
}
.refs ul { list-style: none; padding: 0; margin: 0; }
.refs li {
  font-family: var(--serif); font-size: 14.5px; line-height: 1.5; color: var(--ink-2);
  padding-left: 14px; position: relative; margin-bottom: 6px;
}
.refs li::before { content: "—"; position: absolute; left: 0; color: var(--rule); }

.disclaimer {
  margin-top: 26px;
  border: 1px dashed var(--rule);
  padding: 16px 18px;
  font-family: var(--serif);
  font-size: 14px; line-height: 1.6; color: var(--ink-2);
}
.disclaimer strong { font-family: var(--sans); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); display: block; margin-bottom: 4px; }

.next-up {
  display: grid; grid-template-columns: 240px 1fr; gap: 26px;
  align-items: center;
  border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line);
  padding: 26px 0; margin-top: 56px;
}
.next-thumb img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.next-text h2 {
  font-family: var(--display); font-size: clamp(21px, 2.4vw, 27px);
  font-weight: 560; letter-spacing: -.015em; line-height: 1.16;
  margin: 8px 0 8px;
}
.next-text .dek {
  font-family: var(--serif); font-size: 15.5px; line-height: 1.5; color: var(--ink-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.next-link {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 12px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: var(--brick);
}
.next-up:hover .next-link { gap: 13px; }
.related { padding-top: 46px; }

/* ---------------- category / search / saved ---------------- */

.cat-head { padding-top: 32px; padding-bottom: 30px; border-bottom: 1px solid var(--ink); }
.cat-head h1, .search-head h1, .about-head h1 {
  font-family: var(--display);
  font-size: clamp(32px, 4.6vw, 52px); font-weight: 560; letter-spacing: -.024em; line-height: 1.04;
  margin: 16px 0 12px;
}
.cat-head p { font-family: var(--serif); font-size: 18px; line-height: 1.5; color: var(--ink-2); max-width: 56ch; }
.cat-count {
  display: inline-block; margin-top: 16px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: var(--muted);
}

.search-head { padding-top: 32px; padding-bottom: 26px; }
.search-box {
  display: flex; align-items: center; gap: 12px;
  border-bottom: 2px solid var(--ink);
  padding: 10px 0; margin-top: 22px; max-width: 720px;
  color: var(--muted);
}
.search-box input {
  flex: 1; min-width: 0; border: 0; background: transparent; outline: none;
  font-family: var(--serif); font-size: clamp(20px, 2.4vw, 26px); color: var(--ink);
  padding: 4px 0;
}
.search-box input::placeholder { color: var(--rule); }
.search-status { margin-top: 14px; font-size: 11.5px; letter-spacing: .06em; color: var(--muted); }

.empty-state {
  border: 1px dashed var(--rule); padding: 40px 24px; text-align: center;
  grid-column: 1 / -1;
}
.empty-state p { font-family: var(--serif); font-size: 18px; margin-bottom: 16px; color: var(--ink-2); }

/* ---------------- tools ---------------- */

.tool-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; }
.tool-card {
  border: 1px solid var(--rule); background: var(--paper-2);
  padding: 28px 30px 26px;
}
.tool-card h2 {
  font-family: var(--display); font-size: 28px; font-weight: 560; letter-spacing: -.018em;
  margin: 10px 0 8px;
}
.tool-copy { font-family: var(--serif); font-size: 15.5px; line-height: 1.55; color: var(--ink-2); margin-bottom: 20px; }
.tool-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.field label {
  display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 6px;
}
.field input {
  width: 100%; height: 44px; padding: 0 12px;
  border: 1px solid var(--rule); background: var(--paper);
  font-family: var(--sans); font-size: 15px; color: var(--ink);
}
.field input:focus { outline: none; border-color: var(--ink); }
.tool-result { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 18px; }
.result-line { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.result-num {
  font-family: var(--display); font-size: 48px; font-weight: 600; line-height: 1; letter-spacing: -.02em;
}
.result-cat { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.result-ok { color: var(--green); }
.result-warn { color: #8a5a12; }
.result-bad { color: var(--brick); }
.gauge {
  position: relative; display: flex; height: 8px; margin: 18px 0 6px;
}
.gauge-seg { display: block; height: 100%; }
.s1 { width: 14%; background: #d9c9a8; }
.s2 { width: 18%; background: #95b39a; }
.s3 { width: 18%; background: #d3a45f; }
.s4 { width: 50%; background: #c07a63; }
.gauge-mark {
  position: absolute; top: -5px; width: 3px; height: 18px; background: var(--ink);
  transform: translateX(-1.5px);
}
.gauge-labels { position: relative; height: 13px; font-size: 9.5px; color: var(--muted); letter-spacing: .04em; }
.gauge-labels span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.gauge-labels span:first-child { transform: none; }
.gauge-labels span:last-child { transform: translateX(-100%); }
.result-note { font-family: var(--serif); font-size: 15px; line-height: 1.5; color: var(--ink-2); margin-top: 14px; }
.tool-note { font-size: 11px; line-height: 1.5; color: var(--muted); margin-top: 18px; border-top: 1px solid var(--line); padding-top: 12px; }

/* ---------------- about ---------------- */

.about-head { padding-top: 32px; padding-bottom: 34px; border-bottom: 1px solid var(--ink); }
.about-lede {
  font-family: var(--serif); font-size: clamp(19px, 2.2vw, 23px); line-height: 1.45;
  color: var(--ink-2); max-width: 60ch; margin-top: 6px;
}
.about-body { padding-top: 40px; }
.about-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 46px; }
.about-grid h2, .about-note h2, .about-cta h2 {
  font-family: var(--display); font-size: 26px; font-weight: 600; letter-spacing: -.015em; margin-bottom: 12px;
}
.about-grid p, .about-note p, .about-cta p {
  font-family: var(--serif); font-size: 17.5px; line-height: 1.62; color: var(--ink-2); margin-bottom: 14px;
}
.about-list { list-style: none; padding: 0; margin: 0; }
.about-list li {
  font-family: var(--serif); font-size: 16.5px; line-height: 1.55; color: var(--ink-2);
  border-top: 1px solid var(--line); padding: 12px 0;
}
.about-list strong { font-family: var(--sans); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); display: block; margin-bottom: 3px; }
.about-note { border: 1px solid var(--rule); background: var(--paper-2); padding: 24px 26px; margin-top: 40px; }
.about-note p { margin-bottom: 0; font-size: 16px; }
.about-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 26px; flex-wrap: wrap;
  border-top: 1px solid var(--ink); margin-top: 40px; padding-top: 26px;
}
.about-cta h2 { font-size: 24px; margin-bottom: 4px; }
.about-cta p { margin-bottom: 0; }

/* ---------------- footer ---------------- */

.site-foot { background: var(--ink); color: #e9e0d1; padding-top: 52px; margin-top: 64px; }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 36px; padding-bottom: 36px; }
.foot-logo { display: block; width: 158px; height: auto; }
.foot-logo-link:hover { opacity: .82; }
.foot-brand p {
  font-family: var(--serif); font-size: 14.5px; line-height: 1.55; color: #b2a696;
  margin: 12px 0 16px; max-width: 32ch;
}
.foot-social { display: flex; gap: 14px; }
.foot-social a {
  font-size: 10.5px; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; color: #e9e0d1;
  border-bottom: 1px solid #57493b; padding-bottom: 2px;
}
.foot-social a:hover { color: #fff; border-color: #e9e0d1; }
.foot-col h4 {
  font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: #8d8072; margin-bottom: 12px;
}
.foot-col a, .foot-note {
  display: block; font-family: var(--serif); font-size: 14.5px; color: #cdc2b1;
  padding: 3px 0; line-height: 1.5;
}
.foot-col a:hover { color: #fff; }
.foot-note { font-size: 12px; color: #8d8072; margin-top: 8px; }
.foot-base {
  display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  border-top: 1px solid #3a3029; padding-top: 18px; padding-bottom: 22px;
  font-size: 10.5px; color: #8d8072; letter-spacing: .04em;
}

/* ---------------- toast ---------------- */

.toast {
  position: fixed; left: 50%; bottom: 26px;
  transform: translate(-50%, 14px);
  background: var(--ink); color: var(--paper);
  font-size: 12.5px; font-weight: 550; letter-spacing: .02em;
  padding: 11px 16px;
  border: 1px solid #3a3029;
  opacity: 0; pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  max-width: min(90vw, 440px);
  z-index: 70;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------------- responsive ---------------- */

@media (max-width: 1080px) {
  .lead-grid { grid-template-columns: minmax(0, 1fr); }
  .lead { padding-right: 0; }
  .latest { border-left: 0; border-top: 1px solid var(--line); padding: 24px 0 0; }
  .latest ol { display: grid; grid-template-columns: 1fr 1fr; gap: 0 26px; }
  .latest li:nth-child(1), .latest li:nth-child(2) { border-top: 1px solid var(--line); }
  .grid-cards { gap: 30px 22px; }
  .band-inner { grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: start; }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
}

@media (max-width: 820px) {
  .wrap { padding: 0 18px; }
  .masthead-top { grid-template-columns: 1fr auto; gap: 10px; padding-top: 16px; padding-bottom: 14px; }
  .mast-date { display: none; }
  .mast-brand { text-align: left; }
  .brand-logo { width: 132px; margin: 0; }
  .mast-tag { font-size: 11.5px; margin-top: 4px; }
  .mast-actions .btn { display: none; }
  .sections .wrap { height: 46px; gap: 18px; }
  .sections a { font-size: 10.5px; }
  .sections .wrap {
    -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 30px), transparent 100%);
    mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 30px), transparent 100%);
  }

  .lead-wrap { padding-top: 18px; }
  .lead { padding-bottom: 24px; }
  .lead-img img { aspect-ratio: 4 / 3; }
  .latest ol { grid-template-columns: minmax(0, 1fr); }
  .latest li:nth-child(2) { border-top: 1px solid var(--line); }

  .grid-cards { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .card .thumb { aspect-ratio: 16 / 10; }
  .card h3 { font-size: 22px; }
  .topic-grid { grid-template-columns: minmax(0, 1fr); }
  .band-tool { padding: 24px; }
  .band-newsletter { padding: 38px 0 42px; }
  .band-news-copy h2 br { display: none; }

  .article .wrap:first-child { padding-top: 16px; }
  .article-head { padding-top: 18px; }
  .article-meta { gap: 10px; }
  .meta-when { order: 5; margin-left: 0; width: 100%; }
  .meta-actions { margin-left: 0; order: 6; width: 100%; }
  .save-btn { flex: 1; justify-content: center; }
  .article-hero img { aspect-ratio: 4 / 3; }
  .article-body { margin-top: 28px; }
  .article-body p { font-size: 18.5px; line-height: 1.66; }
  .article-body > p:first-of-type::first-letter { font-size: 56px; }
  .next-up { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .next-thumb img { aspect-ratio: 16 / 9; }

  .tool-grid { grid-template-columns: minmax(0, 1fr); }
  .about-grid { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .foot-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 26px; }
  .foot-base { flex-direction: column; gap: 6px; }
}

@media (max-width: 520px) {
  .sub-row { flex-direction: column; }
  .sub-row .btn { width: 100%; }
  .tool-fields { grid-template-columns: minmax(0, 1fr); }
  .article-body p { font-size: 18px; }
  .result-num { font-size: 40px; }
  .foot-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .001ms !important; animation-duration: .001ms !important; scroll-behavior: auto !important; }
}

@media print {
  .masthead, .site-foot, .band-newsletter, .next-up, .related, .reading-progress, .meta-actions, .toast { display: none !important; }
  body { background: #fff; }
  .article { padding: 0; }
  .wrap { padding: 0; max-width: none; }
  .article-body { max-width: none; }
  .article-body p, .article-body li { font-size: 11.5pt; }
}
