/* yomikei.com: one stylesheet for all pages (the homepage design "D": manga ink and panels, with room). */
/* Design D, "Ink and panels, with room": A's manga vocabulary (caption boxes, screentone, a yonkoma for the plan, a
   panel of focus lines to close) laid out with B's space. Only things that are panels get a border: the hotkey and
   the four steps of the plan. Everything else sits on open paper.
   Colours (2026-10-19, Argon's palette): warm paper and soft ink instead of pure white and black; quiet 1px lines
   (--line) rather than ink borders; things you touch (keycaps, the email box, the theme switch) on a slightly raised
   surface (--surface); the manga page unframed with a soft shadow. Light "Tankōbon", dark "Sumi ink". */
:root {
  color-scheme: light;
  --paper: #f6f3ec;
  --surface: #fdfbf7;
  --ink: #1c1b1a;
  --soft: #5c5852;
  --line: #dcd6cc;
  --tone: rgb(28 27 26 / 0.12);
  --orange: #e07828;
  --on-orange: #1c1b1a;
  --page-shadow: 0 20px 40px rgb(28 27 26 / 0.14);
  --rule: 1px;
  --air: clamp(96px, 12vw, 168px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { color-scheme: dark; --paper: #161514; --surface: #22201e; --ink: #eae5df; --soft: #a39e96; --line: #363330; --tone: rgb(234 229 223 / 0.08); --orange: #f29145; --on-orange: #161514; --page-shadow: 0 20px 40px rgb(0 0 0 / 0.4); --page-dim: brightness(0.92); }
}
:root[data-theme="dark"] { color-scheme: dark; --paper: #161514; --surface: #22201e; --ink: #eae5df; --soft: #a39e96; --line: #363330; --tone: rgb(234 229 223 / 0.08); --orange: #f29145; --on-orange: #161514; --page-shadow: 0 20px 40px rgb(0 0 0 / 0.4); --page-dim: brightness(0.92); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.75 "Zen Kaku Gothic New", "Yu Gothic UI", system-ui, sans-serif; }
a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 4px; }
a:hover { text-decoration-color: var(--orange); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.page { max-width: 1160px; margin: 0 auto; padding: 0 32px; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 26px 0 22px; border-bottom: var(--rule) solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font: 800 22px/1 "Shippori Mincho B1", "Yu Mincho", serif; }
.brand img { width: 34px; height: 34px; border: 2px solid var(--line); }
.top nav { display: flex; align-items: center; gap: 26px; font-weight: 500; }
.top nav a { text-decoration: none; }
.top nav a:hover { text-decoration: underline; text-decoration-color: var(--orange); }
button.theme { width: 38px; height: 38px; display: grid; place-items: center; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 4px; cursor: pointer; }
button.theme svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
button.theme[hidden], button.theme svg[hidden] { display: none; }

.panel { border: var(--rule) solid var(--line); background: var(--paper); position: relative; }
.tone { background-image: radial-gradient(var(--tone) 28%, transparent 31%); background-size: 7px 7px; }
.caption { display: inline-block; background: var(--ink); color: var(--paper); padding: 5px 13px 6px; font: 800 15px/1.4 "Shippori Mincho B1", "Yu Mincho", serif; }

/* hero: the headline on open paper, the page as the one tall panel */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.86fr); gap: clamp(40px, 6vw, 88px); align-items: start; padding: 88px 0 0; }
.hero > * { min-width: 0; }
.hero h1 { font: 800 clamp(48px, 6vw, 82px)/1.08 "Shippori Mincho B1", "Yu Mincho", serif; margin: 28px 0 36px; letter-spacing: -0.01em; }
.lede { font-size: 19px; margin: 0 0 40px; max-width: 30em; }
.keys { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 0 0 44px; font-weight: 500; }
.keycap {
  font: 700 16px/1 "Zen Kaku Gothic New", system-ui, sans-serif; color: var(--ink); background: var(--surface); cursor: pointer;
  border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 9px 13px 7px; min-width: 46px;
  transition: transform .08s, border-bottom-width .08s;
}
.keycap:active, .keycap[aria-pressed="true"] { transform: translateY(1px); border-bottom-width: 1px; }
.keys .plus { font-weight: 700; }
form.signup { display: flex; max-width: 520px; }
form.signup input[type=email] { flex: 1; min-width: 0; font: 500 17px/1 "Zen Kaku Gothic New", sans-serif; padding: 16px 15px; border: var(--rule) solid var(--line); border-right: 0; background: var(--surface); color: var(--ink); border-radius: 0; }
form.signup input::placeholder { color: var(--soft); }
.btn { font: 800 17px/1 "Shippori Mincho B1", "Yu Mincho", serif; background: var(--orange); color: var(--on-orange); border: var(--rule) solid var(--orange); padding: 16px 20px; cursor: pointer; text-decoration: none; display: inline-block; }
.btn:hover { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn:disabled { opacity: .6; cursor: wait; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; }
.signup-msg { font-size: 14px; color: var(--soft); margin: 12px 0 0; }
.signup-msg.ok { color: var(--ink); font-weight: 700; }
.signup-msg.bad { color: var(--ink); font-weight: 700; text-decoration: underline wavy var(--orange); }

.demo-panel .yk-demo { --yk-paper: var(--paper); --yk-letter: var(--ink); }
.panel.demo-panel { border: 0; border-radius: 6px; overflow: hidden; box-shadow: var(--page-shadow); }
.demo-panel .yk-page { filter: var(--page-dim, none); }
.credit { font-size: 12px; color: var(--soft); margin: 10px 0 0; text-align: right; }

/* features: open paper, caption-box titles, wide gaps; one screentone panel for the hotkey */
.features { padding-top: var(--air); }
.hotkey { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px; align-items: center; padding: 44px 48px; margin-bottom: 96px; }
.hotkey .white-box { background: var(--surface); padding: 22px 26px; border: 2px solid var(--line); max-width: 30em; }
.hotkey h3, .list h3 { margin: 0 0 14px; }
.hotkey h3 .caption, .list h3 .caption { font-size: 17px; }
.hotkey p { margin: 0; }
.bigkeys { display: flex; flex-wrap: wrap; gap: 10px; }
.bigkeys span { font: 800 26px/1 "Shippori Mincho B1", "Yu Mincho", serif; background: var(--surface); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 16px 18px 12px; }
.list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: clamp(36px, 5vw, 72px); row-gap: 72px; margin: 0; padding: 0; list-style: none; }
.list li { min-width: 0; }
.list p { margin: 0; max-width: 28em; }
.quiet { display: flex; align-items: center; justify-content: space-between; gap: 32px; margin-top: 96px; padding-top: 0; }
.quiet > div { max-width: 30em; }
.quiet p { margin: 0; }
.sfx { font: 700 clamp(56px, 9vw, 120px)/1 "Zen Kaku Gothic New", sans-serif; letter-spacing: 0.04em; transform: rotate(-6deg); margin-right: 3vw; }

/* the plan: a yonkoma, with the closing panel beside it */
.plan { display: grid; grid-template-columns: minmax(0, 500px) minmax(0, 1fr); gap: clamp(48px, 8vw, 120px); align-items: center; padding-top: var(--air); }
.plan > * { min-width: 0; }
h2.chapter { font: 800 clamp(32px, 4vw, 46px)/1.1 "Shippori Mincho B1", "Yu Mincho", serif; margin: 0 0 32px; }
.strip { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.koma { padding: 20px 22px 22px; display: grid; grid-template-columns: 112px 1fr; gap: 16px; align-items: start; }
.koma .when { font: 800 16px/1.4 "Shippori Mincho B1", "Yu Mincho", serif; }
.koma h3 { margin: 0; font: 700 20px/1.35 "Zen Kaku Gothic New", sans-serif; }
.koma p { margin: 4px 0 0; }
.status { display: inline-block; font-size: 13px; font-weight: 700; border: 2px solid var(--line); padding: 0 8px; margin-left: 8px; vertical-align: 2px; line-height: 1.6; }
.status.now { background: var(--orange); color: var(--on-orange); }
.aside-note { color: var(--soft); margin: 16px 0 0; }
/* closing: a panel of focus lines (集中線) aimed at the question */
.closing { display: grid; }
.focus { min-height: 480px; display: grid; place-items: center; padding: 56px 28px; overflow: hidden; }
.focus::before {
  content: ""; position: absolute; inset: 0;
  background: repeating-conic-gradient(from 1deg at 50% 50%, var(--ink) 0deg 0.55deg, transparent 0.55deg 3.1deg),
              repeating-conic-gradient(from 0deg at 50% 50%, var(--ink) 0deg 0.3deg, transparent 0.3deg 1.9deg);
  -webkit-mask: radial-gradient(ellipse 72% 68% at 50% 50%, transparent 46%, #000 100%);
  mask: radial-gradient(ellipse 72% 68% at 50% 50%, transparent 46%, #000 100%);
}
.focus-box { position: relative; background: var(--surface); border: 2px solid var(--line); padding: 34px 38px 38px; text-align: center; max-width: 440px; }
.focus h2 { font: 800 clamp(26px, 3.2vw, 36px)/1.2 "Shippori Mincho B1", "Yu Mincho", serif; margin: 0 0 26px; }

footer { border-top: var(--rule) solid var(--line); margin-top: var(--air); padding: 22px 0 80px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 14px; }
footer span:last-child { display: flex; gap: 20px; flex-wrap: wrap; }

@media (max-width: 960px) {
  .hero, .plan { grid-template-columns: minmax(0, 1fr); }
  .hero { padding-top: 56px; }
  .list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  :root { --air: 88px; }
  .page { padding: 0 18px; }
  .top nav { gap: 14px; } .top nav .hide-sm { display: none; }
  .hero { padding-top: 40px; }
  .hero h1 { font-size: 42px; margin: 20px 0 26px; }
  .keys-label { flex-basis: 100%; }
  form.signup { flex-direction: column; }
  form.signup input[type=email] { border-right: var(--rule) solid var(--line); border-bottom: 0; }
  .hotkey { grid-template-columns: minmax(0, 1fr); padding: 22px; margin-bottom: 64px; }
  .bigkeys span { font-size: 19px; padding: 11px 13px 8px; }
  .list { grid-template-columns: minmax(0, 1fr); row-gap: 48px; }
  .quiet { flex-direction: column; align-items: flex-start; margin-top: 56px; }
  .koma { grid-template-columns: 1fr; gap: 4px; }
  .focus { min-height: 380px; padding: 40px 18px; }
  .focus-box { padding: 26px 20px 28px; }
}

/* Japanese pages: headings break between phrases (at <wbr>), not inside words */
:lang(ja) .hero h1 { font-size: clamp(38px, 4.4vw, 60px); line-height: 1.32; word-break: keep-all; overflow-wrap: anywhere; }
:lang(ja) .lede { line-height: 1.9; }
:lang(ja) .focus h2 { word-break: keep-all; }

/* privacy policy */
.policy { max-width: 42em; padding: 80px 0 0; }
.policy h1 { font: 800 clamp(36px, 5vw, 56px)/1.15 "Shippori Mincho B1", "Yu Mincho", serif; margin: 0 0 14px; }
.policy .updated { color: var(--soft); margin: 0 0 40px; }
.policy .tldr { font-size: 19px; border-left: 6px solid var(--orange); padding: 2px 0 2px 20px; margin: 0 0 8px; }
.policy h2 { font: 800 26px/1.3 "Shippori Mincho B1", "Yu Mincho", serif; margin: 56px 0 12px; }
.policy p { margin: 0 0 14px; }

/* the download button, before there's anything to download (shared/download.js knocks it off the wall) */
.dl-spot { display: inline-grid; margin: 0 0 40px; }
.dl-spot > * { grid-area: 1 / 1; }
.dl-under { margin: 0; display: grid; place-items: center; padding: 0 18px; border: 2px dashed var(--soft); color: var(--soft); font: 800 17px/1.2 "Shippori Mincho B1", "Yu Mincho", serif; }
.dl {
  position: relative; z-index: 90; display: inline-flex; align-items: center; gap: 14px; text-align: left; cursor: pointer; user-select: none; -webkit-user-select: none;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); padding: 14px 26px 14px 20px;
  transform-origin: calc(100% - 11px) 11px; -webkit-tap-highlight-color: transparent;
}
.dl svg { width: 30px; height: 30px; flex: none; fill: none; stroke: var(--soft); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.dl-main { display: block; font: 800 20px/1.2 "Shippori Mincho B1", "Yu Mincho", serif; }
.dl-sub { display: block; font: 500 13px/1.3 "Zen Kaku Gothic New", sans-serif; color: var(--soft); margin-top: 3px; }
.screw { position: absolute; top: 7px; width: 8px; height: 8px; border-radius: 50%; background: linear-gradient(45deg, transparent 40%, var(--soft) 40% 60%, transparent 60%), var(--line); }
.screw.l { left: 7px; } .screw.r { right: 7px; }
.screw.pop { animation: screw-pop 0.8s cubic-bezier(.5, 0, .9, .6) forwards; }
@keyframes screw-pop { 30% { transform: translate(-14px, -18px) rotate(200deg); } 100% { transform: translate(-36px, 220px) rotate(720deg); opacity: 0; } }
.dl.fallen { position: absolute; left: 0; top: 0; margin: 0; z-index: 90; transform-origin: 50% 50%; touch-action: none; cursor: grab; box-shadow: 0 6px 16px rgb(0 0 0 / 0.25); }
.dl.fallen .dl-main, .dl.fallen .dl-sub { white-space: nowrap; }
.dl.fallen:active { cursor: grabbing; }
.dl-sfx { position: fixed; z-index: 100; pointer-events: none; white-space: nowrap; color: var(--ink); text-shadow: 2px 2px 0 var(--orange); font: 800 30px/1 "Shippori Mincho B1", "Yu Mincho", serif; animation: dl-sfx 0.75s ease-out forwards; }
@keyframes dl-sfx {
  0% { opacity: 0; transform: translate(-50%, -50%) rotate(var(--r)) scale(0.5); }
  20% { opacity: 1; transform: translate(-50%, -70%) rotate(var(--r)) scale(1.15); }
  100% { opacity: 0; transform: translate(-50%, -110%) rotate(var(--r)) scale(1); }
}
.dl-spot.told > .dl-under { grid-area: 2 / 1; border: 0; padding: 10px 0 0; place-items: start; }
.dl-spot.near > .dl-under { border-color: var(--orange); border-style: solid; color: var(--ink); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
