/* TangognaT: paper, ink and a red spine. Fonts: Frank Ruhl Libre (headings), Literata (text), Shantell Sans (labels). */
@font-face { font-family: "Frank Ruhl Libre"; src: url("/s/fonts/frank-ruhl-libre-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Frank Ruhl Libre"; src: url("/s/fonts/frank-ruhl-libre-latin-900-normal.woff2") format("woff2"); font-weight: 900; font-display: swap; }
@font-face { font-family: "Literata"; src: url("/s/fonts/literata-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Literata"; src: url("/s/fonts/literata-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Literata"; src: url("/s/fonts/literata-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Shantell Sans"; src: url("/s/fonts/shantell-sans-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Shantell Sans"; src: url("/s/fonts/shantell-sans-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --paper: #FBF6EE; --paper2: #F3EADB; --card: #FFFDF8; --ink: #1F2340; --ink2: #464A66; --muted: #6E6878;
  --red: #CC3F26; --red-ink: #A8301B; --teal: #1D7A74; --gold: #E2AA3C; --line: #E2D6C2; --dot: #EADFCD;
  --ok: #2F7D4E; --bad: #B3261E;
  --serif: "Literata", Georgia, "Times New Roman", serif;
  --head: "Frank Ruhl Libre", Georgia, serif;
  --hand: "Shantell Sans", "Comic Sans MS", system-ui, sans-serif;
  --r: 10px; --shadow: 3px 3px 0 var(--ink);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #17161D; --paper2: #201F28; --card: #1F1E27; --ink: #EFE8DC; --ink2: #CFC7BA; --muted: #A49DAF;
    --red: #F0735A; --red-ink: #F58B75; --teal: #5CC2B9; --gold: #E9B95A; --line: #36343F; --dot: #2A2833;
    --ok: #6FCF97; --bad: #FF8A80; --shadow: 3px 3px 0 #000;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.65 var(--serif); overflow-wrap: break-word; }
img, svg { max-width: 100%; height: auto; }
a { color: var(--red-ink); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--head); font-weight: 900; line-height: 1.15; letter-spacing: -.01em; margin: 1.6em 0 .5em; }
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.1rem); margin-top: .2em; }
h2 { font-size: clamp(1.45rem, 1.2rem + 1vw, 1.9rem); }
h3 { font-size: 1.2rem; font-weight: 700; }
p, ul, ol { margin: 0 0 1em; }
code { font-size: .92em; background: var(--paper2); padding: .1em .3em; border-radius: 4px; }
cite { font-style: italic; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.narrow, .narrow-block { max-width: 760px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper); padding: .5em 1em; z-index: 10; }
.skip:focus { left: 8px; top: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sub { color: var(--muted); font-size: .9em; }
.hint { color: var(--muted); font-size: .94rem; }
.fine { color: var(--muted); font-size: .86rem; }
.kicker { font-family: var(--hand); font-weight: 700; color: var(--red-ink); letter-spacing: .02em; margin: 0 0 .4em; }
.kicker a { color: inherit; text-decoration: none; }

/* masthead */
.masthead { border-bottom: 3px solid var(--ink); background: var(--paper); position: relative; z-index: 5; }
.mast-in { display: flex; align-items: center; gap: 16px; min-height: 66px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand-name, .foot-brand { font-family: var(--head); font-weight: 900; font-size: 1.5rem; letter-spacing: -.01em; }
.brand-name span, .foot-brand span { color: var(--red); }
.menu-btn { display: none; margin-left: auto; font: 700 1rem var(--hand); background: var(--card); color: var(--ink); border: 2px solid var(--ink); border-radius: 8px; padding: .35em .9em; box-shadow: var(--shadow); cursor: pointer; }
.nav { margin-left: auto; }
.nav ul { display: flex; gap: 4px 18px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.nav a { font-family: var(--hand); font-weight: 500; color: var(--ink); text-decoration: none; padding: .3em 0; border-bottom: 3px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--red); }
@media (max-width: 820px) {
  .menu-btn { display: inline-block; }
  .nav { display: none; width: 100%; margin: 0 0 12px; }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; gap: 2px; }
  .nav a { display: block; padding: .5em 0; border-bottom: 1px solid var(--line); }
}

/* hero */
.hero { background: radial-gradient(var(--dot) 1.6px, transparent 1.7px) 0 0 / 14px 14px, var(--paper2); border-bottom: 3px solid var(--ink); padding: 36px 0 44px; }
.hero-in { display: grid; grid-template-columns: 1.5fr 1fr; gap: 32px; align-items: center; }
.lede { font-size: 1.15rem; color: var(--ink2); max-width: 46em; }
.hero-panel { position: relative; height: 260px; border: 3px solid var(--ink); background: var(--card); box-shadow: 6px 6px 0 var(--ink); display: flex; align-items: flex-end; gap: 10px; padding: 0 24px 18px; }
.sp { display: block; width: 34px; border: 2px solid var(--ink); border-bottom: 0; }
.sp1 { height: 150px; background: var(--red); } .sp2 { height: 120px; background: var(--teal); } .sp3 { height: 170px; background: var(--gold); }
.sp4 { height: 105px; background: var(--ink2); } .sp5 { height: 140px; background: var(--red); transform: rotate(8deg); transform-origin: bottom left; }
.bubble { position: absolute; top: 22px; right: 18px; max-width: 60%; font: 700 1.05rem/1.3 var(--hand); background: var(--paper); border: 2px solid var(--ink); border-radius: 18px; padding: .6em .9em; }
.bubble::after { content: ""; position: absolute; left: 24px; bottom: -12px; border: 12px solid transparent; border-top-color: var(--ink); border-bottom: 0; }
@media (max-width: 820px) { .hero-in { grid-template-columns: 1fr; } .hero-panel { height: 190px; } .sp1 { height: 110px; } .sp3 { height: 120px; } }

/* buttons, fields */
.btn { display: inline-block; font: 700 1rem var(--hand); background: var(--red); color: #fff; border: 2px solid var(--ink); border-radius: 8px; padding: .5em 1.05em; box-shadow: var(--shadow); text-decoration: none; cursor: pointer; }
.btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.btn.ghost { background: var(--card); color: var(--ink); }
.btn.small { font-size: .9rem; padding: .35em .8em; }
.btn.danger { color: var(--bad); }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--red-ink); text-decoration: underline; cursor: pointer; text-align: left; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.fld { display: flex; flex-direction: column; gap: 4px; margin: 0 0 12px; min-width: 0; }
.fld > span { font: 500 .9rem var(--hand); color: var(--ink2); }
input, select, textarea { font: inherit; font-size: 1rem; color: var(--ink); background: var(--paper); border: 2px solid var(--ink2); border-radius: 8px; padding: .45em .6em; max-width: 100%; min-width: 0; }
textarea { resize: vertical; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.card { background: var(--card); border: 2px solid var(--ink); border-radius: var(--r); box-shadow: var(--shadow); padding: 20px; }

/* sections */
.sec { margin: 48px 0; }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.sec-head h2 { margin-bottom: .3em; }
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: s; }
.steps li { counter-increment: s; background: var(--card); border: 2px solid var(--ink); border-radius: var(--r); padding: 18px; position: relative; }
.steps li::before { content: counter(s); position: absolute; top: -16px; left: 14px; font: 700 1rem/30px var(--hand); width: 32px; height: 32px; text-align: center; background: var(--gold); color: #1F2340; border: 2px solid var(--ink); border-radius: 50%; }
.steps h3 { margin-top: .4em; }
.tool-grid, .topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.tool-card, .topic-card { display: block; background: var(--card); color: var(--ink); text-decoration: none; border: 2px solid var(--ink); border-radius: var(--r); padding: 16px 18px; box-shadow: var(--shadow); }
.tool-card:hover, .topic-card:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.tool-card h3, .topic-card h3, .tool-card h2 { margin: .3em 0; font-size: 1.15rem; }
.tool-card p, .topic-card p { color: var(--ink2); font-size: .96rem; margin: 0 0 .4em; }
.tool-mark { display: inline-block; font: 700 1rem var(--hand); color: #fff; background: var(--teal); border-radius: 6px; padding: .1em .5em; }
.topic-card { border-top: 8px solid var(--red); }
.topic-card:nth-child(2n) { border-top-color: var(--teal); } .topic-card:nth-child(3n) { border-top-color: var(--gold); }
.post-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.post-list a { display: block; height: 100%; background: var(--card); color: var(--ink); text-decoration: none; border: 1px solid var(--line); border-left: 6px solid var(--red); border-radius: 6px; padding: 14px 16px; }
.post-list a:hover { border-color: var(--ink); border-left-color: var(--red); }
.post-list h2, .post-list h3 { font-size: 1.15rem; margin: .2em 0 .4em; }
.post-list p { color: var(--ink2); font-size: .95rem; margin: 0 0 .5em; }
.pl-k { font: 700 .82rem var(--hand); color: var(--teal); }
.pl-m { font-size: .82rem; color: var(--muted); }
.jump { display: flex; gap: 8px 14px; flex-wrap: wrap; font-family: var(--hand); }
.links { padding-left: 1.2em; }
.links li { margin: .3em 0; }
.table-wrap { overflow-x: auto; margin: 0 0 1.2em; border: 1px solid var(--line); border-radius: 8px; background: var(--card); }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; vertical-align: top; padding: .55em .75em; border-bottom: 1px solid var(--line); }
th { font-family: var(--hand); font-weight: 700; background: var(--paper2); }
tbody tr:last-child td { border-bottom: 0; }

/* article */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; padding: 0; margin: 18px 0 8px; font: 500 .9rem var(--hand); color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 4px; color: var(--line); }
.crumbs a { color: var(--ink2); }
.art-head { margin: 10px 0 24px; max-width: 820px; }
.byline { color: var(--muted); font-size: .92rem; }
.byline a { color: inherit; }
.art-grid { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 40px; align-items: start; }
.art-main { max-width: 760px; min-width: 0; }
.side { position: sticky; top: 16px; display: grid; gap: 18px; }
.side-h { font: 700 .95rem var(--hand); margin: 0 0 .5em; }
.toc ol { padding-left: 1.1em; font-size: .92rem; margin: 0; }
.toc li { margin: .25em 0; }
.side-box { background: var(--card); border: 2px solid var(--ink); border-radius: var(--r); padding: 14px 16px; }
.side-t { font-family: var(--head); font-weight: 700; font-size: 1.1rem; margin: 0 0 .3em; }
@media (max-width: 920px) { .art-grid { grid-template-columns: 1fr; } .side { position: static; } }
.answer, .takeaways { border: 2px solid var(--ink); border-radius: 18px; padding: 14px 18px; margin: 0 0 18px; background: var(--card); position: relative; }
.answer { background: var(--paper2); }
.answer::after { content: ""; position: absolute; left: 34px; bottom: -14px; border: 12px solid transparent; border-top-color: var(--ink); border-bottom: 0; }
.answer-h { font: 700 .95rem var(--hand); color: var(--red-ink); margin: 0 0 .3em; }
.answer p:last-child, .takeaways ul { margin-bottom: 0; }
.prose h2 { padding-top: .2em; border-top: 2px dotted var(--line); }
.prose h2 + p strong:first-child { color: var(--ink); }
.prose blockquote { margin: 1em 0; padding: .4em 1em; border-left: 4px solid var(--teal); color: var(--ink2); }
.prose li { margin: .25em 0; }
.bookbox th { white-space: nowrap; }
.faq details { border: 1px solid var(--line); border-radius: 8px; background: var(--card); margin: 0 0 8px; padding: 0 14px; }
.faq summary { cursor: pointer; font-weight: 600; padding: 10px 0; }
.faq details p { margin: 0 0 12px; }
.sources ul { font-size: .94rem; padding-left: 1.2em; }
.share-links { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: 28px 0; padding-top: 14px; border-top: 2px solid var(--ink); font-family: var(--hand); }
.share-links > span:first-child { font-weight: 700; }
.copied { color: var(--ok); font-size: .9rem; }
.more { margin-top: 36px; }
.arch { padding-left: 1.1em; }
.arch li { margin: .35em 0; }
.arch .sub { font-size: .8rem; word-break: break-all; }

/* tools */
.tool-head { max-width: 820px; margin: 10px 0 20px; }
.local { font: 500 .92rem var(--hand); color: var(--ink2); display: flex; align-items: center; gap: 8px; }
.dot-ok { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); display: inline-block; }
.tool { margin: 0 0 30px; }
.tool-row { display: flex; flex-wrap: wrap; gap: 0 16px; }
.tool-row .fld { flex: 1 1 200px; }
.tool-row .fld.grow { flex: 2 1 260px; }
.sugg { list-style: none; padding: 0; margin: 0 0 8px; }
.sugg li { margin: .2em 0; }
.none { color: var(--muted); font-style: italic; }
.out h3 { margin-top: .6em; }
.books { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin: 0; }
.book { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; }
.book p { margin: 0 0 .35em; }
.book-t { font-family: var(--head); font-size: 1.08rem; }
.book-m { font-size: .85rem; color: var(--muted); }
.book-why { font-size: .95rem; }
.book-l { font-size: .9rem; }
.chip { display: inline-block; font: 700 .75rem var(--hand); background: var(--teal); color: #fff; border-radius: 99px; padding: .05em .6em; margin-right: 6px; }
.note-box { background: var(--paper2); border-left: 5px solid var(--gold); padding: .6em .9em; border-radius: 4px; }
.rl-form { display: flex; flex-wrap: wrap; gap: 0 14px; align-items: flex-end; }
.rl-form .fld { flex: 1 1 190px; }
.rl-form .fld.grow { flex: 2 1 240px; }
.rl-form .fld.small { flex: 0 1 130px; }
.rl-form .btn { margin-bottom: 12px; }
.msg { min-height: 1.4em; font: 500 .95rem var(--hand); color: var(--teal); }
.rl-stats { display: flex; flex-wrap: wrap; gap: 0 18px; align-items: flex-end; }
.rl-stats .fld { width: 130px; }
.stat { font-family: var(--hand); margin: 0 0 14px; }
.stat span { font: 900 1.6rem var(--head); color: var(--red); }
.progress { height: 16px; border: 2px solid var(--ink); border-radius: 99px; background: var(--paper); overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: repeating-linear-gradient(45deg, var(--red) 0 8px, var(--red-ink) 8px 16px); }
.months { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; height: 90px; align-items: end; margin: 12px 0 18px; }
.months li { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; text-align: center; }
.mbar { display: block; background: var(--teal); border-radius: 3px 3px 0 0; min-height: 2px; }
.ml { font: 500 .75rem var(--hand); color: var(--muted); }
.rl-table td.num { text-align: right; }
.ro-list { list-style: none; padding: 0; columns: 2 240px; gap: 18px; }
.ro-list li { display: flex; gap: 8px; align-items: flex-start; padding: .3em 0; break-inside: avoid; }
.ro-list input { margin-top: .35em; width: 1.1em; height: 1.1em; }
.ro-ed { font-size: .95rem; }
.tool-body { max-width: 760px; }
.tool-frame h2 { margin-top: 0; }

/* X section */
.xsec { margin: 48px 0; padding: 22px; border: 3px solid var(--ink); border-radius: var(--r); background: radial-gradient(var(--dot) 1.4px, transparent 1.5px) 0 0 / 12px 12px, var(--paper2); }
.xsec h2 { margin-top: 0; }
.x-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
.x-grid > *, .fld select { min-width: 0; }
.fld select, .fld textarea, .fld input { width: 100%; }
.x-tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; }
.x-tags a { display: inline-block; font: 700 .95rem var(--hand); background: var(--card); color: var(--ink); border: 2px solid var(--ink); border-radius: 99px; padding: .2em .8em; text-decoration: none; }
.x-tips { padding-left: 1.2em; }
.count-badge { font: 700 .95rem var(--hand); background: var(--paper); border: 2px solid var(--ink2); border-radius: 99px; padding: .2em .7em; }
.count-badge.over { color: var(--bad); border-color: var(--bad); }
@media (max-width: 820px) { .x-grid, .steps { grid-template-columns: minmax(0, 1fr); } .steps { gap: 26px; } }

/* footer */
.foot { margin-top: 64px; border-top: 3px solid var(--ink); background: var(--paper2); padding: 32px 0 18px; font-size: .95rem; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 24px; }
.foot ul { list-style: none; padding: 0; margin: 0; }
.foot li { margin: .3em 0; }
.foot a { color: var(--ink2); }
.foot-h { font: 700 1rem var(--hand); margin: 0 0 .4em; }
.foot-base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; border-top: 1px solid var(--line); margin-top: 22px; padding-top: 14px; color: var(--muted); font-size: .88rem; }
@media (max-width: 820px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-about { grid-column: 1 / -1; } }
@media print { .masthead, .foot, .side, .share-links, .tool, .menu-btn { display: none; } body { background: #fff; color: #000; } }
