/* hikari.css — shared styles for Hikari content pages (/nihongo/..., 404)
   The one-page site at / keeps its own inline stylesheet. This file reuses the same
   design tokens so the two are visually identical. */

:root {
  --canvas: #F5F3EE;
  --panel: #ECE9E2;
  --accent: #EC3013;
  --accent-fill: #CC2810; /* the red behind white text: 5.4:1 */
  --accent-hover: #C82208;
  --accent-muted: rgba(236, 48, 19, .14);
  --text-secondary: #6B6663;
  --text-primary: #201E1D;
  --line: #201E1D;
  --line-soft: #D9D5CC;
  --paper: #FFFDF9;
  --trace: #D9CFC0;
  --trace-ink: #C9BCA8;
  --ease: cubic-bezier(.22, .9, .28, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; border-radius: 0 }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100% }
body {
  background: var(--canvas);
  color: var(--text-primary);
  font-family: 'Archivo', system-ui, -apple-system, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
}
img, video { max-width: 100%; display: block }
img { height: auto }
a { color: inherit }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px }
.jp { font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', sans-serif }
.sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip {
  position: absolute; left: -9999px; top: 0; background: var(--accent);
  color: #fff; padding: 10px 16px; z-index: 100; font-weight: 700; text-decoration: none;
}
.skip:focus { left: 0 }

/* ---------------- nav ---------------- */
nav.top {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 18px;
  padding: 12px 28px; background: rgba(245, 243, 238, .94);
  backdrop-filter: blur(10px); box-shadow: 0 2px 0 var(--line);
}
.brand {
  display: flex; align-items: center; gap: 12px; text-decoration: none;
  font-weight: 900; letter-spacing: -.02em; font-size: 20px;
}
.seal { width: 32px; height: 32px; flex: none }
.navlinks { margin-left: auto; display: flex; align-items: center; gap: 24px }
.navlinks a {
  display: inline-flex; align-items: center; min-height: 44px;
  text-decoration: none; font-weight: 500; font-size: 14px;
  letter-spacing: .02em; transition: color .3s var(--ease);
}
.navlinks a:hover { color: var(--accent-hover) }
.navlinks a.cta {
  background: var(--accent-fill); color: #fff; font-weight: 700; padding: 9px 16px;
  transition: background .3s var(--ease);
}
.navlinks a.cta:hover { background: var(--accent-hover) }
@media (max-width: 860px) { .navlinks a:not(.cta) { display: none } }

/* Nihongo nav: the way back to the parent brand, and the sub-brand lockup.
   .parent sits outside .navlinks on purpose, so the phone rule above never
   hides it. */
nav .parent { display: inline-flex; align-items: center; min-height: 44px;
  flex: none; font-size: 12px; font-weight: 700; letter-spacing: .06em; white-space: nowrap;
  color: var(--text-secondary); text-decoration: none; transition: color .3s var(--ease);
}
nav .parent:hover { color: var(--accent-hover) }
.brand .bname { white-space: nowrap }
.brand .bname small {
  font-size: 11px; font-weight: 700; letter-spacing: .24em; color: var(--accent); margin-left: 6px;
}
@media (max-width: 560px) {
  nav.top { padding: 10px 16px; gap: 12px }
  .brand { gap: 10px }
  .brand .bname { line-height: 1 }
  .brand .bname small { display: block; margin: 3px 0 0; line-height: 1 }
}

/* ---------------- layout ---------------- */
.wrap { max-width: 1080px; margin: 0 auto }
.wrap-narrow { max-width: 760px; margin: 0 auto }
section.block { padding: 76px 6vw; position: relative }
section.block.tight { padding-top: 40px }
.rule { height: 2px; background: var(--line) }

.kicker {
  font-size: 12px; font-weight: 700; letter-spacing: .24em; color: var(--text-secondary);
  display: flex; align-items: center; gap: 10px; text-transform: uppercase;
}
.kicker::before { content: ""; width: 8px; height: 8px; background: var(--accent); flex: none }

h1.head, h2.head {
  font-weight: 900; letter-spacing: -.03em; line-height: 1.04;
  font-size: clamp(32px, 4.4vw, 58px); margin-top: 16px;
}
h2.sub-head {
  font-weight: 900; letter-spacing: -.02em; line-height: 1.1;
  font-size: clamp(24px, 3vw, 36px); margin-top: 56px;
}
h3.mini {
  font-weight: 700; letter-spacing: -.01em; font-size: clamp(19px, 2vw, 24px); margin-top: 36px;
}
.lede { margin-top: 20px; font-size: 18px; line-height: 1.75; color: var(--text-secondary); max-width: 64ch }
.prose p { margin-top: 16px; font-size: 17px; line-height: 1.8; color: var(--text-secondary); max-width: 68ch }
.prose p strong { color: var(--text-primary); font-weight: 700 }
.prose ul, .prose ol { margin: 16px 0 0 22px; max-width: 66ch; color: var(--text-secondary) }
.prose li { margin-top: 9px; line-height: 1.75; font-size: 17px }
.prose a { color: var(--text-primary); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; text-decoration-color: var(--accent) }
.prose a:hover { color: var(--accent-hover) }

/* ---------------- page hero ---------------- */
.pagehero { padding: 56px 6vw 0 }
.crumbs { font-size: 13px; font-weight: 700; color: var(--text-secondary); letter-spacing: .02em }
.crumbs a { text-decoration: none }
.crumbs a:hover { color: var(--accent-hover); text-decoration: underline }
.crumbs span { opacity: .5; margin: 0 8px }

/* ---------------- buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--accent-fill); color: #fff; text-decoration: none; font-weight: 700;
  font-size: 16px; padding: 15px 28px; letter-spacing: .02em; border: 2px solid var(--accent-fill);
  transition: background .3s var(--ease), transform .3s var(--ease); cursor: pointer;
  font-family: inherit; min-height: 48px;
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); transform: translateY(-2px) }
.btn-ghost { background: transparent; color: var(--text-primary); border: 2px solid var(--line) }
.btn-ghost:hover { background: var(--text-primary); border-color: var(--text-primary); color: var(--canvas) }
.btn-light { background: transparent; color: var(--canvas); border: 2px solid var(--canvas) }
.btn-light:hover { background: var(--accent-fill); border-color: var(--accent-fill); color: #fff }
.btnrow { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; align-items: center }

/* ---------------- chips ---------------- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px }
.chip { border: 2px solid var(--line); font-size: 11px; font-weight: 700; letter-spacing: .16em; padding: 7px 12px }
.chip.red { background: var(--accent-fill); border-color: var(--accent-fill); color: #fff }
/* On a phone, five full-width chips push the primary CTA off the first screen.
   Tightening them lets the chips pack two per row and keeps the button visible. */
@media (max-width: 560px) {
  .chips { gap: 7px; margin-top: 20px }
  .chip { font-size: 10px; letter-spacing: .1em; padding: 6px 9px; border-width: 2px }
  .lede { font-size: 17px }
}

/* ---------------- kana chart ---------------- */
.chart {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px;
  background: var(--line); border: 2px solid var(--line); margin-top: 26px;
}
.chart .cell {
  background: var(--paper); padding: 14px 6px 12px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 84px;
  justify-content: center;
}
.chart .cell.empty { background: var(--panel) }
.chart .cell .g { font-size: clamp(26px, 4.2vw, 34px); line-height: 1; font-weight: 700 }
.chart .cell .r { font-size: 11px; font-weight: 700; letter-spacing: .12em; color: var(--text-secondary); text-transform: lowercase }
.chart-note { margin-top: 12px; font-size: 13px; color: var(--text-secondary) }
@media (max-width: 560px) { .chart .cell { min-height: 68px; padding: 10px 4px } }

/* ---------------- comparison cards ---------------- */
.pairs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; background: var(--line); border: 2px solid var(--line); margin-top: 28px }
.pair { background: var(--paper); padding: 22px 22px 24px }
.pair .glyphs { font-size: clamp(38px, 5vw, 52px); line-height: 1.15; font-weight: 700; letter-spacing: .08em }
.pair .glyphs em { font-style: normal; color: var(--accent) }
.pair h3, .pair h4 { margin-top: 10px; font-size: 14px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase }
.pair p { margin-top: 8px; font-size: 15px; line-height: 1.7; color: var(--text-secondary) }
@media (max-width: 700px) { .pairs { grid-template-columns: 1fr } }

/* ---------------- facts / steps ---------------- */
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; background: var(--line); border: 2px solid var(--line); margin-top: 36px }
.fact { background: var(--canvas); padding: 26px 22px; display: flex; flex-direction: column; gap: 10px; font-size: 15px; line-height: 1.65; color: var(--text-secondary) }
.fact .fbig { font-weight: 900; font-size: 34px; line-height: 1; letter-spacing: -.02em; color: var(--text-primary) }
.fact:first-child .fbig { color: var(--accent) }
@media (max-width: 860px) { .facts { grid-template-columns: 1fr } }

/* ---------------- preview gallery ---------------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 2px; background: var(--line); border: 2px solid var(--line); margin-top: 28px }
.gallery figure { background: var(--paper); margin: 0; position: relative; display: flex; flex-direction: column }
.gallery img { width: 100%; aspect-ratio: 918/1188; object-fit: cover; object-position: top; background: #fff }
.gallery figcaption { padding: 12px 14px 14px; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text-secondary); border-top: 2px solid var(--line-soft) }
.gallery a { text-decoration: none; display: block }
.gallery a:hover img { opacity: .88 }

/* ---------------- callout / cta band ---------------- */
.band-dark { background: var(--text-primary); color: var(--canvas) }
.band-dark .kicker { color: rgba(245, 243, 238, .6) }
.band-dark h2.head, .band-dark h2.sub-head { color: var(--canvas) }
.band-dark .lede, .band-dark .prose p { color: rgba(245, 243, 238, .74) }
.band-dark .prose a { color: var(--canvas) }
.band-panel { background: var(--panel) }

.offer { border: 2px solid var(--line); background: var(--paper); padding: 30px 28px; margin-top: 34px }
.offer .price { display: flex; align-items: baseline; gap: 14px }
.offer .amount { font-weight: 900; font-size: clamp(40px, 6vw, 62px); letter-spacing: -.04em }
.offer .per { font-weight: 700; letter-spacing: .18em; font-size: 12px; color: var(--text-secondary) }
.assure { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px 24px; color: var(--text-secondary); font-weight: 500; font-size: 15px }
.assure span { display: flex; gap: 10px; align-items: center }
.assure span::before { content: ""; width: 8px; height: 8px; background: var(--accent); flex: none }
.quiet { display: block; margin-top: 16px; color: var(--text-secondary); font-size: 14px }
.band-dark .quiet { color: rgba(245, 243, 238, .6) }
.band-dark .offer { background: transparent; border-color: rgba(245, 243, 238, .3) }
.band-dark .offer .per, .band-dark .assure { color: rgba(245, 243, 238, .7) }

/* ---------------- faq ---------------- */
.faq { margin-top: 30px; border-top: 2px solid var(--line) }
.faq details { border-bottom: 2px solid var(--line) }
.faq summary {
  cursor: pointer; list-style: none; display: flex; align-items: baseline; gap: 16px;
  padding: 20px 4px; font-weight: 700; font-size: clamp(16px, 1.8vw, 20px); letter-spacing: -.01em;
}
.faq summary::-webkit-details-marker { display: none }
.faq summary::before { content: "+"; color: var(--accent); font-weight: 900; font-size: 21px; flex: none; transition: transform .35s var(--ease) }
.faq details[open] summary::before { transform: rotate(45deg) }
.faq summary:hover { color: var(--accent-hover) }
.faq .a { padding: 0 4px 22px 36px; color: var(--text-secondary); max-width: 70ch; line-height: 1.75 }

/* ---------------- related links ---------------- */
.related { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 2px; background: var(--line); border: 2px solid var(--line); margin-top: 30px }
.related a { background: var(--canvas); padding: 22px 20px; text-decoration: none; display: flex; flex-direction: column; gap: 8px; transition: background .3s var(--ease) }
.related a:hover { background: var(--panel) }
.related a b { font-weight: 700; font-size: 17px; letter-spacing: -.01em }
.related a span { font-size: 14px; color: var(--text-secondary); line-height: 1.6 }

/* ---------------- footer ---------------- */
footer { background: var(--text-primary); color: rgba(245, 243, 238, .7); padding: 50px 6vw 36px; border-top: 2px solid rgba(245, 243, 238, .18) }
.fgrid { max-width: 1080px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 32px 60px; align-items: flex-start; font-size: 14px }
.fcol { display: flex; flex-direction: column; gap: 10px }
.fcol .brand { color: var(--canvas); font-size: 17px; font-weight: 900; letter-spacing: -.01em }
.fcol .fk { font-size: 11px; font-weight: 700; letter-spacing: .18em; color: rgba(245, 243, 238, .5) }
.fgrid a { color: rgba(245, 243, 238, .85); text-decoration: none }
.fgrid a:hover { text-decoration: underline }
.fbottom { max-width: 1080px; margin: 30px auto 0; padding-top: 16px; border-top: 2px solid rgba(245, 243, 238, .12); font-size: 13px; color: rgba(245, 243, 238, .6) }

/* ================================================================
   PRINTABLE PRACTICE SHEET
   Visible on screen inside .sheetwrap, and the only thing that
   prints when the visitor hits Print.
   ================================================================ */
.sheetwrap { margin-top: 28px; border: 2px solid var(--line); background: var(--paper); overflow-x: auto }
.sheet { width: 780px; margin: 0 auto; padding: 34px 38px 30px; background: var(--paper); color: #1A1A1A }
.sheet .sheet-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; border-bottom: 2px solid #1A1A1A; padding-bottom: 8px }
.sheet .sheet-head h3 { font-size: 21px; font-weight: 700; letter-spacing: -.01em }
.sheet .sheet-head span { font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #55504C; text-align: right }
.sheet .row { display: flex; align-items: center; gap: 10px; margin-top: 11px }
.sheet .row .lab { width: 34px; flex: none; font-size: 11px; font-weight: 700; letter-spacing: .06em; color: #55504C }
.sheet .row .boxes { display: flex; gap: 7px; flex: 1 }
.sheet .bx {
  width: 58px; height: 58px; border: 1px solid var(--trace); flex: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 38px; line-height: 1; font-weight: 400;
}
.sheet .bx.guide { color: var(--trace-ink) }
.sheet .bx.blank { color: transparent }
.sheet .sheet-foot { display: flex; justify-content: space-between; align-items: baseline; margin-top: 24px; padding-top: 8px; border-top: 2px solid #1A1A1A; font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #55504C }
.sheet-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; align-items: center }
.sheet-hint { font-size: 14px; color: var(--text-secondary) }

@media (max-width: 860px) {
  .sheet { width: 720px }
  .sheet .bx { width: 52px; height: 52px; font-size: 34px }
}

/* Printing a worksheet page must produce the worksheet and nothing else —
   not the nav, the breadcrumbs, the chips, the FAQ or the offer. Everything
   collapses except the section carrying .printsheet, and inside that section
   everything collapses except the sheet itself. */
@page { margin: 12mm }

@media print {
  nav, footer, .skip, .noprint, .pagehero { display: none !important }
  body { background: #fff }
  /* Scoped with :has() so it only applies on a page that actually has a
     printable sheet. Without the scope, printing a chart page would produce
     a blank sheet of paper. */
  main:has(.printsheet) > section:not(.printsheet) { display: none !important }
  .printsheet { padding: 0 !important }
  .printsheet > .wrap > *:not(.sheetwrap) { display: none !important }
  .sheetwrap { border: 0; margin: 0; overflow: visible; background: transparent }
  .sheet { width: 100%; padding: 0 3px 0 0; background: transparent; page-break-inside: avoid }
  /* Sized so all 15 rows fit one Letter/A4 page, and so the boxes span the
     full width of the paper instead of leaving a third of it empty. */
  .sheet .row { margin-top: 6px }
  .sheet .row .boxes { width: 100%; justify-content: space-between; gap: 0 }
  .sheet .bx { width: 48px; height: 48px; font-size: 31px; border-color: #C9BCA8 }
  .sheet .sheet-head { padding-bottom: 6px }
  .sheet .sheet-head h3 { font-size: 18px }
  .sheet .sheet-foot { margin-top: 14px; padding-top: 6px }
  .printonly { display: block !important }
}
.printonly { display: none }

/* ---------------- motion ---------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important }
  html { scroll-behavior: auto }
}
