* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text);
  background: #f8fafc;
}

a {
  color: #244ac7;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: #1d3aa8;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: 10px;
  z-index: 10;
  transform: translateY(-140%);
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  padding: 10px 14px;
  box-shadow: var(--shadow-md);
}

.skip-link:focus {
  transform: translateY(0);
  outline: 3px solid var(--focus-ring);
}

.manual-header {
  border-bottom: 1px solid var(--panel-border);
  background: rgba(255, 255, 255, 0.96);
}

.manual-nav {
  width: min(1180px, calc(100% - 32px));
  min-height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.manual-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-family: var(--font-ui);
  font-weight: 700;
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(3, 1fr);
  align-items: center;
  justify-items: center;
  gap: 3px;
  padding: 6px;
  background: #3b5bdb;
}

.brand-mark span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #ffffff;
}

.manual-nav-links {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 14px;
}

.manual-page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 56px;
}

.manual-hero {
  padding: clamp(28px, 6vw, 70px) 0 34px;
  max-width: 880px;
}

.eyebrow {
  margin: 0 0 10px;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
  color: #244ac7;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.manual-hero h1 {
  margin: 0;
  max-width: 760px;
  font-family: var(--font-ui);
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.03;
  letter-spacing: 0;
  color: #0f172a;
}

.manual-lede {
  max-width: 790px;
  margin: 18px 0 0;
  color: #334155;
  font-size: 18px;
  line-height: 1.65;
}

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

.hero-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #1e3a8a;
  padding: 8px 12px;
  font-weight: 700;
  text-decoration: none;
}

.hero-actions a:hover,
.hero-actions a:focus-visible {
  border-color: #3b5bdb;
  box-shadow: 0 0 0 3px rgba(59, 91, 219, 0.13);
}

.quick-start {
  border-top: 1px solid var(--panel-border);
  border-bottom: 1px solid var(--panel-border);
  padding: 28px 0;
}

.quick-start h2,
.manual-toc h2,
.manual-section h2 {
  margin: 0 0 14px;
  font-family: var(--font-ui);
  color: #0f172a;
}

.role-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.role-grid article,
.info-list article,
.callout,
.manual-section details {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  padding: 16px;
}

.role-grid h3,
.info-list h3,
.callout h3 {
  margin: 0 0 8px;
  font-family: var(--font-ui);
  font-size: 16px;
}

.role-grid p,
.info-list p,
.callout p,
.manual-section p,
.manual-section li {
  color: #334155;
  line-height: 1.62;
}

.role-grid p,
.info-list p,
.callout p {
  margin: 0 0 12px;
}

.manual-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 34px;
  align-items: start;
  padding-top: 34px;
}

.manual-toc {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 4px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  padding: 16px;
}

.manual-toc h2 {
  font-size: 17px;
}

.manual-toc a {
  border-radius: 7px;
  color: #334155;
  padding: 8px 9px;
  text-decoration: none;
}

.manual-toc a:hover,
.manual-toc a:focus-visible {
  background: #eef2ff;
  color: #1e3a8a;
}

.manual-content {
  display: grid;
  gap: 26px;
}

.manual-section {
  scroll-margin-top: 22px;
}

.manual-section h2 {
  font-size: 27px;
}

.manual-section > p {
  margin: 0 0 14px;
  font-size: 16px;
}

.info-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.steps,
.plain-list {
  margin: 12px 0 0;
  padding-left: 22px;
}

.quiet-note {
  border-left: 4px solid #3b5bdb;
  background: #eef2ff;
  border-radius: 0 8px 8px 0;
  padding: 12px 14px;
}

kbd {
  display: inline-block;
  min-width: 1.8em;
  border: 1px solid #cbd5e1;
  border-bottom-width: 2px;
  border-radius: 6px;
  background: #ffffff;
  color: #0f172a;
  padding: 2px 6px;
  font-family: var(--font-mono);
  font-size: 0.92em;
  text-align: center;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.05);
}

.finger-guide {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.hand-group,
.space-key {
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  background: #ffffff;
  padding: 16px;
}

.hand-group h3 {
  margin: 0 0 14px;
  font-family: var(--font-ui);
  font-size: 16px;
}

.finger-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.finger-row span,
.space-key {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 8px;
}

.finger-row span {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  padding: 14px 8px;
}

.finger-row strong {
  font-family: var(--font-ui);
  font-size: 13px;
}

.finger-row em,
.space-key span {
  color: #64748b;
  font-size: 13px;
  font-style: normal;
}

.space-key {
  align-content: center;
  background: #f8fafc;
}

.space-key kbd {
  min-width: 92px;
}

.finger-guide figcaption {
  grid-column: 1 / -1;
  color: #475569;
  font-size: 14px;
  line-height: 1.6;
}

.workflow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.workflow div {
  position: relative;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
}

.workflow strong {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-ui);
}

.workflow span {
  color: #475569;
  font-size: 14px;
  line-height: 1.45;
}

.callout {
  background: #f8fafc;
}

.callout.safe {
  border-color: rgba(22, 163, 74, 0.32);
  background: rgba(22, 163, 74, 0.07);
}

details + details {
  margin-top: 10px;
}

summary {
  cursor: pointer;
  color: #0f172a;
  font-family: var(--font-ui);
  font-weight: 700;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
}

table {
  width: 100%;
  min-width: 690px;
  border-collapse: collapse;
}

caption {
  padding: 14px;
  text-align: left;
  color: #475569;
  font-weight: 700;
}

th,
td {
  border-top: 1px solid #e2e8f0;
  padding: 13px 14px;
  text-align: left;
  vertical-align: top;
}

th {
  background: #f8fafc;
  color: #0f172a;
  font-family: var(--font-ui);
}

td {
  color: #334155;
}

.manual-footer {
  border-top: 1px solid var(--panel-border);
  background: #ffffff;
  padding: 22px 16px 30px;
  text-align: center;
}

.manual-footer p {
  max-width: 850px;
  margin: 6px auto;
  color: #475569;
  line-height: 1.5;
}

@media (max-width: 960px) {
  .role-grid,
  .info-list,
  .workflow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .manual-layout {
    grid-template-columns: 1fr;
  }

  .manual-toc {
    position: static;
  }

  .finger-guide {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .manual-nav {
    width: min(100% - 24px, 1180px);
    padding: 10px 0;
  }

  .manual-page {
    width: min(100% - 24px, 1180px);
    padding-top: 18px;
  }

  .manual-hero h1 {
    font-size: 34px;
  }

  .manual-lede {
    font-size: 16px;
  }

  .role-grid,
  .info-list,
  .workflow,
  .finger-row {
    grid-template-columns: 1fr;
  }
}

@media print {
  .manual-header,
  .manual-toc,
  .hero-actions,
  .manual-footer {
    display: none;
  }

  body {
    background: #ffffff;
  }

  .manual-page {
    width: 100%;
  }

  a {
    color: #000000;
  }
}
