:root {
  --bg: #f5f7fa;
  --paper: #ffffff;
  --ink: #172033;
  --muted: #607086;
  --line: #d9e1ea;
  --teal: #155e75;
  --teal-dark: #0f4b5e;
  --teal-soft: #e5f4f7;
  --green: #236c4a;
  --gold: #8a6400;
  --gold-soft: #fff3cc;
  --shadow: 0 12px 28px rgba(23, 32, 51, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: "Noto Sans TC", "Segoe UI", "PingFang TC", "Microsoft JhengHei", sans-serif;
}

a {
  color: inherit;
}

.manual-root {
  display: grid;
  gap: 18px;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px;
}

.manual-hero,
.manual-section,
.manual-footer {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.manual-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 18px;
  padding: 28px;
}

.manual-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(21, 94, 117, 0.14), rgba(255, 243, 204, 0.62)),
    url("./assets/img/logo.png");
  background-repeat: no-repeat;
  background-position: right 32px center;
  background-size: 220px;
  opacity: 0.22;
}

.manual-nav,
.hero-content,
.hero-checklist {
  position: relative;
  z-index: 1;
}

.manual-nav {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.manual-nav a,
.primary-link {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  border-radius: 8px;
  border: 1px solid #b8dbe4;
  background: var(--teal-soft);
  color: var(--teal-dark);
  text-decoration: none;
  font-weight: 700;
}

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

.role-card {
  display: grid;
  gap: 12px;
  align-content: start;
  min-height: 250px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.role-card p {
  color: var(--muted);
  line-height: 1.7;
}

.role-card .primary-link {
  align-self: end;
  justify-self: start;
}

.manual-logo {
  width: 84px;
  height: auto;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 14px;
  font-size: clamp(32px, 6vw, 56px);
  line-height: 1.08;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 19px;
  line-height: 1.3;
  letter-spacing: 0;
}

.hero-text {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.75;
}

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

.hero-checklist span,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 13px;
  font-weight: 800;
}

.hero-checklist span {
  color: var(--green);
  background: #e8f5ee;
  border: 1px solid #b8ddc9;
}

.manual-section {
  padding: 24px;
}

.manual-shot {
  margin: 0;
  display: grid;
  gap: 10px;
}

.manual-shot img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(23, 32, 51, 0.08);
}

.manual-shot figcaption {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.callout-list {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
  padding: 0;
  counter-reset: manual-callout;
  list-style: none;
}

.callout-list li {
  counter-increment: manual-callout;
  position: relative;
  min-height: 44px;
  padding: 12px 14px 12px 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  color: var(--muted);
  line-height: 1.65;
}

.callout-list li::before {
  content: counter(manual-callout);
  position: absolute;
  left: 14px;
  top: 12px;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #d93f3f;
  color: #fff;
  font-weight: 900;
  font-size: 13px;
}

.callout-list strong {
  color: var(--ink);
}

.section-heading {
  margin-bottom: 18px;
}

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

.step-list li {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.step-number {
  grid-row: span 2;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--teal);
  color: #fff;
  font-weight: 900;
}

.step-list strong {
  align-self: end;
}

.step-list p,
.workflow-grid p,
.safety-list p,
.help-list dd,
.example-columns p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.7;
}

.workflow-grid,
.example-columns,
.safety-list,
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.workflow-grid article,
.feature-grid article,
.example-columns div,
.safety-list div,
.help-list div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fbfcfe;
}

.tag {
  margin-bottom: 12px;
  color: var(--gold);
  background: var(--gold-soft);
  border: 1px solid #f0d47a;
}

.prompt {
  padding: 12px;
  border-left: 4px solid var(--teal);
  background: var(--teal-soft);
  color: var(--ink);
}

.safety-list strong {
  display: block;
  margin-bottom: 8px;
  color: var(--teal-dark);
}

.feature-grid article {
  border-left: 4px solid #b8dbe4;
}

.feature-grid h3 {
  color: var(--teal-dark);
}

.help-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.help-list dt {
  margin-bottom: 8px;
  font-weight: 900;
}

.manual-footer {
  display: flex;
  justify-content: center;
  padding: 24px;
}

@media (max-width: 760px) {
  .manual-root {
    padding: 12px;
  }

  .manual-hero,
  .manual-section {
    padding: 18px;
  }

  .manual-hero::before {
    background-position: right -40px top 30px;
    background-size: 180px;
  }

  .manual-nav {
    justify-content: flex-start;
  }

  h1 {
    font-size: 34px;
  }

  h2 {
    font-size: 24px;
  }

  .workflow-grid,
  .example-columns,
  .safety-list,
  .feature-grid,
  .role-card-grid {
    grid-template-columns: 1fr;
  }

  .step-list li {
    grid-template-columns: 36px minmax(0, 1fr);
    padding: 14px;
  }

  .step-number {
    width: 36px;
    height: 36px;
  }
}

/* Student manual redesign */

.student-manual-page {
  --student-navy: #123b4a;
  --student-teal: #0f6b78;
  --student-teal-dark: #0b5260;
  --student-mint: #dff3ef;
  --student-sky: #e9f5f8;
  --student-cream: #fff8e8;
  --student-coral: #b84f3e;
  --student-text: #162c35;
  --student-muted: #526b76;
  --student-line: #c9dadd;
  --student-paper: #ffffff;
  background:
    radial-gradient(circle at 12% 8%, rgba(132, 207, 197, 0.19), transparent 26rem),
    #f4f8f7;
  color: var(--student-text);
}

.manual-section[hidden] {
  display: none !important;
}

.teacher-manual-page {
  --student-navy: #173b2d;
  --student-teal: #287257;
  --student-teal-dark: #1d5943;
  --student-mint: #e3f2e9;
  --student-sky: #edf6f1;
  --student-cream: #fff6dc;
  --student-text: #193129;
  --student-muted: #52695f;
  --student-line: #c9dacf;
  background:
    radial-gradient(circle at 12% 8%, rgba(112, 180, 143, 0.2), transparent 26rem),
    #f4f8f5;
}

.teacher-manual-topbar {
  border-bottom-color: rgba(40, 114, 87, 0.2);
}

.teacher-manual-hero {
  border-color: #b9d4c4;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.97), rgba(237, 246, 241, 0.92)),
    var(--student-paper);
}

.teacher-hero-card {
  border-color: #dec98b;
}

.teacher-workflow-grid article,
.teacher-note-grid > div {
  border-color: #cbdcd2;
  background: #fbfdfb;
}

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

.teacher-tool-grid .tool-icon {
  color: #1d5943;
  background: #e3f2e9;
}

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

.teacher-manual-footer {
  border-color: #a8cdb8;
}

.student-manual-toc.teacher-manual-toc {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  overflow: visible;
}

.teacher-manual-toc a {
  scroll-snap-align: start;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  transform: translateY(-140%);
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--student-navy);
  color: #fff;
}

.skip-link:focus {
  transform: translateY(0);
}

.student-manual-topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 72px;
  padding: 10px max(20px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid rgba(15, 82, 96, 0.18);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 22px rgba(18, 59, 74, 0.06);
  backdrop-filter: blur(14px);
}

.manual-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--student-navy);
  text-decoration: none;
}

.manual-brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.manual-brand span {
  display: grid;
  gap: 1px;
}

.manual-brand small {
  color: var(--student-teal);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.manual-brand strong {
  font-size: 17px;
}

.manual-top-actions,
.student-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.manual-top-actions a,
.student-hero-actions a,
.student-manual-footer a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border: 1px solid #a8c7cd;
  border-radius: 9px;
  background: #fff;
  color: var(--student-teal-dark);
  font-weight: 800;
  text-decoration: none;
}

.manual-top-actions .manual-action-primary,
.student-hero-actions .manual-action-primary,
.student-manual-footer .manual-action-primary {
  border-color: var(--student-teal);
  background: var(--student-teal);
  color: #fff;
}

.manual-top-actions a:hover,
.student-hero-actions a:hover,
.student-manual-footer a:hover {
  border-color: var(--student-teal-dark);
  box-shadow: 0 5px 14px rgba(15, 107, 120, 0.13);
}

.student-manual-root {
  max-width: 1180px;
  gap: 22px;
  padding-top: 28px;
  padding-bottom: 44px;
}

.student-manual-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(290px, 0.75fr);
  gap: 34px;
  align-items: center;
  overflow: hidden;
  padding: clamp(28px, 5vw, 58px);
  border: 1px solid #bad5d3;
  border-radius: 18px;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.96), rgba(233, 245, 248, 0.9)),
    var(--student-paper);
  box-shadow: 0 18px 44px rgba(18, 59, 74, 0.1);
}

.manual-kicker {
  margin-bottom: 8px;
  color: var(--student-teal-dark);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.student-manual-hero h1 {
  max-width: 780px;
  margin-bottom: 18px;
  color: var(--student-navy);
  font-size: clamp(38px, 5.3vw, 64px);
  line-height: 1.12;
}

.student-hero-text {
  max-width: 760px;
  margin-bottom: 24px;
  color: var(--student-muted);
  font-size: 18px;
  line-height: 1.85;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 22px 0 0;
  padding: 0;
  color: var(--student-teal-dark);
  font-size: 14px;
  font-weight: 800;
  list-style: none;
}

.hero-points li::before {
  content: "✓";
  margin-right: 7px;
  color: #247451;
}

.student-hero-card {
  padding: 24px;
  border: 1px solid #e3cf94;
  border-radius: 14px;
  background: var(--student-cream);
  box-shadow: 0 12px 26px rgba(116, 86, 14, 0.08);
}

.hero-card-label {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 6px 9px;
  border-radius: 7px;
  background: #f3dfab;
  color: #674b08;
  font-size: 13px;
  font-weight: 900;
}

.student-hero-card ol {
  display: grid;
  gap: 13px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.student-hero-card li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  font-weight: 800;
  line-height: 1.5;
}

.student-hero-card li span {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--student-navy);
  color: #fff;
  font-size: 13px;
}

.student-hero-card > p {
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid #dec98b;
  color: #665b3e;
  font-size: 14px;
  line-height: 1.7;
}

.student-manual-toc {
  position: sticky;
  z-index: 19;
  top: 82px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--student-line);
  border-radius: 14px;
  background: var(--student-paper);
  box-shadow: 0 10px 24px rgba(18, 59, 74, 0.07);
}

.student-manual-toc a {
  min-height: 62px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border-radius: 9px;
  color: var(--student-navy);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.student-manual-toc a:hover,
.student-manual-toc a:focus-visible {
  background: var(--student-sky);
}

.student-manual-toc span {
  color: var(--student-teal);
  font-size: 12px;
}

.student-manual-section {
  scroll-margin-top: 174px;
  padding: clamp(24px, 4vw, 42px);
  border-color: var(--student-line);
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(18, 59, 74, 0.07);
}

.student-section-heading {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  margin-bottom: 26px;
}

.section-index {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--student-navy);
  color: #fff;
  font-size: 15px;
  font-weight: 900;
}

.student-section-heading h2 {
  margin-bottom: 8px;
  color: var(--student-navy);
  font-size: clamp(27px, 3.8vw, 38px);
}

.student-section-heading > div > p:last-child {
  margin-bottom: 0;
  color: var(--student-muted);
  font-size: 16px;
  line-height: 1.7;
}

.student-step-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.student-step-grid li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--student-line);
  border-radius: 12px;
  background: #fbfdfd;
}

.student-step-number {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--student-teal);
  color: #fff;
  font-weight: 900;
}

.student-step-grid h3,
.workspace-card-grid h3,
.student-feature-list h3,
.tool-card-grid h3,
.safety-rule-grid h3,
.support-card h3 {
  color: var(--student-navy);
}

.student-step-grid p,
.workspace-card-grid p,
.student-feature-list p,
.tool-card-grid li,
.tool-card-grid p,
.safety-rule-grid p,
.support-card li {
  margin-bottom: 0;
  color: var(--student-muted);
  line-height: 1.75;
}

.student-journey {
  display: grid;
  gap: 28px;
}

.student-journey-phase {
  display: grid;
  gap: 16px;
  padding: clamp(16px, 2.5vw, 26px);
  border: 1px solid #b9d4d7;
  border-radius: 16px;
  background: linear-gradient(180deg, #f8fcfc, #f2f8f7);
}

.student-journey-phase > header {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.student-journey-phase > header > span {
  min-width: 76px;
  padding: 8px 12px;
  border-radius: 999px;
  color: #fff;
  background: var(--student-teal);
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.student-journey-phase h3,
.student-journey-step h4 {
  margin: 0;
  color: var(--student-navy);
}

.student-journey-phase > header p,
.student-journey-step p {
  margin: 5px 0 0;
  color: var(--student-muted);
  line-height: 1.7;
}

.student-journey-list {
  display: grid;
  gap: 20px;
}

.student-journey-step {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--student-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(18, 59, 74, 0.06);
}

.journey-step-copy {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.journey-step-copy > span {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #fff;
  background: var(--student-navy);
  font-weight: 900;
}

.student-journey-step h4 {
  font-size: 20px;
}

.student-journey-step figure {
  margin: 0;
  padding: 9px;
  overflow: hidden;
  border: 1px solid #c7dadd;
  border-radius: 12px;
  background: #f4f9f9;
}

.student-journey-step img,
.manual-shot img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  cursor: zoom-in;
}

.student-journey-step img:focus-visible,
.manual-shot img:focus-visible {
  outline: 4px solid rgba(35, 111, 128, 0.32);
  outline-offset: 4px;
}

.student-image-dialog {
  width: min(96vw, 1500px);
  max-width: none;
  max-height: 96vh;
  padding: 0;
  border: 0;
  border-radius: 22px;
  background: transparent;
}

.student-image-dialog::backdrop {
  background: rgba(13, 35, 42, 0.76);
  backdrop-filter: blur(4px);
}

.student-image-dialog-shell {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(89, 128, 135, 0.3);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 28px 70px rgba(15, 47, 55, 0.28);
}

.student-image-dialog-shell img {
  display: block;
  width: 100%;
  max-height: calc(96vh - 92px);
  object-fit: contain;
  border-radius: 14px;
  background: #f3f7f7;
}

.student-image-dialog-shell p {
  margin: 0;
  padding-right: 52px;
  color: #38555d;
  font-weight: 700;
}

.student-image-dialog-shell button {
  position: absolute;
  z-index: 1;
  top: 24px;
  right: 24px;
  width: 44px;
  min-width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(58, 93, 101, 0.3);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: #173f49;
  font-size: 1.75rem;
  line-height: 1;
  box-shadow: 0 6px 20px rgba(15, 47, 55, 0.16);
}

.student-journey-step figcaption {
  padding: 9px 4px 2px;
  color: var(--student-muted);
  line-height: 1.65;
}

.manual-tip,
.manual-warning {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 16px;
  margin-top: 18px;
  padding: 18px 20px;
  border-radius: 11px;
}

.manual-tip {
  border: 1px solid #a8d3cb;
  background: var(--student-mint);
}

.manual-tip strong {
  color: #145b45;
}

.manual-tip p,
.manual-warning p {
  margin: 0;
  line-height: 1.7;
}

.student-manual-shot {
  padding: 10px;
  border: 1px solid var(--student-line);
  border-radius: 14px;
  background: #f7fbfb;
}

.student-manual-shot img {
  border-radius: 9px;
}

.student-manual-shot figcaption {
  padding: 8px 6px 2px;
  color: var(--student-muted);
  line-height: 1.65;
}

.student-manual-shot figcaption strong {
  color: var(--student-navy);
}

.manual-screenshot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  margin-top: 20px;
}

.manual-screenshot-grid .student-manual-shot,
.manual-wide-shot {
  margin: 0;
}

.manual-screenshot-grid .student-manual-shot {
  align-content: start;
}

.manual-top-actions button {
  font: inherit;
}

.manual-action-video {
  min-height: 44px;
  padding: 10px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #7fb8ae;
  border-radius: 10px;
  color: #154e56;
  background: #fff;
  font-weight: 800;
  cursor: pointer;
}

.manual-action-video:hover {
  border-color: var(--student-teal);
  background: #e2f3ef;
}

.manual-action-video:focus-visible,
.student-video-dialog button:focus-visible {
  outline: 3px solid rgba(15, 112, 122, 0.28);
  outline-offset: 2px;
}

.student-video-dialog {
  width: min(1080px, calc(100vw - 40px));
  max-width: none;
  max-height: calc(100vh - 40px);
  padding: 0;
  overflow: hidden;
  border: 1px solid #9ebfba;
  border-radius: 18px;
  color: var(--student-text);
  background: #fff;
  box-shadow: 0 24px 70px rgba(9, 43, 52, 0.3);
}

.student-video-dialog::backdrop {
  background: rgba(8, 28, 34, 0.72);
  backdrop-filter: blur(4px);
}

.student-video-dialog-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  max-height: calc(100vh - 40px);
}

.student-video-dialog header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--student-line);
  background: #edf7f5;
}

.student-video-dialog header p,
.student-video-dialog header h2 {
  margin: 0;
}

.student-video-dialog header h2 {
  margin-top: 3px;
  color: var(--student-navy);
  font-size: clamp(21px, 2.4vw, 28px);
}

.student-video-dialog header button {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid #8fb5b1;
  border-radius: 10px;
  color: var(--student-navy);
  background: #fff;
  font: inherit;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.student-video-dialog-body {
  padding: 16px 18px 18px;
  overflow: auto;
}

.student-video-dialog-body > p {
  margin: 0 0 12px;
  color: var(--student-muted);
  line-height: 1.6;
}

.student-video-dialog video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  border: 1px solid #9ebfba;
  border-radius: 12px;
  background: #102d35;
}

.manual-wide-shot {
  margin-top: 20px;
}

.workspace-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.workspace-card-grid article {
  position: relative;
  min-height: 220px;
  padding: 22px;
  border: 1px solid var(--student-line);
  border-radius: 12px;
  background: #fff;
}

.workspace-card-grid article:nth-child(1) {
  background: #eff8f6;
}

.workspace-card-grid article:nth-child(2) {
  background: #eef7fa;
}

.workspace-card-grid article:nth-child(3) {
  background: #fff9ed;
}

.workspace-card-number {
  display: inline-flex;
  margin-bottom: 18px;
  color: var(--student-teal);
  font-size: 13px;
  font-weight: 900;
}

.workspace-card-grid strong {
  display: block;
  margin-top: 18px;
  color: var(--student-teal-dark);
  font-size: 14px;
}

.manual-note-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.manual-note-grid > div {
  padding: 18px;
  border-left: 4px solid var(--student-teal);
  border-radius: 8px;
  background: #f7fafb;
}

.manual-note-grid h3 {
  color: var(--student-navy);
}

.manual-note-grid p {
  margin-bottom: 0;
  color: var(--student-muted);
  line-height: 1.7;
}

.student-feature-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.student-feature-list article {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--student-line);
  border-radius: 12px;
  background: #fbfdfd;
}

.feature-icon {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--student-sky);
  color: var(--student-teal-dark);
  font-size: 22px;
  font-weight: 900;
}

.feature-icon svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-icon-archive svg {
  width: 27px;
  height: 27px;
}

.prompt-lab {
  margin-top: 22px;
  padding: 24px;
  border: 1px solid #dfc988;
  border-radius: 14px;
  background: var(--student-cream);
}

.prompt-lab-heading h3 {
  margin-bottom: 18px;
  color: #60490d;
  font-size: 23px;
}

.prompt-comparison {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) 36px minmax(0, 1.3fr);
  gap: 12px;
  align-items: stretch;
}

.prompt-card {
  padding: 18px;
  border-radius: 10px;
  background: #fff;
}

.prompt-card span {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 900;
}

.prompt-card p {
  margin: 0;
  color: var(--student-text);
  line-height: 1.75;
}

.prompt-card-weak {
  border: 1px solid #e2b9b0;
}

.prompt-card-weak span {
  color: var(--student-coral);
}

.prompt-card-strong {
  border: 1px solid #9ccbbf;
}

.prompt-card-strong span {
  color: #17664d;
}

.prompt-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8a6a16;
  font-size: 24px;
  font-weight: 900;
}

.prompt-template {
  margin-top: 14px;
  padding: 16px 18px;
  border: 1px dashed #c6a54d;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.58);
}

.prompt-template strong {
  color: #60490d;
}

.prompt-template p {
  margin: 8px 0 0;
  line-height: 1.75;
}

.tool-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.tool-card-grid article {
  padding: 22px;
  border: 1px solid var(--student-line);
  border-radius: 13px;
  background: #fbfdfd;
}

.tool-card-head {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
}

.tool-icon {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--student-navy);
  color: #fff;
  font-size: 20px;
}

.tool-icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tool-card-head p {
  margin-bottom: 2px;
  color: var(--student-teal);
  font-size: 13px;
  font-weight: 900;
}

.tool-card-head h3 {
  margin: 0;
}

.tool-card-grid ol {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 22px;
}

.tool-example {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--student-sky);
  font-size: 14px;
}

.manual-warning {
  border: 1px solid #dfb2a7;
  background: #fff1ed;
}

.manual-warning strong {
  color: #8b3327;
}

.safe-use-section {
  background:
    linear-gradient(135deg, rgba(223, 243, 239, 0.56), rgba(255, 255, 255, 0.95)),
    #fff;
}

.safety-rule-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.safety-rule-grid article {
  padding: 20px;
  border: 1px solid #a9cec5;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
}

.safety-rule-grid article > span {
  display: block;
  margin-bottom: 20px;
  color: var(--student-teal);
  font-size: 13px;
  font-weight: 900;
}

.manual-faq {
  display: grid;
  gap: 10px;
}

.manual-faq details {
  overflow: hidden;
  border: 1px solid var(--student-line);
  border-radius: 10px;
  background: #fff;
}

.manual-faq summary {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 18px;
  color: var(--student-navy);
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}

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

.manual-faq summary::after {
  content: "+";
  flex: 0 0 auto;
  color: var(--student-teal);
  font-size: 24px;
}

.manual-faq details[open] summary {
  background: var(--student-sky);
}

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

.manual-faq details > div {
  padding: 16px 18px;
  border-top: 1px solid var(--student-line);
}

.manual-faq details p {
  margin: 0;
  color: var(--student-muted);
  line-height: 1.75;
}

.support-card {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 24px;
  align-items: center;
  margin-top: 20px;
  padding: 22px;
  border-radius: 12px;
  background: var(--student-navy);
  color: #fff;
}

.support-card .manual-kicker,
.support-card h3,
.support-card li {
  color: #fff;
}

.support-card h3 {
  margin-bottom: 0;
}

.support-card ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 22px;
}

.student-manual-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 32px;
  border: 1px solid #a7cbc5;
  border-radius: 16px;
  background: var(--student-mint);
}

.student-manual-footer strong {
  color: var(--student-navy);
  font-size: 24px;
}

.student-manual-footer p {
  margin: 7px 0 0;
  color: var(--student-muted);
}

@media (max-width: 920px) {
  .student-manual-page {
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
  }

  .student-manual-topbar {
    position: static;
    backdrop-filter: none;
  }

  .manual-top-actions {
    position: fixed;
    z-index: 30;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 9px max(12px, calc((100vw - 720px) / 2)) calc(9px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--student-line);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 -8px 22px rgba(18, 59, 74, 0.08);
    backdrop-filter: blur(14px);
  }

  .manual-top-actions a,
  .manual-top-actions button {
    min-height: 46px;
  }

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

  .student-manual-toc {
    top: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: visible;
  }

  .student-manual-toc.teacher-manual-toc {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .student-manual-toc a {
    min-height: 54px;
    scroll-snap-align: start;
  }

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

  .workspace-card-grid,
  .safety-rule-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .student-manual-page {
    padding-bottom: calc(70px + env(safe-area-inset-bottom));
  }

  .student-manual-topbar {
    min-height: 64px;
    padding: 8px 12px;
  }

  .manual-brand img {
    width: 38px;
    height: 38px;
  }

  .manual-brand small {
    display: none;
  }

  .manual-brand strong {
    font-size: 15px;
  }

  .manual-top-actions a,
  .manual-top-actions button {
    min-height: 46px;
    padding: 9px 12px;
    font-size: 14px;
  }

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

  .student-manual-root {
    padding: 12px;
  }

  .student-manual-hero {
    gap: 24px;
    padding: 24px 18px;
    border-radius: 14px;
  }

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

  .student-hero-text {
    font-size: 16px;
  }

  .student-hero-actions a {
    width: 100%;
  }

  .student-manual-toc {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 8px;
  }

  .student-manual-toc.teacher-manual-toc {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .student-manual-toc a {
    min-height: 52px;
    padding: 8px;
    font-size: 13px;
  }

  .student-manual-section {
    padding: 22px 16px;
    border-radius: 13px;
  }

  .student-section-heading {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .section-index {
    width: max-content;
    min-width: 40px;
    height: 32px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 13px;
  }

  .student-section-heading h2 {
    font-size: 23px;
  }

  .student-step-grid,
  .workspace-card-grid,
  .manual-note-grid,
  .student-feature-list,
  .tool-card-grid,
  .safety-rule-grid {
    grid-template-columns: 1fr;
  }

  .student-step-grid li,
  .student-feature-list article {
    grid-template-columns: 40px minmax(0, 1fr);
    padding: 16px;
  }

  .student-journey-phase {
    padding: 14px;
    border-radius: 13px;
  }

  .student-journey-phase > header {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .student-journey-phase > header > span {
    width: max-content;
  }

  .student-journey-step {
    padding: 12px;
  }

  .journey-step-copy {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 11px;
  }

  .journey-step-copy > span {
    width: 40px;
    height: 40px;
  }

  .student-journey-step h4 {
    font-size: 18px;
  }

  .student-step-number {
    width: 38px;
    height: 38px;
  }

  .workspace-card-grid article {
    min-height: 0;
  }

  .manual-tip,
  .manual-warning {
    grid-template-columns: 1fr;
    gap: 7px;
  }

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

  .student-video-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
    border-radius: 14px;
  }

  .student-video-dialog-shell {
    max-height: calc(100vh - 16px);
  }

  .student-video-dialog header {
    padding: 12px;
  }

  .student-video-dialog-body {
    padding: 12px;
  }

  .prompt-lab {
    padding: 18px 14px;
  }

  .prompt-comparison {
    grid-template-columns: 1fr;
  }

  .prompt-arrow {
    transform: rotate(90deg);
  }

  .support-card,
  .student-manual-footer {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .student-manual-footer {
    display: grid;
    padding: 22px 18px;
  }

  .student-manual-footer a {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .skip-link,
  .manual-top-actions a,
  .student-hero-actions a,
  .student-manual-footer a {
    scroll-behavior: auto;
    transition: none;
  }
}
