:root {
  --ink: #201914;
  --muted: #6f6253;
  --paper: #fff8ed;
  --panel: #fffdf8;
  --night: #111417;
  --night-2: #1b201f;
  --gold: #c99548;
  --gold-2: #efce8a;
  --green: #4b9671;
  --blue: #557f9f;
  --red: #bf5f55;
  --line: rgba(43, 32, 20, 0.14);
  --line-dark: rgba(239, 206, 138, 0.24);
  --shadow: 0 22px 56px rgba(28, 20, 12, 0.14);
  --radius: 8px;
  font-family: "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #fff8ed 0%, #f3e5ce 100%);
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
}

.manual-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px max(18px, calc((100vw - 1200px) / 2));
  color: #fff7e8;
  background: rgba(17, 20, 23, 0.95);
  border-bottom: 1px solid var(--line-dark);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand img {
  width: 112px;
  height: 36px;
  object-fit: contain;
  border-radius: var(--radius);
  background: #17120d;
}

.brand strong,
.brand small {
  display: block;
  white-space: nowrap;
}

.brand strong {
  font-size: 17px;
  font-weight: 950;
  line-height: 1.05;
}

.brand small {
  color: rgba(255, 247, 232, 0.72);
  font-size: 12px;
  font-weight: 850;
}

.manual-nav nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.manual-nav nav a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: var(--radius);
  color: rgba(255, 247, 232, 0.84);
  font-size: 14px;
  font-weight: 850;
}

.manual-nav nav a:hover,
.manual-nav nav a:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

main {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.manual-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  padding: 52px 0 26px;
}

.kicker {
  margin: 0 0 8px;
  color: #a86e25;
  font-size: 14px;
  font-weight: 950;
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  letter-spacing: 0;
}

h1 {
  margin: 0;
  font-family: "Noto Serif TC", "Noto Sans TC", serif;
  font-size: clamp(34px, 4.2vw, 54px);
  line-height: 1.08;
  font-weight: 900;
  white-space: nowrap;
}

.lead {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 1.5vw, 20px);
  font-weight: 760;
  white-space: nowrap;
}

.hero-checklist {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.hero-checklist span {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border: 1px solid rgba(201, 149, 72, 0.28);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.78);
  font-weight: 900;
}

section {
  padding: 34px 0;
}

.section-head {
  max-width: 760px;
  margin-bottom: 18px;
}

.section-head h2 {
  margin: 0;
  font-family: "Noto Serif TC", "Noto Sans TC", serif;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.14;
  font-weight: 900;
}

.section-head p:last-child {
  margin: 9px 0 0;
  color: var(--muted);
  font-weight: 760;
}

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

.topic-list {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 9px;
}

.topic-button {
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: rgba(255, 253, 248, 0.78);
  text-align: left;
  font-size: 14px;
  font-weight: 900;
}

.topic-button span {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(201, 149, 72, 0.14);
  color: #24170e;
  font-weight: 950;
}

.topic-button.is-active {
  color: #fff7e8;
  border-color: rgba(239, 206, 138, 0.34);
  background: linear-gradient(135deg, #151a1d, #2a2921);
  box-shadow: 0 16px 38px rgba(17, 20, 23, 0.16);
}

.topic-button.is-active span {
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  color: #21150c;
}

.screen-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(340px, 0.84fr);
  gap: 16px;
  align-items: stretch;
  padding: 16px;
  border: 1px solid rgba(201, 149, 72, 0.28);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.82);
  box-shadow: var(--shadow);
}

.browser-frame {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(17, 20, 23, 0.16);
  border-radius: var(--radius);
  background: #101417;
}

.browser-top {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  color: rgba(255, 247, 232, 0.72);
  background: #15191c;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.browser-top span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #c85f54;
}

.browser-top span:nth-child(2) {
  background: #d2a34f;
}

.browser-top span:nth-child(3) {
  background: #5ea36f;
}

.browser-top b {
  margin-left: 8px;
  font-size: 13px;
  font-weight: 850;
}

.app-screen {
  min-height: 570px;
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  color: #fdf7ec;
  background: #111417;
}

.mock-sidebar {
  padding: 18px 12px;
  background: #15191c;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.mock-sidebar strong {
  display: block;
  margin-bottom: 14px;
  color: #efce8a;
  font-size: 16px;
}

.mock-nav {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  margin-bottom: 7px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--radius);
  color: rgba(255, 247, 232, 0.78);
  background: transparent;
  text-align: left;
  font-size: 13px;
  font-weight: 850;
}

.mock-nav.is-active {
  color: #111417;
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
}

.mock-content {
  min-width: 0;
  padding: 18px;
  background:
    radial-gradient(circle at top right, rgba(201, 149, 72, 0.16), transparent 34%),
    #111417;
}

.mock-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.mock-page-head p {
  margin: 0 0 5px;
  color: #efce8a;
  font-size: 12px;
  font-weight: 950;
}

.mock-page-head h3 {
  margin: 0;
  color: #fff7e8;
  font-size: 24px;
  line-height: 1.2;
}

.mock-page-head span {
  flex: none;
  padding: 7px 10px;
  border-radius: var(--radius);
  color: rgba(255, 247, 232, 0.8);
  background: rgba(255, 255, 255, 0.08);
  font-size: 12px;
  font-weight: 850;
}

.mock-main {
  display: grid;
  gap: 12px;
}

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

.mock-card,
.mock-wide,
.mock-table,
.mock-form {
  padding: 14px;
  border: 1px solid rgba(239, 206, 138, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.07);
}

.mock-card span,
.mock-wide span,
.mock-table span,
.mock-form span {
  display: block;
  color: #efce8a;
  font-size: 12px;
  font-weight: 950;
}

.mock-card strong {
  display: block;
  margin-top: 5px;
  color: #fff7e8;
  font-size: 26px;
}

.mock-wide strong,
.mock-table strong,
.mock-form strong {
  display: block;
  margin-top: 5px;
  color: #fff7e8;
  font-size: 18px;
}

.mock-wide p,
.mock-table p,
.mock-form p,
.mock-card p {
  margin: 6px 0 0;
  color: rgba(255, 247, 232, 0.72);
  font-size: 13px;
  font-weight: 720;
}

.mock-field {
  min-height: 42px;
  display: flex;
  align-items: center;
  margin-top: 10px;
  padding: 0 12px;
  border: 1px solid rgba(239, 206, 138, 0.18);
  border-radius: var(--radius);
  color: rgba(255, 247, 232, 0.74);
  background: rgba(0, 0, 0, 0.2);
  font-size: 13px;
  font-weight: 820;
}

.mock-form .mock-action,
.mock-note + .mock-table,
.mock-table + .mock-form {
  margin-top: 12px;
}

.mock-row {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr auto;
  gap: 8px;
  align-items: center;
  min-height: 42px;
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.18);
  color: rgba(255, 247, 232, 0.9);
  font-size: 13px;
  font-weight: 800;
}

.mock-row button,
.mock-action {
  min-height: 34px;
  padding: 0 11px;
  border: 0;
  border-radius: var(--radius);
  color: #1f150d;
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  font-size: 12px;
  font-weight: 950;
}

.mock-action.secondary {
  color: #fff7e8;
  background: rgba(255, 255, 255, 0.12);
}

.mock-note {
  border-left: 4px solid var(--blue);
}

.mock-note.good {
  border-left-color: var(--green);
}

.mock-note.gold {
  border-left-color: var(--gold);
  background: rgba(201, 149, 72, 0.12);
}

.instruction-panel {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffdf8;
}

.instruction-panel h3 {
  margin: 0;
  font-size: clamp(24px, 2.4vw, 32px);
  line-height: 1.18;
}

.instruction-panel > p {
  margin: 10px 0 0;
  color: var(--muted);
  font-weight: 760;
}

.step-meter {
  display: grid;
  gap: 8px;
  margin: 18px 0 12px;
  color: #7b5725;
  font-size: 13px;
  font-weight: 950;
}

.step-meter b {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(201, 149, 72, 0.14);
}

.step-meter i {
  display: block;
  width: 25%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), var(--green));
  transition: width 0.25s ease;
}

.instruction-steps {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.instruction-steps li {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 11px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 248, 237, 0.62);
}

.instruction-steps li.is-active {
  border-color: rgba(201, 149, 72, 0.58);
  background: #fff8ed;
  box-shadow: 0 12px 26px rgba(201, 149, 72, 0.12);
}

.step-no {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #21150d;
  background: rgba(201, 149, 72, 0.16);
  font-weight: 950;
}

.instruction-steps li.is-active .step-no {
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
}

.step-body strong,
.step-body span {
  display: block;
}

.step-body strong {
  font-size: 15px;
  line-height: 1.28;
}

.step-body span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
}

.step-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.step-controls button {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(201, 149, 72, 0.3);
  border-radius: var(--radius);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  font-weight: 900;
}

.step-controls button:nth-child(2) {
  color: #1f150d;
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
}

.pass-box {
  margin-top: 16px;
  padding: 14px;
  border-left: 4px solid var(--green);
  border-radius: var(--radius);
  background: rgba(75, 150, 113, 0.1);
}

.pass-box strong {
  display: block;
  margin-bottom: 4px;
}

.pass-box p {
  margin: 0;
  color: var(--muted);
  font-weight: 760;
}

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

.role-table {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.path-grid article,
.role-table article {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.82);
  box-shadow: 0 12px 28px rgba(40, 28, 16, 0.07);
}

.path-grid span {
  color: #a86e25;
  font-size: 13px;
  font-weight: 950;
}

.path-grid h3 {
  margin: 8px 0 6px;
  font-size: 22px;
}

.path-grid p,
.role-table span {
  margin: 0;
  color: var(--muted);
  font-weight: 740;
}

.role-table strong {
  display: block;
  margin-bottom: 8px;
  font-size: 17px;
}

@media (max-width: 1060px) {
  .manual-layout,
  .screen-stage {
    grid-template-columns: 1fr;
  }

  .topic-list {
    position: static;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (max-width: 760px) {
  main {
    width: min(100% - 24px, 1200px);
  }

  .manual-nav {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .manual-nav nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .manual-nav nav a {
    white-space: nowrap;
  }

  .manual-hero {
    grid-template-columns: 1fr;
    padding-top: 34px;
  }

  h1,
  .lead {
    white-space: normal;
  }

  .hero-checklist {
    justify-content: flex-start;
  }

  .topic-list,
  .path-grid,
  .role-table {
    grid-template-columns: 1fr;
  }

  .app-screen {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .mock-sidebar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .mock-sidebar strong {
    grid-column: 1 / -1;
  }

  .mock-nav {
    margin: 0;
  }

  .mock-grid {
    grid-template-columns: 1fr;
  }

  .mock-page-head {
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .browser-top b {
    max-width: 210px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mock-sidebar {
    grid-template-columns: 1fr;
  }

  .mock-row {
    grid-template-columns: 1fr;
  }

  .instruction-steps li {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .step-no {
    width: 34px;
    height: 34px;
  }
}
