@font-face {
  font-family: "Figtree";
  src: url("assets/fonts/figtree-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("assets/fonts/figtree-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #F8F8F8;
  --paper: #FFFFFF;
  --ink: #18181C;
  --ink-2: #3E3E48;
  --ink-3: #565662;
  --fill-1: #F2F3F7;
  --fill-2: #E5E7EF;
  --fill-3: #C9CCD6;
  --rule: rgba(24, 24, 28, 0.10);

  --jp: #DF4034;
  --jp-fill: #C8352B;
  --jp-hover: #B42C22;
  --jp-text: #B6281F;
  --insight: #FAF4E6;
  --insight-ink: #665327;

  --shadow-plate: 0 1px 3px rgba(18, 20, 28, 0.04), 0 16px 36px -16px rgba(18, 20, 28, 0.09);
  --shadow-island: 0 2px 6px rgba(16, 18, 26, 0.08), 0 12px 28px -12px rgba(16, 18, 26, 0.16);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  --sans: "Figtree", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --font-ja: "Figtree", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", "Yu Gothic", "Meiryo", sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scrollbar-width: thin;
  scrollbar-color: var(--fill-3) var(--bg);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--fill-3); border-radius: 999px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--ink-3); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 500 16px/1.68 var(--sans);
  caret-color: var(--jp);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 3px; }
[lang="ja"] { font-family: var(--font-ja); }
.tnum { font-variant-numeric: tabular-nums; }
.chip-inline {
  display: inline-block;
  font-size: 0.875em;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 6px;
  background: var(--fill-1);
  color: var(--ink);
}
::selection { background: rgba(200, 53, 43, 0.16); color: var(--ink); }
:focus-visible { outline: 2px solid var(--jp-fill); outline-offset: 3px; border-radius: 8px; }

.skip {
  position: absolute; left: -999px; top: 12px; z-index: 120;
  background: var(--ink); color: #FFFFFF; padding: 10px 16px; border-radius: 10px; font-weight: 600;
  text-decoration: none;
}
.skip:focus { left: 16px; }

/* ═══════════ Shared EJU+ Three-Island Architectural Top Bar ═══════════ */
.eju-topbar-wrap {
  position: sticky;
  top: 16px;
  z-index: 60;
  padding-inline: 24px;
  pointer-events: none;
}
.eju-topbar {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.topbar-brand,
.topbar-tabs,
.topbar-actions {
  pointer-events: auto;
}
.topbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 15px;
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  box-shadow: inset 0 0 0 1px rgba(24, 24, 28, 0.08), var(--shadow-island);
  transition: transform 0.18s var(--ease);
}
.topbar-brand:hover { transform: translateY(-1px); }
.topbar-brand svg { display: block; }
.brand-sep { width: 1px; height: 14px; background: rgba(24, 24, 28, 0.16); }
.brand-tag { font-size: 13px; font-weight: 700; color: var(--ink-2); }

.topbar-tabs {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 44px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(24, 26, 34, 0.92);
  box-shadow: var(--shadow-island);
}
.topbar-tabs a {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 14px;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 600;
  color: #FFFFFF;
  text-decoration: none;
  transition: background-color 0.18s, color 0.18s;
}
.topbar-tabs a:hover { background: rgba(255, 255, 255, 0.13); }
.topbar-tabs a[aria-current="page"] { background: #FFFFFF; color: var(--ink); }

.topbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.topbar-login {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  padding: 0 15px;
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: inset 0 0 0 1px rgba(24, 24, 28, 0.10), var(--shadow-island);
  transition: transform 0.18s var(--ease), background-color 0.18s;
}
.topbar-login:hover { transform: translateY(-1px); background: var(--fill-1); }

.topbar-launch {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  background: var(--jp-fill);
  color: #FFFFFF;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  box-shadow: var(--shadow-island);
  transition: transform 0.18s var(--ease), background-color 0.18s;
}
.topbar-launch:hover { transform: translateY(-1px); background: var(--jp-hover); }

/* ═══════════ Read-Mode Shell, Breadcrumb & Fixed-Scale Typography ═══════════ */
.doc-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 36px 24px 64px;
}
.breadcrumb ol {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-3);
}
.breadcrumb li + li::before {
  content: "/";
  margin-right: 8px;
  color: var(--ink-3);
}
.breadcrumb a {
  text-decoration: none;
  color: var(--ink-2);
}
.breadcrumb a:hover { color: var(--jp-text); text-decoration: underline; }
.breadcrumb [aria-current="page"] { color: var(--ink); }

.doc-hero {
  margin-top: 18px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--rule);
}
.doc-hero h1 {
  margin: 0;
  font-size: 2.125rem;
  line-height: 1.22;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--ink);
  text-wrap: balance;
}
.doc-lead {
  margin: 12px 0 0;
  max-width: 72ch;
  font-size: 1rem;
  line-height: 1.68;
  color: var(--ink-2);
}

/* ═══════════ Two-Column Sticky TOC + Article Layout ═══════════ */
.doc-grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}
.doc-toc {
  position: sticky;
  top: 84px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  border-radius: 16px;
  background: var(--paper);
  box-shadow: inset 0 0 0 1px rgba(24, 24, 28, 0.06);
}
.doc-toc a {
  display: block;
  padding: 8px 12px;
  border-radius: 9px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-2);
  text-decoration: none;
  transition: background-color 0.16s, color 0.16s;
}
.doc-toc a:hover {
  background: var(--fill-1);
  color: var(--ink);
}

.doc-article {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}
.doc-plate {
  background: var(--paper);
  border-radius: 22px;
  padding: 28px 32px;
  box-shadow: inset 0 0 0 1px rgba(24, 24, 28, 0.06), var(--shadow-plate);
  scroll-margin-top: 84px;
}
.doc-plate h2 {
  margin: 0 0 10px;
  font-size: 1.4375rem;
  line-height: 1.28;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-wrap: balance;
}
.doc-plate h3 {
  margin: 24px 0 10px;
  font-size: 1.0625rem;
  line-height: 1.35;
  font-weight: 700;
  color: var(--ink);
}
.doc-plate > p {
  margin: 0;
  max-width: 72ch;
  font-size: 0.96875rem;
  line-height: 1.7;
  color: var(--ink-2);
}

/* Platform Rows (Flat Hairline Dividers — Zero Nested Shadowed Cards) */
.platform-list {
  margin-top: 18px;
  border-top: 1px solid var(--rule);
}
.platform-row {
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  scroll-margin-top: 84px;
}
.platform-main {
  flex: 1 1 420px;
  max-width: 68ch;
}
.platform-main h3 {
  margin: 0 0 6px;
}
.platform-main p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--ink-2);
}
.platform-main a {
  color: var(--jp-text);
  font-weight: 600;
}

.doc-steps {
  margin: 10px 0 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9375rem;
  color: var(--ink-2);
}
.btn-doc {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.18s var(--ease), background-color 0.18s;
}
.btn-doc-vermilion { background: var(--jp-fill); color: #FFFFFF; }
.btn-doc-vermilion:hover { transform: translateY(-1px); background: var(--jp-hover); }
.btn-doc-ink { background: var(--ink); color: #FFFFFF; }
.btn-doc-ink:hover { transform: translateY(-1px); background: #2A2B33; }

.doc-note {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--insight);
  color: var(--ink-2);
  font-size: 0.9rem;
  line-height: 1.62;
}
.doc-note strong { color: var(--insight-ink); }

/* ═══════════ Responsive Sticky Data Table (@container Stacked Mobile) ═══════════ */
.table-wrapper {
  margin-top: 18px;
  overflow: auto;
  max-inline-size: 100%;
  container-type: inline-size;
}
.doc-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--rule);
  border-radius: 14px;
  overflow: clip;
  font-size: 0.9rem;
  line-height: 1.56;
}
.doc-table caption {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink-3);
  background: var(--fill-1);
  border-bottom: 1px solid var(--rule);
}
.doc-table thead {
  position: sticky;
  inset-block-start: 0;
  z-index: 1;
}
.doc-table thead th {
  padding: 12px 14px;
  text-align: left;
  font-weight: 700;
  color: var(--ink);
  background: var(--fill-1);
  border-bottom: 1px solid var(--rule);
  white-space: nowrap;
}
.doc-table tbody th,
.doc-table tbody td {
  padding: 14px;
  vertical-align: top;
  border-bottom: 1px solid var(--rule);
}
.doc-table tbody tr:last-child th,
.doc-table tbody tr:last-child td {
  border-bottom: 0;
}
.doc-table tbody th {
  position: sticky;
  inset-inline-start: 0;
  text-align: left;
  font-weight: 700;
  color: var(--ink);
  background: var(--paper);
  min-width: 122px;
}
.th-sub {
  display: block;
  margin-top: 2px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-3);
}
.doc-table tbody td {
  color: var(--ink-2);
}

@container (width < 600px) {
  .doc-table,
  .doc-table caption,
  .doc-table thead,
  .doc-table tbody,
  .doc-table tr,
  .doc-table th,
  .doc-table td {
    display: block;
  }
  .doc-table thead {
    display: none;
  }
  .doc-table tr {
    border-bottom: 1px solid var(--rule);
  }
  .doc-table tr:last-child {
    border-bottom: 0;
  }
  .doc-table tbody th {
    position: sticky;
    inset-block-start: 0;
    z-index: 2;
    background: var(--fill-1);
    border-bottom: 1px solid var(--rule);
  }
  .doc-table tbody td {
    padding: 11px 14px;
  }
  .doc-table {
    --label-2: "时长与分值";
    --label-3: "常见失分点";
    --label-4: "EJU+ 工具";
  }
  .doc-table td:nth-child(2)::before {
    content: var(--label-2) "：";
    font-weight: 700;
    color: var(--ink);
  }
  .doc-table td:nth-child(3)::before {
    content: var(--label-3) "：";
    font-weight: 700;
    color: var(--ink);
  }
  .doc-table td:nth-child(4)::before {
    content: var(--label-4) "：";
    font-weight: 700;
    color: var(--ink);
  }
}

/* Bullets, Wordbook Catalog Grid & Glossary */
.doc-bullets {
  margin: 12px 0 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 72ch;
  font-size: 0.9375rem;
  line-height: 1.66;
  color: var(--ink-2);
}
.doc-bullets strong { color: var(--ink); }

.catalog-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.catalog-box {
  padding: 18px 20px;
  border-radius: 16px;
  background: var(--fill-1);
}
.catalog-box h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}
.catalog-box p {
  margin: 0 0 10px;
  font-size: 0.875rem;
  line-height: 1.58;
  color: var(--ink-2);
}
.catalog-box ul {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
}

.term-dl {
  margin: 12px 0 0;
  border-top: 1px solid var(--rule);
}
.term-dl > div {
  padding: 13px 0;
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 14px;
  align-items: baseline;
}
.term-dl dt {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--ink);
}
.term-dl dd {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.62;
  color: var(--ink-2);
}

/* Native <details> FAQ Stack */
.faq-stack {
  margin-top: 14px;
  border-top: 1px solid var(--rule);
}
.faq-stack details {
  border-bottom: 1px solid var(--rule);
  padding: 14px 0;
}
.faq-stack summary {
  cursor: pointer;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.45;
}
.faq-stack summary:hover { color: var(--jp-text); }
.faq-stack details p {
  margin: 10px 0 2px;
  max-width: 70ch;
  font-size: 0.9375rem;
  line-height: 1.68;
  color: var(--ink-2);
}
.faq-stack details a {
  color: var(--jp-text);
  font-weight: 600;
}

/* Footer */
.doc-footer {
  border-top: 1px solid var(--rule);
  padding: 28px 24px 44px;
  color: var(--ink-3);
  font-size: 0.875rem;
}
.doc-footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px 32px;
}
.doc-foot-left {
  max-width: 66ch;
}
.foot-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}
.foot-disclaimer {
  margin: 8px 0 0;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--ink-3);
}
.doc-foot-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  font-weight: 600;
  color: var(--ink);
}
.doc-foot-links a { text-decoration: none; }
.doc-foot-links a:hover { color: var(--jp-text); text-decoration: underline; }

@media (forced-colors: active) {
  .doc-plate, .doc-toc, .topbar-brand, .topbar-tabs, .topbar-login, .topbar-launch, .btn-doc {
    outline: 1px solid CanvasText;
  }
}

/* Responsive Breakpoints */
@media (max-width: 900px) {
  .eju-topbar-wrap { top: 12px; padding-inline: 16px; }
  .topbar-tabs, .brand-sep, .brand-tag { display: none; }
  .doc-shell { padding: 26px 16px 48px; }
  .doc-grid { grid-template-columns: 1fr; gap: 20px; }
  .doc-toc {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 8px;
  }
  .catalog-grid { grid-template-columns: 1fr; }
  .term-dl > div { grid-template-columns: 1fr; gap: 4px; }
}

@media (max-width: 560px) {
  .topbar-brand, .topbar-login, .topbar-launch { height: 40px; padding-inline: 11px; font-size: 12.5px; }
  .doc-hero h1 { font-size: 1.625rem; }
  .doc-plate { padding: 22px 18px; border-radius: 18px; }
  .platform-cta, .btn-doc { width: 100%; }
}
