:root {
  --paper: #F7F8F4;
  --ink: #0F1210;
  --blue: #1E4DFF;
  --orange: #FF6B35;
  --sage: #DCE7DC;
  --white: #FFFFFF;
  --muted: #5A625C;
  --line: rgba(15, 18, 16, 0.14);
  --line-strong: rgba(15, 18, 16, 0.3);
  --radius: 8px;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", "Roboto Mono", Consolas, "Liberation Mono", monospace;
  --page: 1200px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--paper);
  background-image:
    linear-gradient(to right, rgba(15, 18, 16, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 18, 16, 0.035) 1px, transparent 1px);
  background-size: 32px 32px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

::selection {
  background: var(--blue);
  color: var(--white);
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.mono {
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: 0.08em;
  font-variant-ligatures: none;
}

.skip-link {
  position: absolute;
  top: -120px;
  left: 16px;
  z-index: 120;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}

.skip-link:focus {
  top: 12px;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--paper);
  border-bottom: 1px solid var(--line-strong);
}

.header-inner {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 28px;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 28px;
  height: 28px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--blue);
  color: var(--white);
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
}

.brand-name {
  font-size: 17px;
  line-height: 1;
}

.brand-meta {
  font-size: 9px;
  color: var(--muted);
  padding-left: 10px;
  border-left: 1px solid var(--line-strong);
  line-height: 1.2;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 13px;
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}

.site-nav a:hover {
  background: var(--sage);
}

.site-nav .nav-download {
  margin-left: 6px;
  border: 1px solid var(--ink);
}

.site-nav .nav-download:hover {
  background: var(--ink);
  color: var(--paper);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--white);
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}

.nav-toggle-bar {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--ink);
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1),
.nav-toggle.is-open .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2),
.nav-toggle.is-open .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3),
.nav-toggle.is-open .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Page frame */

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

.layout {
  display: grid;
  grid-template-columns: 196px minmax(0, 1fr);
  column-gap: 56px;
  align-items: start;
}

main {
  min-width: 0;
}

/* Rail index */

.rail {
  position: sticky;
  top: 96px;
  align-self: start;
  padding: 66px 0 24px;
  min-width: 0;
}

.rail-label {
  margin: 0 0 18px;
  font-size: 9px;
  color: var(--muted);
}

.rail-nav {
  display: grid;
  border-top: 1px solid var(--line-strong);
}

.rail-nav a {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}

.rail-nav a .mono {
  font-size: 9px;
  color: var(--muted);
  min-width: 18px;
}

.rail-nav a:hover {
  color: var(--ink);
}

.rail-nav a.is-current {
  color: var(--ink);
}

.rail-nav a.is-current .mono {
  color: var(--blue);
}

.rail-nav a.is-current::after {
  content: "";
  width: 5px;
  height: 5px;
  margin-left: auto;
  background: var(--blue);
  align-self: center;
}

.rail-status {
  margin-top: 26px;
  padding-top: 14px;
  border-top: 1px solid var(--line-strong);
}

.rail-status-title {
  margin: 0 0 10px;
  font-size: 8.5px;
  color: var(--muted);
}

.rail-stats {
  margin: 0;
  display: grid;
  gap: 6px;
}

.rail-stats div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.rail-stats dt {
  font-size: 11px;
  color: var(--muted);
}

.rail-stats dd {
  margin: 0;
  font-size: 11px;
  color: var(--ink);
}

.rail-motto {
  margin: 16px 0 0;
  font-size: 8px;
  color: var(--muted);
  letter-spacing: 0.12em;
}

/* Hero */

.hero {
  padding: 62px 0 40px;
  min-width: 0;
}

.hero-title {
  margin: 0;
  font-size: inherit;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.055em;
}

.hero-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 24px;
  font-size: 15px;
  letter-spacing: 0.01em;
  line-height: 1;
}

.hero-brand .brand-mark {
  width: 22px;
  height: 22px;
  font-size: 12px;
  border-radius: 5px;
}

.hero-line {
  display: block;
  font-size: clamp(44px, 7.6vw, 96px);
  line-height: 0.98;
}

.hero-line--accent {
  color: var(--blue);
}

.hero-deck {
  margin: 28px 0 0;
  max-width: 620px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.btn-primary {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
}

.btn-primary:hover {
  background: #163fd4;
  border-color: #163fd4;
}

.btn-ghost {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}

.btn-ghost:hover {
  background: var(--ink);
  color: var(--paper);
}

/* Library dashboard */

.dashboard {
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--white);
  overflow: hidden;
}

.dashboard-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 18px;
  background: var(--ink);
  color: var(--paper);
}

.dashboard-id {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.live-dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--orange);
}

.dashboard-id h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0;
}

.dashboard-id .mono {
  font-size: 8.5px;
  color: rgba(247, 248, 244, 0.58);
  white-space: nowrap;
}

.dashboard-state {
  margin: 0;
  font-size: 8.5px;
  color: rgba(247, 248, 244, 0.58);
  white-space: nowrap;
}

.dashboard-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.search {
  flex: 1 1 250px;
  min-width: 0;
  height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--paper);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.search:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(30, 77, 255, 0.12);
}

.search-icon {
  position: relative;
  width: 13px;
  height: 13px;
  flex: none;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
}

.search-icon::after {
  content: "";
  position: absolute;
  right: -5px;
  bottom: -2px;
  width: 6px;
  height: 1.5px;
  background: var(--ink);
  transform: rotate(45deg);
  transform-origin: left center;
}

.search input {
  flex: 1;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.4;
  outline: none;
  appearance: none;
}

.search input::placeholder {
  color: var(--muted);
}

.search input::-webkit-search-cancel-button {
  cursor: pointer;
}

.search-key {
  flex: none;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 10px;
  color: var(--muted);
  background: var(--white);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 42px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.filter-btn .count {
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.filter-btn:hover {
  border-color: var(--ink);
  background: var(--sage);
}

.filter-btn[aria-pressed="true"] {
  border-color: var(--blue);
  background: var(--blue);
  color: var(--white);
}

.filter-btn[aria-pressed="true"] .count {
  color: rgba(255, 255, 255, 0.7);
}

.result-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
}

.result-row p {
  margin: 0;
}

.result-row p:first-child {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}

.result-row .mono {
  font-size: 8.5px;
  color: var(--muted);
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.book-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  background: var(--white);
}

.book-card.is-filtered {
  display: none;
}

.book-cover {
  margin: 0;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 6px;
  background: var(--sage);
}

.book-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.book-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.book-meta {
  margin: 0;
  font-size: 8.5px;
  color: var(--blue);
  line-height: 1.4;
}

.book-body h3 {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.book-desc {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.65;
}

.filter-empty {
  display: none;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 24px 18px;
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.filter-empty.is-visible {
  display: flex;
}

.filter-empty p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.filter-reset {
  padding: 8px 12px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--paper);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.filter-reset:hover {
  background: var(--blue);
  border-color: var(--blue);
}

/* Reader section */

.reader {
  margin-top: 72px;
  padding: clamp(22px, 4vw, 40px);
  border-radius: var(--radius);
  background-color: var(--ink);
  background-image:
    linear-gradient(to right, rgba(247, 248, 244, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(247, 248, 244, 0.05) 1px, transparent 1px);
  background-size: 36px 36px;
  color: var(--paper);
  overflow: hidden;
}

.reader-head {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
  gap: 28px;
  align-items: end;
  padding-top: 18px;
  border-top: 1px solid rgba(247, 248, 244, 0.28);
  margin-bottom: 30px;
}

.section-tag {
  margin: 0 0 10px;
  font-size: 9px;
  color: var(--blue);
}

.reader .section-tag {
  color: var(--orange);
}

.reader-head h2 {
  margin: 0;
  font-size: clamp(27px, 3.2vw, 42px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.reader-intro {
  margin: 0;
  max-width: 380px;
  justify-self: end;
  color: rgba(247, 248, 244, 0.64);
  font-size: 13px;
  line-height: 1.8;
}

.reader-stage {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  gap: clamp(20px, 3.4vw, 36px);
  align-items: stretch;
}

.reader-shot {
  margin: 0 auto;
  max-width: 420px;
  border: 1px solid rgba(247, 248, 244, 0.24);
  border-radius: var(--radius);
  background: #070907;
  overflow: hidden;
}

.reader-shot img {
  display: block;
  width: 100%;
  height: auto;
}

.reader-shot figcaption {
  padding: 9px 12px;
  border-top: 1px solid rgba(247, 248, 244, 0.18);
  font-size: 8px;
  color: rgba(247, 248, 244, 0.48);
}

.reader-notes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-auto-rows: minmax(0, 1fr);
  gap: 1px;
  border: 1px solid rgba(247, 248, 244, 0.16);
  background: rgba(247, 248, 244, 0.16);
}

.reader-notes li {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 17px 16px;
  background: #141815;
}

.note-index {
  font-size: 10px;
  color: var(--orange);
  padding-top: 3px;
}

.reader-notes h3 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.3;
}

.reader-notes p {
  margin: 0;
  color: rgba(247, 248, 244, 0.62);
  font-size: 12.5px;
  line-height: 1.7;
}

/* Section frame */

.section {
  margin-top: 72px;
  min-width: 0;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 32px;
  align-items: end;
  padding-top: 18px;
  border-top: 1px solid var(--ink);
  margin-bottom: 28px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(29px, 3.8vw, 46px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.section-head > p {
  margin: 0;
  max-width: 360px;
  justify-self: end;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

/* Bento */

.bento {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-areas:
    "progress progress progress category"
    "progress progress progress category"
    "offline offline night category";
  gap: 12px;
}

.bento-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: clamp(17px, 2vw, 22px);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--white);
}

.bento-block h3 {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.bento-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.bento-top p {
  margin: 0;
  font-size: 8.5px;
  color: var(--muted);
}

.bento-pill {
  padding: 3px 6px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  font-size: 8px;
  color: var(--muted);
}

.bento-copy {
  margin: 0;
  max-width: 34em;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.bento-foot {
  margin: auto 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 8px;
  color: var(--muted);
}

.bento-progress {
  grid-area: progress;
  justify-content: flex-start;
}

.bento-progress h3 {
  font-size: clamp(26px, 3vw, 34px);
}

.progress-list {
  list-style: none;
  margin: 12px 0 16px;
  padding: 0;
  display: grid;
  gap: 13px;
}

.progress-list li {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 62px;
  align-items: center;
  gap: 12px;
}

.progress-title {
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.progress-bar {
  height: 6px;
  border-radius: 99px;
  background: var(--sage);
  overflow: hidden;
}

.progress-fill {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--blue);
}

.progress-fill-one {
  width: 62%;
}

.progress-fill-two {
  width: 31%;
}

.progress-fill-three {
  width: 78%;
  background: var(--orange);
}

.progress-note {
  font-size: 8.5px;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
}

.bento-category {
  grid-area: category;
  background: var(--sage);
  border-color: rgba(15, 18, 16, 0.28);
}

.genre-list {
  list-style: none;
  margin: 8px 0 14px;
  padding: 0;
  display: grid;
}

.genre-list li {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(15, 18, 16, 0.16);
  font-size: 13px;
  font-weight: 700;
}

.genre-list li:first-child {
  border-top: 1px solid rgba(15, 18, 16, 0.16);
}

.genre-dot {
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: var(--blue);
}

.genre-list .mono {
  font-size: 9px;
  color: var(--muted);
  font-weight: 500;
}

.bento-category .bento-foot {
  border-top-color: rgba(15, 18, 16, 0.16);
}

.bento-offline {
  grid-area: offline;
}

.bento-night {
  grid-area: night;
}

.cache-strip {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: auto;
  padding: 11px 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 6px;
}

.cache-strip .mono {
  font-size: 8px;
  color: var(--muted);
  white-space: nowrap;
}

.cache-line {
  flex: 1;
  height: 1px;
  background: var(--line-strong);
}

.cache-arrow {
  color: var(--orange);
  font-size: 15px;
  line-height: 1;
}

.night-preview {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 7px;
  justify-content: center;
  min-height: 78px;
  margin-top: auto;
  padding: 12px 14px;
  border-radius: 6px;
  background: var(--ink);
}

.night-time {
  font-size: 8px;
  color: rgba(247, 248, 244, 0.5);
}

.night-line {
  display: block;
  width: 78%;
  height: 3px;
  border-radius: 99px;
  background: rgba(247, 248, 244, 0.32);
}

.night-line-short {
  width: 46%;
  background: rgba(247, 248, 244, 0.18);
}

.night-dot {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--orange);
}

/* Steps */

.step-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--ink);
}

.step-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  padding: 22px 24px 0 0;
  border-right: 1px solid var(--line);
}

.step-list li + li {
  padding-left: 24px;
}

.step-list li:last-child {
  border-right: 0;
  padding-right: 0;
}

.step-no {
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--blue);
}

.step-list h3 {
  margin: 2px 0 6px;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.step-list p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

/* FAQ */

.faq-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 48px;
  padding-top: 18px;
  border-top: 1px solid var(--ink);
}

.faq-intro h2 {
  margin: 0;
  font-size: clamp(29px, 3.3vw, 40px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.faq-intro > p:last-child {
  margin: 16px 0 0;
  max-width: 300px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

.faq-list {
  min-width: 0;
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 0;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  flex: none;
  width: 20px;
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
  color: var(--blue);
  text-align: center;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item summary:hover {
  color: var(--blue);
}

.faq-answer {
  padding: 0 0 18px;
}

.faq-answer p {
  margin: 0;
  max-width: 640px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.85;
}

/* Download */

.download-panel {
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--white);
  overflow: hidden;
}

.download-head {
  padding: clamp(20px, 3.4vw, 34px);
  border-bottom: 1px solid var(--ink);
  background: var(--sage);
}

.download-head h2 {
  margin: 0;
  font-size: clamp(28px, 3.8vw, 46px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.download-head > p:last-child {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.download-list {
  display: block;
}

.download-row:not([hidden]) {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) minmax(0, 0.9fr) 24px;
  align-items: center;
  gap: 18px;
  padding: 17px clamp(20px, 3.4vw, 34px);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  transition: background-color 0.16s ease, color 0.16s ease;
}

.download-row:last-child {
  border-bottom: 0;
}

.download-no {
  font-size: 10px;
  color: var(--muted);
}

.download-name {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.download-name strong {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.download-name .mono {
  font-size: 8px;
  color: var(--muted);
}

.download-desc {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}

.download-go {
  font-size: 18px;
  line-height: 1;
  text-align: right;
  color: var(--blue);
}

.download-row:hover {
  background: var(--blue);
  color: var(--white);
}

.download-row:hover .download-no,
.download-row:hover .download-desc,
.download-row:hover .download-name .mono {
  color: rgba(255, 255, 255, 0.72);
}

.download-row:hover .download-go {
  color: var(--white);
}

.download-row:focus-visible {
  outline: 3px solid rgba(30, 77, 255, 0.4);
  outline-offset: -3px;
}

/* Footer */

.site-footer {
  margin-top: 88px;
  background-color: var(--ink);
  background-image:
    linear-gradient(to right, rgba(247, 248, 244, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(247, 248, 244, 0.045) 1px, transparent 1px);
  background-size: 32px 32px;
  color: var(--paper);
}

.footer-inner {
  max-width: var(--page);
  margin: 0 auto;
  padding: 46px 28px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.55fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.brand-inverse {
  color: var(--paper);
}

.footer-brand p {
  margin: 14px 0 0;
  color: rgba(247, 248, 244, 0.58);
  font-size: 13px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  padding-top: 4px;
}

.footer-nav a {
  color: rgba(247, 248, 244, 0.72);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}

.footer-nav a:hover {
  color: var(--paper);
}

.footer-meta {
  text-align: right;
}

.footer-meta p {
  margin: 0;
}

.footer-meta .mono {
  font-size: 8.5px;
  color: rgba(247, 248, 244, 0.45);
}

.footer-meta p:last-child {
  margin-top: 12px;
  color: rgba(247, 248, 244, 0.58);
  font-size: 12px;
}

.footer-meta a {
  color: var(--paper);
  text-decoration: none;
  border-bottom: 1px solid rgba(247, 248, 244, 0.35);
}

.footer-meta a:hover {
  border-bottom-color: var(--paper);
}

.site-footer :focus-visible,
.reader :focus-visible {
  outline-color: var(--orange);
}

/* Error page */

.error-main {
  max-width: 980px;
  margin: 0 auto;
  padding: clamp(70px, 13vh, 150px) 28px clamp(80px, 12vh, 140px);
}

.error-code {
  margin: 0 0 18px;
  font-size: 10px;
  color: var(--blue);
}

.error-main h1 {
  margin: 0;
  max-width: 900px;
  font-size: clamp(28px, 8.7vw, 92px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.error-main > p:not(.error-code) {
  margin: 24px 0 0;
  max-width: 520px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.85;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.error-strip {
  margin-top: 56px;
  padding-top: 16px;
  border-top: 1px solid var(--ink);
  display: flex;
  justify-content: space-between;
  gap: 18px;
  font-size: 9px;
  color: var(--muted);
}

/* Responsive */

@media (max-width: 1120px) {
  .layout {
    grid-template-columns: 172px minmax(0, 1fr);
    column-gap: 40px;
  }

  .brand-meta {
    display: none;
  }

  .progress-list li {
    grid-template-columns: 76px minmax(0, 1fr) 56px;
  }
}

@media (max-width: 980px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .rail {
    display: none;
  }

  .hero {
    padding-top: 48px;
  }

  .bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "progress category"
      "offline night";
  }

  .reader-stage {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  }
}

@media (max-width: 820px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 10px 20px 20px;
    border-bottom: 1px solid var(--line-strong);
    background: var(--paper);
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .site-nav a {
    justify-content: space-between;
    min-height: 44px;
    padding: 0 12px;
  }

  .site-nav .nav-download {
    margin-left: 0;
    margin-top: 6px;
  }

  .reader-stage {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .reader-shot {
    max-width: 380px;
  }

  .reader-notes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reader-notes li {
    grid-template-columns: 32px minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .page {
    padding: 0 20px;
  }

  .header-inner {
    padding: 0 20px;
  }

  .hero {
    padding-top: 40px;
  }

  .hero-deck {
    font-size: 15px;
  }

  .section-head,
  .reader-head {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .section-head > p,
  .reader-intro {
    justify-self: start;
  }

  .book-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bento {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "progress"
      "category"
      "offline"
      "night";
  }

  .faq-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
  }

  .faq-intro > p:last-child {
    max-width: 420px;
  }

  .step-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .step-list li {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 20px 0;
  }

  .step-list li + li {
    padding-left: 0;
  }

  .step-list li:last-child {
    border-bottom: 0;
    padding-bottom: 0;
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .footer-meta {
    grid-column: 1 / -1;
    text-align: left;
    padding-top: 10px;
    border-top: 1px solid rgba(247, 248, 244, 0.18);
  }
}

@media (max-width: 620px) {
  .dashboard-tools {
    padding: 12px;
  }

  .search {
    flex-basis: 100%;
    height: 40px;
  }

  .search-key {
    display: none;
  }

  .filter-btn {
    height: 38px;
    padding: 0 10px;
    font-size: 12px;
  }

  .book-card {
    padding: 10px;
  }

  .book-body h3 {
    font-size: 17px;
  }

  .book-desc {
    font-size: 12px;
  }

  .reader {
    padding: 18px;
    margin-top: 52px;
  }

  .reader-notes {
    grid-template-columns: minmax(0, 1fr);
  }

  .reader-notes li {
    grid-template-columns: 32px minmax(0, 1fr);
    padding: 15px 14px;
  }

  .section,
  .faq-section,
  .download-section {
    margin-top: 52px;
  }

  .dashboard-id .mono {
    display: none;
  }

  .download-row:not([hidden]) {
    grid-template-columns: 30px minmax(0, 1fr) 20px;
    gap: 12px;
    padding: 15px 18px;
  }

  .download-desc {
    display: none;
  }

  .download-name strong {
    font-size: 16px;
  }

  .footer-inner {
    padding: 38px 20px;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .footer-meta {
    grid-column: auto;
  }

  .error-main {
    padding-left: 20px;
    padding-right: 20px;
  }
}

@media (max-width: 440px) {
  .page {
    padding: 0 16px;
  }

  .header-inner {
    padding: 0 16px;
    min-height: 62px;
  }

  .hero-line {
    font-size: 43px;
  }

  .hero-brand {
    margin-bottom: 20px;
  }

  .hero-deck {
    margin-top: 22px;
    line-height: 1.8;
  }

  .hero-actions {
    margin-top: 22px;
  }

  .btn {
    min-height: 44px;
    padding: 0 18px;
  }

  .result-row {
    padding: 9px 12px;
  }

  .book-grid {
    gap: 1px;
  }

  .book-card {
    padding: 9px;
    gap: 9px;
  }

  .book-meta {
    font-size: 8px;
  }

  .book-body h3 {
    font-size: 16px;
  }

  .book-desc {
    font-size: 12px;
    line-height: 1.6;
  }

  .filter-empty {
    padding: 18px 12px;
  }

  .reader {
    padding: 16px;
  }

  .reader-shot {
    max-width: none;
  }

  .section-head h2,
  .faq-intro h2 {
    font-size: 28px;
  }

  .bento-block {
    padding: 16px;
  }

  .progress-list li {
    grid-template-columns: 70px minmax(0, 1fr) 52px;
    gap: 9px;
  }

  .progress-title {
    font-size: 12px;
  }

  .download-head {
    padding: 18px;
  }

  .error-strip {
    flex-direction: column;
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}