/* PayDecoded — light product style.
   Type: Mona Sans (variable, self-hosted). Colour: ink navy, slate secondary text, brand gradient teal → blue → violet.
   Signature: gradient ribbon, two-tone headlines, product-UI illustrations, colourful guide covers. */

@font-face { font-family: "Mona Sans"; src: url("fonts/mona-sans.woff2") format("woff2"); font-weight: 200 900;
  font-stretch: 75% 125%; font-style: normal; font-display: swap; }

:root {
  --ink: #0B1B33;
  --slate: #53627C;
  --mute: #6B7A93;
  --line: #E6EAF1;
  --bg: #F7F9FC;
  --white: #FFFFFF;
  --teal: #0FB5A6;
  --blue: #2F6BFF;
  --blue-ink: #1F55E0;
  --violet: #7A4DFF;
  --red: #C0362C;
  --red-wash: #FDECEA;
  --focus: #2F6BFF;
  --shadow-sm: 0 1px 1px rgba(11, 27, 51, .04), 0 10px 28px -14px rgba(11, 27, 51, .28);
  --shadow-lg: 0 30px 60px -24px rgba(11, 27, 51, .42), 0 0 0 1px rgba(11, 27, 51, .05);
  --sans: "Mona Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --wrap: 74rem;
  --measure: 42rem;
  --brand-gradient: linear-gradient(90deg, #0FB5A6, #2F6BFF 55%, #7A4DFF);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 5rem; }
body { margin: 0; background: var(--white); color: var(--ink); font: 400 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; }
img, svg { max-width: 100%; }
a { color: var(--blue-ink); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.12; text-wrap: balance; margin-top: 0; }
p, li { text-wrap: pretty; }
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; position: relative; }
.skip { position: absolute; left: 1rem; top: -4rem; background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: 10px; z-index: 60; }
.skip:focus { top: 1rem; }

/* ---------------------------------------------------------------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; font: 600 .9rem/1 var(--sans);
  color: #fff; background: var(--ink); border: 0; border-radius: 999px; padding: .7rem 1.05rem; text-decoration: none; cursor: pointer;
  transition: box-shadow .15s ease, background .15s; }
.btn:hover { box-shadow: 0 8px 20px -10px rgba(11, 27, 51, .6); text-decoration: none; }
.btn-blue { background: var(--blue); }
.btn-blue:hover { background: var(--blue-ink); }

/* ---------------------------------------------------------------- header */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(255, 255, 255, .82); backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header-row { display: flex; align-items: center; gap: 2rem; min-height: 4.4rem; }
.brand { display: inline-flex; align-items: center; gap: .4rem; color: var(--ink); text-decoration: none; font-weight: 700;
  font-size: 1.22rem; letter-spacing: -.02em; }
.brand-mark { width: 1.9rem; height: 1.9rem; flex: none; }
.site-nav { display: flex; align-items: center; gap: 1.5rem; flex: 1; }
.site-nav ul { display: flex; gap: .2rem; list-style: none; margin: 0; padding: 0; }
.site-nav ul a { display: block; padding: .45rem .7rem; border-radius: 8px; color: #30405C; text-decoration: none; font-weight: 500; font-size: .95rem; }
.site-nav ul a:hover { background: var(--bg); color: var(--ink); }
.site-nav ul a[aria-current="page"] { color: var(--ink); background: var(--bg); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: .6rem; }
.search-open { display: inline-flex; align-items: center; gap: .55rem; width: 14rem; font: 400 .9rem var(--sans); color: var(--mute);
  background: rgba(255, 255, 255, .8); border: 1px solid var(--line); border-radius: 999px; padding: .5rem .9rem; cursor: pointer; text-align: left; }
.search-open:hover { border-color: #C9D2E0; }
.search-open svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; flex: none; }
.search-open kbd { margin-left: auto; }
kbd { font: 600 .72rem/1 var(--sans); border: 1px solid var(--line); border-radius: 5px; padding: .2rem .4rem; color: var(--mute); background: #fff; }
.nav-toggle { display: none; }
@media (max-width: 62rem) {
  .search-open { width: auto; } .search-open span, .search-open kbd { display: none; }
}
@media (max-width: 52rem) {
  .header-row { gap: 1rem; }
  .nav-toggle { display: inline-flex; align-items: center; gap: .5rem; margin-left: auto; font: 600 .95rem var(--sans); color: var(--ink);
    background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: .5rem .9rem; cursor: pointer; }
  .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 1rem; height: 2px; background: currentColor; position: relative; border-radius: 2px; }
  .nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
  .nav-toggle-bars::before { top: -5px; } .nav-toggle-bars::after { top: 5px; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: .75rem;
    background: #fff; border-bottom: 1px solid var(--line); padding: .75rem 1.25rem 1.25rem; box-shadow: 0 20px 30px -24px rgba(11, 27, 51, .4); }
  .site-nav.is-open { display: flex; }
  .site-nav ul { flex-direction: column; } .site-nav ul a { padding: .8rem .6rem; font-size: 1.05rem; }
  .nav-right { margin: 0; flex-direction: column; align-items: stretch; }
  .search-open { width: 100%; padding: .75rem 1rem; } .search-open span { display: inline; }
  .nav-right .btn { width: 100%; padding: .85rem; }
}

/* ---------------------------------------------------------------- ribbon */
.ribbon { position: absolute; pointer-events: none; z-index: 0; width: 61rem; height: 47rem; right: -11rem; top: -17rem; transform: rotate(-14deg);
  border-radius: 40%; background: conic-gradient(from 210deg at 60% 50%, #0FB5A6, #2F6BFF, #7A4DFF, #FF6B9A, #FFB020, #0FB5A6);
  opacity: .88; filter: blur(2px);
  -webkit-mask-image: linear-gradient(115deg, transparent 30%, #000 52%, #000 70%, transparent 92%);
  mask-image: linear-gradient(115deg, transparent 30%, #000 52%, #000 70%, transparent 92%); }

/* ---------------------------------------------------------------- hero */
.hero { position: relative; overflow: hidden; padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(3.5rem, 7vw, 5.5rem); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 2.5rem; position: relative; z-index: 1; align-items: center; }
.hero-title { font-size: clamp(2.5rem, 1.5rem + 3.6vw, 3.9rem); font-weight: 450; line-height: 1.05; letter-spacing: -.04em; margin: 0 0 1.25rem; max-width: 11.5em; }
.hero-title span, .two-tone span { color: var(--slate); }
.hero-sub { font-size: 1.18rem; line-height: 1.55; color: var(--slate); margin: 0 0 1.9rem; max-width: 30em; }

.decoder { position: relative; max-width: 35rem; }
.decoder-box { display: flex; align-items: center; gap: .6rem; background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: .45rem .45rem .45rem 1.1rem; box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s; }
.decoder-box:focus-within { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(47, 107, 255, .15), var(--shadow-sm); }
.decoder-box > svg { width: 1.2rem; height: 1.2rem; flex: none; fill: none; stroke: var(--mute); stroke-width: 2; stroke-linecap: round; }
.decoder-box input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: 400 1.1rem/1 var(--sans);
  padding: .7rem 0; text-overflow: ellipsis; }
.decoder-box input::placeholder { color: var(--mute); }
.decoder-box input::-webkit-search-cancel-button { display: none; }
.decoder-box .btn { border-radius: 10px; padding: .8rem 1.15rem; }
.decoder-results { list-style: none; margin: .5rem 0 0; padding: .35rem; background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-lg); position: absolute; left: 0; right: 0; z-index: 30; max-height: min(26rem, 60vh); overflow: auto; }
.decoder-results li { margin: 0; }
.decoder-results [role=option] a { display: grid; grid-template-columns: 4.5rem 1fr; gap: .1rem 1rem; align-items: baseline; padding: .65rem .8rem;
  border-radius: 10px; color: var(--ink); text-decoration: none; }
.decoder-results [aria-selected="true"] a, .decoder-results [role=option] a:hover { background: var(--bg); }
.res-code { grid-row: span 2; font-weight: 600; font-size: 1.3rem; letter-spacing: -.02em; color: var(--blue-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res-code.is-long { font: 600 .78rem/1.3 var(--mono); white-space: normal; word-break: break-all; letter-spacing: 0; }
.res-title { font-weight: 550; line-height: 1.3; }
.res-section { font-size: .85rem; color: var(--mute); }
.decoder-empty { padding: 1rem .8rem; color: var(--slate); }
.decoder-empty a { font-weight: 600; }
mark { background: rgba(47, 107, 255, .14); color: inherit; border-radius: 3px; }
.decoder-try { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin: 1rem 0 0; font-size: .9rem; color: var(--mute); }
.chip { font: 600 .85rem/1 var(--sans); color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: .4rem .65rem; cursor: pointer; }
.chip:hover { border-color: var(--blue); color: var(--blue-ink); }

.hero-art { position: relative; min-height: 25rem; }
.ui-card { position: absolute; background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg); }
.pay-card { right: 1.8rem; top: 1rem; width: 20.5rem; padding: 1.1rem 1.2rem; }
.pay-card .row { display: flex; justify-content: space-between; font-size: .88rem; color: var(--mute); margin-bottom: .35rem; }
.pay-card .amt { font-size: 1.6rem; font-weight: 600; letter-spacing: -.02em; }
.status-bad { display: inline-flex; align-items: center; gap: .4rem; margin-top: .55rem; font: 600 .8rem var(--sans); color: var(--red); background: var(--red-wash); border-radius: 999px; padding: .28rem .65rem; }
.status-bad::before { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: currentColor; }
.answer-card { right: -.6rem; top: 12.5rem; width: 18.75rem; padding: 1.15rem 1.2rem; background: var(--ink); color: #fff; }
.answer-card .code { font-size: 3.4rem; font-weight: 600; line-height: 1; letter-spacing: -.04em; background: linear-gradient(90deg, #5EEAD4, #8AB4FF);
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.answer-card .name { font-weight: 600; font-size: 1.1rem; margin-top: .3rem; }
.answer-card p { margin: .5rem 0 .7rem; font-size: .88rem; color: #C9D3E3; line-height: 1.5; }
.answer-card a { color: #8AB4FF; font-weight: 600; font-size: .88rem; }
.tag { display: inline-block; font: 600 .76rem var(--sans); border-radius: 999px; padding: .22rem .6rem; }
.tag-soft { background: rgba(255, 176, 32, .16); color: #FFC24D; }
@media (max-width: 60rem) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-art { min-height: 21rem; max-width: 34rem; }
  .pay-card { left: 0; right: auto; } .answer-card { right: 0; top: 9rem; }
  .ribbon { width: 46rem; height: 36rem; right: -22rem; top: -14rem; opacity: .6; }
}
@media (max-width: 34rem) {
  .hero-art { min-height: 0; display: grid; gap: .8rem; }
  .ui-card { position: static; width: auto; }
  .decoder-box .btn { padding: .8rem .8rem; }
}

/* covered strip */
.covered { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem 2.5rem; flex-wrap: wrap; padding: 1.3rem 0;
  border-top: 1px solid var(--line); color: #8B97AB; font-weight: 600; font-size: 1.15rem; letter-spacing: -.01em; }
.covered small { font: 500 .82rem var(--sans); color: var(--mute); letter-spacing: 0; }

/* ---------------------------------------------------------------- section heads */
.band { background: var(--bg); padding: clamp(3.5rem, 7vw, 5rem) 0; border-top: 1px solid var(--line); }
.band-white { background: #fff; }
.big-head { font-size: clamp(1.9rem, 1.3rem + 2vw, 2.5rem); font-weight: 450; letter-spacing: -.03em; line-height: 1.12; margin: 0 0 2.4rem; max-width: 24em; }
.big-head span { color: var(--slate); }
.head-row { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1.8rem; }
.head-row .big-head { margin: 0; }
.link-more { font-weight: 600; text-decoration: none; white-space: nowrap; }

/* ---------------------------------------------------------------- bento */
.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1rem; }
.bento-card { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 18px;
  overflow: hidden; color: var(--ink); text-decoration: none; min-height: 21rem; transition: box-shadow .2s; }
a.bento-card:hover { box-shadow: var(--shadow-sm); text-decoration: none; }
a.bento-card:hover h3 { color: var(--blue-ink); }
.bento-card .tx { padding: 1.5rem 1.6rem 0; position: relative; z-index: 1; }
.bento-card h3 { font-size: 1.32rem; font-weight: 500; letter-spacing: -.02em; margin: 0 0 .35rem; }
.bento-card p { margin: 0; color: var(--mute); font-size: .93rem; }
.bento-card .vis { flex: 1; position: relative; min-height: 13rem; margin-top: 1.2rem; }
.b-wide { grid-column: span 4; } .b-side { grid-column: span 2; } .b-third { grid-column: span 2; }
.glow-1 { background: radial-gradient(120% 90% at 100% 100%, rgba(122, 77, 255, .33), transparent 60%), radial-gradient(90% 80% at 0% 100%, rgba(15, 181, 166, .33), transparent 60%), #fff; }
.glow-2 { background: radial-gradient(100% 90% at 100% 100%, rgba(255, 107, 154, .27), transparent 60%), radial-gradient(80% 70% at 0% 100%, rgba(122, 77, 255, .27), transparent 60%), #fff; }
.glow-3 { background: radial-gradient(100% 90% at 50% 120%, rgba(255, 176, 32, .33), transparent 65%), #fff; }
.glow-4 { background: radial-gradient(100% 90% at 50% 120%, rgba(15, 181, 166, .31), transparent 65%), #fff; }
.glow-5 { background: radial-gradient(100% 90% at 50% 120%, rgba(47, 107, 255, .27), transparent 65%), #fff; }
.mock { position: absolute; background: #fff; border-radius: 12px; box-shadow: 0 20px 40px -18px rgba(11, 27, 51, .35), 0 0 0 1px rgba(11, 27, 51, .06); font-size: .82rem; }
.m-checkout { left: 1.7rem; bottom: 0; width: 20rem; padding: 1rem; border-radius: 12px 12px 0 0; }
.m-checkout .f { border: 1px solid var(--line); border-radius: 7px; padding: .45rem .6rem; margin: .4rem 0; color: var(--mute); }
.m-checkout .err { color: var(--red); font-weight: 600; margin-top: .5rem; }
.m-checkout .pay { background: var(--ink); color: #fff; text-align: center; border-radius: 7px; padding: .5rem; margin-top: .5rem; font-weight: 600; }
.m-answer { left: 23.6rem; top: 1.6rem; width: 17.5rem; padding: 1rem; }
.m-answer .h { display: flex; align-items: center; gap: .6rem; margin-bottom: .4rem; }
.m-answer .h b { font-size: 1.6rem; font-weight: 600; color: var(--blue-ink); letter-spacing: -.02em; }
.m-answer ul { margin: 0; padding-left: 1rem; color: #33415C; } .m-answer li { margin-bottom: .2rem; }
.m-timeline { left: 1.4rem; right: 1.4rem; top: .3rem; padding: 1rem; }
.m-timeline .st { display: flex; gap: .6rem; align-items: center; margin-bottom: .6rem; }
.m-timeline .dot { width: 1.4rem; height: 1.4rem; border-radius: 50%; background: var(--violet); color: #fff; display: grid; place-items: center; font-size: .7rem; font-weight: 700; }
.m-timeline .dot.open { background: #fff; border: 2px solid #CFC4FF; color: var(--violet); }
.m-timeline .bar { height: 6px; border-radius: 9px; background: #EEE9FF; margin-top: .4rem; }
.m-timeline .bar i { display: block; height: 100%; width: 62%; border-radius: 9px; background: linear-gradient(90deg, #7A4DFF, #FF6B9A); }
.m-chart { left: 1.4rem; right: 1.4rem; bottom: 1.1rem; height: 9.5rem; padding: .9rem; display: flex; align-items: flex-end; gap: .3rem; }
.m-chart i { flex: 1; background: #E9EDF5; border-radius: 3px 3px 0 0; }
.m-chart i.spike { background: linear-gradient(#FFB020, #FF6B5A); }
.m-statement { left: 1.4rem; right: 1.4rem; top: .3rem; padding: .9rem; }
.m-statement .r { display: flex; justify-content: space-between; padding: .38rem 0; border-bottom: 1px dashed var(--line); }
.m-statement .r:last-child { border: 0; font-weight: 700; }
.m-chips { left: 1.4rem; right: 1.4rem; top: .3rem; padding: .9rem; display: flex; flex-wrap: wrap; gap: .45rem; }
.m-chips span { border: 1px solid var(--line); border-radius: 999px; padding: .3rem .7rem; font-weight: 500; }
.m-chips span b { color: var(--mute); font-weight: 500; margin-left: .25rem; }
@media (max-width: 66rem) { .m-answer { left: auto; right: 1.2rem; } }
@media (max-width: 56rem) {
  .bento { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .b-wide { grid-column: 1 / -1; } .b-side, .b-third { grid-column: span 1; }
}
@media (max-width: 40rem) {
  .bento { grid-template-columns: minmax(0, 1fr); } .b-side, .b-third { grid-column: 1 / -1; }
  .m-answer { display: none; } .m-checkout { left: 1.2rem; right: 1.2rem; width: auto; }
}

/* ---------------------------------------------------------------- guide covers */
.guide-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.2rem 1.4rem; }
.guide { position: relative; }
.cover { position: relative; height: 13.5rem; border-radius: 16px; overflow: hidden; color: #fff; padding: 1.25rem 1.4rem;
  background: linear-gradient(135deg, var(--c1), var(--c2)); transition: transform .25s ease, box-shadow .25s ease; }
.cover::after { content: ""; position: absolute; inset: 0;
  background: repeating-radial-gradient(circle at 110% 120%, transparent 0 22px, rgba(255, 255, 255, .18) 22px 23px); }
.cover-kicker { position: relative; z-index: 1; font: 600 .82rem var(--sans); opacity: .92; }
.cover-label { position: absolute; z-index: 1; right: 1.3rem; bottom: .8rem; left: 1.3rem; text-align: right; font-weight: 500;
  font-size: 4.6rem; line-height: 1; letter-spacing: -.045em; overflow-wrap: anywhere; }
.cover-label.is-words { font-size: 2.6rem; letter-spacing: -.035em; line-height: 1.02; }
.cover-label.is-mono { font: 600 1.35rem/1.2 var(--mono); letter-spacing: 0; }
.guide:hover .cover { transform: translateY(-3px); box-shadow: 0 18px 34px -20px rgba(11, 27, 51, .55); }
.guide h3 { font-size: 1.2rem; font-weight: 500; letter-spacing: -.015em; line-height: 1.3; margin: 1rem 0 .35rem; }
.guide h3 a { color: var(--ink); text-decoration: none; }
.guide h3 a::after { content: ""; position: absolute; inset: 0; border-radius: 16px; }
.guide:hover h3 a { color: var(--blue-ink); }
.guide p { margin: 0; color: var(--mute); font-size: .93rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.guide .meta-line { display: flex; gap: 1rem; margin: .55rem 0 0; font-size: .82rem; color: var(--mute); }
@media (max-width: 60rem) { .guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 36rem) { .guide-grid { grid-template-columns: minmax(0, 1fr); } .cover { height: 11.5rem; } }

.topic-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 1rem; }
.topic-list a { display: flex; gap: 1rem; align-items: flex-start; height: 100%; padding: 1.2rem 1.3rem; background: #fff; border: 1px solid var(--line);
  border-radius: 14px; color: var(--ink); text-decoration: none; transition: box-shadow .2s; }
.topic-list a:hover { box-shadow: var(--shadow-sm); }
.topic-list .sw { width: 2.4rem; height: 2.4rem; border-radius: 10px; flex: none; background: linear-gradient(135deg, var(--c1), var(--c2)); }
.topic-list b { display: block; font-weight: 600; color: var(--ink); } .topic-list span { display: block; font-size: .88rem; color: var(--mute); }
.topic-list em { font-style: normal; font-size: .82rem; color: var(--mute); display: block; margin-top: .3rem; }

/* ---------------------------------------------------------------- article */
.a-head { position: relative; overflow: hidden; background: var(--bg); border-bottom: 1px solid var(--line); padding: clamp(2.2rem, 5vw, 3.6rem) 0 clamp(2rem, 4vw, 3rem); }
.a-head .ribbon { right: -26rem; top: -26rem; opacity: .5; }
.a-head-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) 20.5rem; gap: 3.5rem; align-items: center; }
.crumbs ol { display: flex; flex-wrap: wrap; list-style: none; margin: 0 0 1rem; padding: 0; font-size: .9rem; }
.crumbs li + li::before { content: "/"; margin: 0 .55rem; color: var(--mute); }
.crumbs a { color: var(--mute); text-decoration: none; } .crumbs a:hover { color: var(--blue-ink); }
.crumbs li:nth-child(2) a { color: var(--blue-ink); font-weight: 600; }
.a-title { font-size: clamp(2rem, 1.4rem + 2.2vw, 2.95rem); font-weight: 450; letter-spacing: -.035em; line-height: 1.1; margin: 0 0 .9rem; }
.a-dek { font-size: 1.15rem; color: var(--slate); margin: 0 0 1.1rem; max-width: 38em; line-height: 1.55; }
.a-meta { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; font-size: .88rem; color: var(--mute); margin: 0; }
.a-meta a { color: var(--slate); font-weight: 600; text-decoration: none; }
.fact-card { background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg); padding: 1.25rem; }
.fact-code { font-size: 4rem; font-weight: 500; line-height: 1; letter-spacing: -.045em; background: var(--brand-gradient);
  -webkit-background-clip: text; background-clip: text; color: transparent; overflow-wrap: anywhere; }
.fact-code.is-mono { font: 600 1.3rem/1.25 var(--mono); letter-spacing: 0; }
.fact-kind { font-size: .85rem; color: var(--mute); margin: .3rem 0 0; }
.fact-card dl { margin: .9rem 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: .75rem 1rem; font-size: .9rem; }
.fact-card dt { color: var(--mute); font-size: .78rem; } .fact-card dd { margin: 0; font-weight: 600; }
.fact-cover { height: 11rem; border-radius: 16px; position: relative; overflow: hidden; color: #fff; padding: 1.1rem 1.25rem;
  background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: var(--shadow-lg); }
.fact-cover::after { content: ""; position: absolute; inset: 0; background: repeating-radial-gradient(circle at 110% 120%, transparent 0 22px, rgba(255, 255, 255, .18) 22px 23px); }
.fact-cover .cover-label { font-size: 2.3rem; }
.fact-cover .cover-label:not(.is-words) { font-size: 4rem; }
@media (max-width: 56rem) { .a-head-grid { grid-template-columns: minmax(0, 1fr); gap: 1.8rem; } .fact-card, .fact-cover { max-width: 26rem; } }

.a-grid { display: grid; grid-template-columns: minmax(0, var(--measure)) 15rem; gap: clamp(3rem, 6vw, 5rem); padding: 2.6rem 0 3.5rem; }
.a-grid .toc { grid-column: 2; grid-row: 1; } .a-grid .prose { grid-column: 1; grid-row: 1; }
.toc-box { position: sticky; top: 6rem; font-size: .9rem; }
.toc-box summary { font-weight: 600; color: var(--mute); font-size: .82rem; cursor: pointer; list-style: none; padding-bottom: .7rem; }
.toc-box summary::-webkit-details-marker { display: none; }
.toc-box ol { list-style: none; margin: 0; padding: 0; }
.toc-box a { display: block; padding: .38rem 0 .38rem .9rem; border-left: 2px solid var(--line); color: var(--mute); text-decoration: none; line-height: 1.35; }
.toc-box a:hover { color: var(--ink); } .toc-box a.is-active { border-left-color: var(--blue); color: var(--ink); font-weight: 600; }
@media (max-width: 60rem) {
  .a-grid { grid-template-columns: minmax(0, 1fr); gap: 0; } .a-grid .toc, .a-grid .prose { grid-column: 1; grid-row: auto; }
  .toc-box { position: static; border: 1px solid var(--line); border-radius: 12px; padding: .85rem 1rem; margin-bottom: 1.8rem; }
  .toc-box summary { padding: 0; display: flex; justify-content: space-between; font-size: .9rem; color: var(--ink); }
  .toc-box summary::after { content: "Show"; color: var(--blue-ink); } .toc-box[open] summary::after { content: "Hide"; }
  .toc-box[open] summary { padding-bottom: .7rem; }
}

.prose { font-size: 1.125rem; line-height: 1.72; color: #1C2B45; }
.prose > * { margin-top: 0; margin-bottom: 1.1em; }
.prose h2 { font-size: 1.75rem; font-weight: 500; letter-spacing: -.025em; line-height: 1.2; color: var(--ink); margin: 2em 0 .5em; }
.prose h3 { font-size: 1.2rem; font-weight: 600; letter-spacing: -.01em; color: var(--ink); margin: 1.7em 0 .45em; }
.prose ul, .prose ol { padding-left: 1.3em; } .prose li { margin-bottom: .45em; } .prose li::marker { color: var(--mute); }
.prose strong { font-weight: 600; color: var(--ink); }
.prose code { font: .86em/1 var(--mono); background: var(--bg); border: 1px solid var(--line); border-radius: 5px; padding: .12em .35em; }
.prose blockquote { margin-left: 0; padding-left: 1.2rem; border-left: 3px solid var(--line); color: var(--slate); }
.prose img { height: auto; border-radius: 12px; }
.table-scroll { overflow-x: auto; margin: 1.6em 0; border: 1px solid var(--line); border-radius: 12px; }
.prose table { width: 100%; border-collapse: collapse; font-size: .92rem; line-height: 1.45; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: .7rem .9rem; border-bottom: 1px solid var(--line); }
.prose th { font-weight: 600; background: var(--bg); white-space: nowrap; color: var(--ink); }
.prose tr:last-child td { border-bottom: 0; }
.takeaways { border-radius: 14px; padding: 1.2rem 1.4rem .6rem; background: linear-gradient(135deg, #EFFBF9, #EEF3FF); margin: 0 0 2em; }
.takeaways h2 { font-size: .98rem; font-weight: 600; letter-spacing: 0; color: #0B6E66; margin: 0 0 .6rem; }
.takeaways ul { margin: 0; padding-left: 1.1em; font-size: 1rem; line-height: 1.55; } .takeaways li { margin-bottom: .55em; }
.flow { margin: 2em 0; padding: 1.3rem; border: 1px solid var(--line); border-radius: 14px; background: radial-gradient(90% 120% at 100% 100%, rgba(122, 77, 255, .08), transparent 60%), #fff; }
.flow figcaption { font-weight: 600; font-size: 1rem; margin-bottom: 1rem; color: var(--ink); }
.flow ol { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; gap: .7rem; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); }
.flow li { counter-increment: step; position: relative; margin: 0; padding: 2.5rem .9rem .9rem; background: #fff; border: 1px solid var(--line); border-radius: 10px;
  font-size: .88rem; line-height: 1.4; font-weight: 500; box-shadow: 0 6px 16px -12px rgba(11, 27, 51, .35); }
.flow li::before { content: counter(step); position: absolute; top: .8rem; left: .9rem; width: 1.35rem; height: 1.35rem; border-radius: 50%;
  background: var(--brand-gradient); color: #fff; font-weight: 700; font-size: .72rem; display: grid; place-items: center; }
.faq details { border-top: 1px solid var(--line); } .faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary { font-weight: 550; font-size: 1.08rem; line-height: 1.35; color: var(--ink); padding: 1rem 2.2rem 1rem 0; cursor: pointer; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: .3rem; top: 1.35rem; width: .55rem; height: .55rem; border-right: 2px solid var(--mute);
  border-bottom: 2px solid var(--mute); transform: rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(-135deg); top: 1.6rem; }
.faq details > :last-child { margin-bottom: 1.2rem; }
.post-foot { font-size: .9rem; line-height: 1.6; color: var(--slate); background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.2rem; margin-top: 3em; }
.post-foot p { margin: 0; }

/* ---------------------------------------------------------------- pages */
.p-head { position: relative; overflow: hidden; background: var(--bg); border-bottom: 1px solid var(--line); padding: clamp(2.4rem, 5vw, 3.6rem) 0 2.4rem; }
.p-head .ribbon { right: -28rem; top: -28rem; opacity: .45; }
.p-head .wrap { z-index: 1; }
.p-head h1 { font-size: clamp(2rem, 1.4rem + 2.2vw, 2.9rem); font-weight: 450; letter-spacing: -.035em; margin: 0 0 .6rem; }
.p-intro { font-size: 1.15rem; color: var(--slate); max-width: 40em; margin: 0; }
.p-body { padding: 2.6rem 0 4rem; } .p-body .prose { max-width: var(--measure); }
.contact-email { font-size: 1.35rem; font-weight: 600; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 2.5rem 0 0; color: var(--mute); }
.pager a { font-weight: 600; }
.notfound .decoder { margin-top: 1.8rem; }

/* search dialog */
.search-dialog { width: min(100% - 2rem, 40rem); margin: 12vh auto auto; padding: 0; border: 0; background: transparent; overflow: visible; }
.search-dialog::backdrop { background: rgba(11, 27, 51, .45); backdrop-filter: blur(3px); }
.search-dialog .decoder { max-width: none; }
.search-dialog .decoder-box { box-shadow: var(--shadow-lg); border-color: var(--blue); }
.search-dialog .decoder-results { position: static; }
.decoder-close { font: 600 .82rem var(--sans); color: var(--slate); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: .45rem .7rem; cursor: pointer; }

/* ---------------------------------------------------------------- footer */
.site-footer { background: var(--ink); color: #B8C3D6; font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; padding: 3.4rem 0 2.2rem; }
.footer-name { display: flex; align-items: center; gap: .55rem; font-weight: 700; font-size: 1.15rem; color: #fff; margin: 0 0 .7rem; }
.footer-name svg { width: 1.6rem; height: 1.6rem; }
.footer-brand p:last-child { max-width: 34ch; margin: 0; }
.footer-h { font-weight: 600; color: #fff; margin: 0 0 .8rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.site-footer a { color: #B8C3D6; text-decoration: none; } .site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-base { border-top: 1px solid rgba(255, 255, 255, .1); padding: 1.3rem 0 2rem; }
.footer-base p { margin: 0; color: #8E9BB2; font-size: .85rem; }
@media (max-width: 44rem) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, .toc, .search-dialog, .ribbon { display: none !important; }
  .a-grid { display: block; } .faq details > * { display: block; }
}
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 40rem) { .covered { justify-content: flex-start; gap: .6rem 1.4rem; font-size: 1rem; } .covered small { flex-basis: 100%; } }
