:root {
  --ink: #1d2926;
  --muted: #5f6e69;
  --paper: #fbfaf6;
  --paper-2: #f2efe5;
  --forest: #174f43;
  --forest-2: #0f3a32;
  --mint: #dcebe4;
  --lime: #d8ee73;
  --coral: #e96e50;
  --line: #d9ddd6;
  --white: #fff;
  --shadow: 0 18px 50px rgba(20, 53, 45, .10);
  --radius: 20px;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 0%, rgba(216, 238, 115, .16), transparent 24rem),
    var(--paper);
  font-family: "Noto Sans TC", "Microsoft JhengHei", "PingFang TC", system-ui, sans-serif;
  line-height: 1.65;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .22;
  background-image: repeating-linear-gradient(90deg, transparent 0 47px, rgba(23,79,67,.04) 48px);
}
a { color: inherit; }
button, input, textarea, select { font: inherit; }
button, .button {
  border: 0;
  border-radius: 999px;
  padding: .72rem 1.05rem;
  background: var(--forest);
  color: var(--white);
  cursor: pointer;
  font-weight: 750;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  transition: transform .18s ease, background .18s ease;
}
button:hover, .button:hover { transform: translateY(-1px); background: var(--forest-2); }
button.secondary, .button.secondary { color: var(--forest); background: var(--mint); }
button.ghost, .button.ghost { color: var(--ink); background: transparent; border: 1px solid var(--line); }
button.danger { color: #8c2e1f; background: #f9ded7; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid rgba(233, 110, 80, .35);
  outline-offset: 3px;
}
.skip-link { position: absolute; left: -9999px; top: .5rem; z-index: 99; }
.skip-link:focus { left: .5rem; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(23, 79, 67, .12);
  background: rgba(251, 250, 246, .94);
  backdrop-filter: blur(14px);
}
.nav {
  max-width: var(--max);
  margin: auto;
  min-height: 72px;
  padding: .7rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.brand { display: flex; align-items: center; gap: .7rem; font-weight: 900; text-decoration: none; white-space: nowrap; }
.brand-mark {
  width: 35px; height: 35px; border-radius: 11px;
  display: grid; place-items: center; color: var(--white); background: var(--forest);
  box-shadow: inset 0 -4px 0 rgba(0,0,0,.12);
}
.nav-links { display: flex; gap: .2rem; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.nav-links a { padding: .5rem .7rem; border-radius: 9px; text-decoration: none; color: var(--muted); white-space: nowrap; font-size: .92rem; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--forest); background: var(--mint); }
.nav-actions { display: flex; gap: .45rem; }
.nav-actions button { padding: .55rem .8rem; font-size: .84rem; }
main { position: relative; max-width: var(--max); margin: auto; padding: 2.4rem 1.25rem 5rem; }
.hero {
  min-height: 510px;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 3rem;
  align-items: center;
  padding: 2.5rem 0 3rem;
}
.eyebrow { color: var(--coral); font-weight: 900; letter-spacing: .12em; text-transform: uppercase; font-size: .82rem; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(2.8rem, 6.2vw, 5.5rem); line-height: .98; letter-spacing: -.055em; margin-bottom: 1.35rem; }
h2 { font-size: clamp(1.85rem, 3.5vw, 3.1rem); line-height: 1.12; letter-spacing: -.035em; margin-bottom: 1rem; }
h3 { font-size: 1.18rem; line-height: 1.35; }
.lead { color: var(--muted); font-size: clamp(1.05rem, 1.6vw, 1.25rem); max-width: 44rem; }
.hero-actions, .toolbar { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.4rem; }
.hero-board {
  position: relative;
  border-radius: 34px;
  padding: 1.2rem;
  background: var(--forest);
  box-shadow: var(--shadow);
  transform: rotate(1.5deg);
}
.hero-board::before { content: ""; position: absolute; width: 72px; height: 18px; background: rgba(216,238,115,.8); top: -8px; left: 50%; transform: translateX(-50%) rotate(-2deg); }
.board-card { padding: 1.2rem; border-radius: 20px; background: var(--white); margin: .55rem 0; }
.board-card small { color: var(--coral); font-weight: 900; }
.board-card strong { display: block; font-size: 1.25rem; }
.metric-row { display: grid; grid-template-columns: repeat(3,1fr); gap: .75rem; margin-top: 1rem; }
.metric { padding: 1rem; background: rgba(255,255,255,.1); color: var(--white); border-radius: 16px; text-align: center; }
.metric b { display: block; font-size: 1.65rem; color: var(--lime); }
.section { padding: 4.5rem 0 1rem; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.section-head p { max-width: 38rem; color: var(--muted); margin-bottom: .25rem; }
.grid-2, .grid-3, .grid-4 { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem;
  background: rgba(255,255,255,.76);
  box-shadow: 0 8px 25px rgba(20,53,45,.04);
}
a.card { display: block; text-decoration: none; }
a.card:hover { border-color: var(--forest); transform: translateY(-2px); }
.card p:last-child { margin-bottom: 0; }
.card .number { color: var(--forest); font-weight: 950; font-size: 2rem; line-height: 1; }
.card .date { color: var(--coral); font-weight: 850; font-size: .88rem; }
.tag { display: inline-flex; padding: .25rem .6rem; margin: .15rem .15rem .15rem 0; border-radius: 999px; color: var(--forest); background: var(--mint); font-size: .8rem; font-weight: 800; }
.notice { border-left: 5px solid var(--lime); background: var(--forest); color: var(--white); padding: 1.25rem 1.4rem; border-radius: 0 16px 16px 0; }
.notice p:last-child { margin-bottom: 0; }
.page-hero { padding: 3.2rem 0 1.5rem; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 2rem; border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(2.4rem, 5vw, 4.4rem); max-width: 800px; }
.progress-card { min-width: 230px; padding: 1rem; border-radius: 18px; background: var(--forest); color: var(--white); }
.progress-track { height: 8px; background: rgba(255,255,255,.18); border-radius: 99px; overflow: hidden; margin-top: .6rem; }
.progress-bar { height: 100%; width: 0; background: var(--lime); transition: width .25s ease; }
.workflow { display: grid; grid-template-columns: 250px 1fr; gap: 1.5rem; padding-top: 2rem; }
.side-index { position: sticky; top: 92px; align-self: start; padding: 1rem; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.7); }
.side-index a { display: block; color: var(--muted); padding: .5rem .65rem; text-decoration: none; border-radius: 8px; font-size: .92rem; }
.side-index a:hover { color: var(--forest); background: var(--mint); }
.worksheet { min-width: 0; }
.form-section { scroll-margin-top: 100px; margin-bottom: 1.2rem; padding: 1.5rem; border-radius: var(--radius); border: 1px solid var(--line); background: rgba(255,255,255,.84); }
.form-section > header { display: flex; gap: 1rem; align-items: start; margin-bottom: 1rem; }
.step-badge { flex: 0 0 40px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; color: var(--white); background: var(--forest); font-weight: 900; }
.form-section header p { color: var(--muted); margin-bottom: 0; }
.field-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 1rem; }
.field { min-width: 0; }
.field.full { grid-column: 1 / -1; }
label { display: block; font-weight: 800; margin-bottom: .4rem; }
.hint { color: var(--muted); font-size: .83rem; margin: .3rem 0 0; }
input, textarea, select {
  width: 100%;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid #cbd2cc;
  border-radius: 12px;
  padding: .78rem .85rem;
}
textarea { min-height: 108px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #87938f; }
.check-list { display: grid; gap: .55rem; }
.check-item { display: flex; align-items: flex-start; gap: .65rem; padding: .65rem .75rem; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.check-item input { width: auto; margin-top: .35rem; }
.check-item label { margin: 0; font-weight: 650; }
.sample-box { border: 1px dashed #91a29b; padding: 1rem; border-radius: 14px; background: #f7f5ec; }
.sample-box summary { cursor: pointer; font-weight: 850; color: var(--forest); }
.timeline { display: grid; gap: 1rem; }
.day {
  display: grid;
  grid-template-columns: 140px 1fr;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(255,255,255,.82);
}
.day-side { padding: 1.3rem; background: var(--forest); color: var(--white); }
.day-side .big { font-size: 2.3rem; line-height: 1; font-weight: 950; color: var(--lime); }
.day-main { padding: 1.3rem; min-width: 0; }
.schedule { width: 100%; border-collapse: collapse; font-size: .92rem; }
.schedule th, .schedule td { padding: .7rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.schedule th { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.schedule td:first-child { white-space: nowrap; font-weight: 800; color: var(--forest); }
.ratio { display: flex; height: 28px; border-radius: 99px; overflow: hidden; margin: .7rem 0; color: var(--ink); font-size: .75rem; font-weight: 850; }
.ratio .talk { background: #eadfd7; display: grid; place-items: center; }
.ratio .practice { background: var(--lime); display: grid; place-items: center; }
.deliverable { margin-top: 1rem; padding: .85rem 1rem; border-radius: 12px; background: var(--mint); }
.course-nav {
  display: flex;
  gap: .55rem;
  overflow-x: auto;
  padding: .7rem 0 .1rem;
  scrollbar-width: thin;
}
.course-nav a {
  min-width: 158px;
  padding: .8rem .95rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.74);
  color: var(--muted);
  text-decoration: none;
  font-size: .88rem;
  font-weight: 800;
}
.course-nav a strong { display: block; color: var(--forest); font-size: 1rem; }
.course-nav a[aria-current="page"] { border-color: var(--forest); background: var(--mint); color: var(--ink); }
.agenda-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; margin: 1.3rem 0; }
.agenda-item {
  border-top: 5px solid var(--forest);
  border-radius: 10px 10px 16px 16px;
  padding: 1rem;
  background: var(--white);
  box-shadow: 0 7px 22px rgba(20,53,45,.05);
}
.agenda-item time { color: var(--coral); font-weight: 900; font-size: .86rem; }
.agenda-item h3 { margin: .35rem 0; }
.agenda-item p { color: var(--muted); font-size: .9rem; margin-bottom: 0; }
.session-block {
  scroll-margin-top: 95px;
  margin: 1.2rem 0;
  padding: 1.55rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.86);
}
.session-head {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 1rem;
  align-items: start;
  margin-bottom: 1.2rem;
}
.session-time {
  padding: .75rem;
  border-radius: 14px;
  background: var(--forest);
  color: var(--white);
  text-align: center;
  font-weight: 900;
}
.session-time small { display: block; color: var(--lime); }
.session-head h2 { font-size: clamp(1.55rem, 3vw, 2.35rem); margin-bottom: .4rem; }
.session-head p { color: var(--muted); margin-bottom: 0; }
.session-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.lesson-card {
  padding: 1.15rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--paper);
}
.lesson-card h3 { margin-bottom: .6rem; }
.lesson-card ul, .lesson-card ol { margin: .4rem 0 0; padding-left: 1.25rem; }
.lesson-card li + li { margin-top: .35rem; }
.teacher-note { border-left: 5px solid var(--coral); background: #fff1ec; }
.student-task { border-left: 5px solid var(--lime); background: #f7fbdc; }
.checkpoint { border-left: 5px solid var(--forest); background: var(--mint); }
.prompt-card {
  position: relative;
  margin: .8rem 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #b8c8c2;
  background: #14221e;
  color: #f6fff9;
}
.prompt-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .7rem;
  padding: .65rem .85rem;
  background: #203a32;
  color: var(--lime);
  font-size: .84rem;
  font-weight: 900;
}
.prompt-card button { padding: .38rem .65rem; background: var(--lime); color: var(--forest-2); font-size: .78rem; }
.prompt-card pre {
  margin: 0;
  padding: 1rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: "Microsoft JhengHei", sans-serif;
  line-height: 1.65;
}
.model-route {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: .7rem;
  align-items: stretch;
  margin: 1rem 0;
}
.model-step { padding: 1rem; border-radius: 16px; background: var(--white); border: 1px solid var(--line); }
.model-step strong { display: block; color: var(--forest); margin-bottom: .35rem; }
.route-arrow { display: grid; place-items: center; color: var(--coral); font-size: 1.5rem; font-weight: 900; }
.micro-demo {
  margin: 1rem 0;
  padding: 1rem 1.15rem;
  border-radius: 16px;
  background: var(--paper-2);
  border: 1px dashed #9ca8a2;
}
.micro-demo summary { cursor: pointer; color: var(--forest); font-weight: 900; }
.evidence-table { width: 100%; border-collapse: collapse; margin-top: .7rem; }
.evidence-table th, .evidence-table td { border: 1px solid var(--line); padding: .65rem; text-align: left; vertical-align: top; }
.evidence-table th { background: var(--mint); color: var(--forest); }
.pill-row { display: flex; flex-wrap: wrap; gap: .45rem; }
.pill { display: inline-flex; padding: .32rem .65rem; border-radius: 999px; background: var(--mint); color: var(--forest); font-weight: 850; font-size: .82rem; }
.day-output {
  margin: 1.4rem 0 0;
  padding: 1.2rem;
  border: 2px solid var(--forest);
  border-radius: 18px;
  background: #f4fae3;
}
.day-output h3 { color: var(--forest); }
.day-output p:last-child, .day-output ul:last-child { margin-bottom: 0; }
.source-list { color: var(--muted); font-size: .86rem; }
.source-list a { color: var(--forest); }
.status { position: fixed; right: 1rem; bottom: 1rem; z-index: 30; padding: .7rem 1rem; border-radius: 999px; background: var(--ink); color: var(--white); opacity: 0; transform: translateY(10px); transition: .2s ease; pointer-events: none; }
.status.show { opacity: 1; transform: translateY(0); }
.footer { border-top: 1px solid var(--line); padding: 2rem 1.25rem; color: var(--muted); }
.footer-inner { max-width: var(--max); margin: auto; display: flex; justify-content: space-between; gap: 1rem; }
.print-only { display: none; }

.ai-launcher {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 24;
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: .1rem .55rem;
  min-width: 150px;
  padding: .78rem 1rem;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 18px;
  color: var(--white);
  background: var(--forest);
  box-shadow: 0 16px 38px rgba(15,58,48,.28);
  text-align: left;
}
.ai-launcher:hover { transform: translateY(-2px); }
.ai-launcher-dot {
  grid-row: 1 / 3;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 5px rgba(216,238,115,.18);
}
.ai-launcher small { color: #dcebe6; font-weight: 700; }
.ai-dialog {
  width: min(780px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 24px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 30px 90px rgba(7,31,25,.4);
}
.ai-dialog::backdrop { background: rgba(8,25,21,.62); backdrop-filter: blur(3px); }
.ai-dialog-shell { margin: 0; }
.ai-dialog-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 1rem;
  padding: 1.2rem 1.35rem;
  color: var(--white);
  background: var(--forest);
}
.ai-dialog-head h2 { margin: 0; color: var(--white); font-size: 1.55rem; }
.ai-dialog-head .eyebrow { margin: 0 0 .2rem; color: var(--lime); }
.ai-close { color: var(--white); border-color: rgba(255,255,255,.45); }
.ai-dialog-body { display: grid; gap: 1rem; padding: 1.25rem 1.35rem 1.6rem; }
.ai-mode-card {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem 1.35rem;
  border-bottom: 1px solid var(--line);
  background: var(--mint);
}
.ai-mode-card strong { color: var(--forest); }
.ai-mode-card span { color: var(--muted); text-align: right; }
.ai-mode-card[data-mode="sponsor"] { background: #f4fae3; }
.ai-actions { display: flex; flex-wrap: wrap; gap: .55rem; }
.ai-working {
  margin: 0;
  padding: .75rem 1rem;
  border-radius: 12px;
  color: var(--forest);
  background: #f4fae3;
  font-weight: 800;
}

@media (max-width: 900px) {
  .nav { flex-wrap: wrap; }
  .nav-links { order: 3; width: 100%; margin: 0; }
  .nav-actions { margin-left: auto; }
  .hero { grid-template-columns: 1fr; gap: 1rem; }
  .hero-board { transform: none; max-width: 620px; }
  .grid-4 { grid-template-columns: repeat(2,1fr); }
  .grid-3 { grid-template-columns: repeat(2,1fr); }
  .agenda-grid { grid-template-columns: repeat(2,1fr); }
  .model-route { grid-template-columns: 1fr; }
  .route-arrow { transform: rotate(90deg); }
  .workflow { grid-template-columns: 1fr; }
  .side-index { position: static; display: flex; overflow-x: auto; }
  .side-index a { white-space: nowrap; }
}
@media (max-width: 620px) {
  main { padding-inline: 1rem; }
  .brand span:last-child { display: none; }
  .nav-actions .optional { display: none; }
  .page-hero { grid-template-columns: 1fr; }
  .progress-card { width: 100%; }
  .grid-2, .grid-3, .grid-4, .field-grid { grid-template-columns: 1fr; }
  .agenda-grid, .session-grid { grid-template-columns: 1fr; }
  .session-head { grid-template-columns: 1fr; }
  .session-time { text-align: left; }
  .field.full { grid-column: auto; }
  .metric-row { gap: .4rem; }
  .metric { padding: .7rem .3rem; font-size: .78rem; }
  .day { grid-template-columns: 1fr; }
  .schedule { display: block; overflow-x: auto; }
  .section-head, .footer-inner { align-items: start; flex-direction: column; }
  .ai-launcher { right: .75rem; bottom: .75rem; min-width: auto; }
  .ai-launcher small { display: none; }
  .ai-dialog { width: calc(100vw - 1rem); max-height: calc(100vh - 1rem); }
  .ai-dialog-head, .ai-mode-card { padding-inline: 1rem; }
  .ai-dialog-body { padding: 1rem; }
  .ai-mode-card { flex-direction: column; }
  .ai-mode-card span { text-align: left; }
}

@page { size: A4; margin: 14mm; }
@media print {
  :root { --paper: #fff; --ink: #111; --muted: #444; }
  body { background: #fff; font-size: 10.5pt; }
  body::before, .site-header, .footer, .no-print, .side-index, .status, .hero-actions, .toolbar, .course-nav, .ai-launcher, .ai-dialog { display: none !important; }
  main { max-width: none; margin: 0; padding: 0; }
  .print-only { display: block; }
  .page-hero { padding: 0 0 8mm; margin-bottom: 7mm; grid-template-columns: 1fr; }
  .page-hero h1, h1 { font-size: 27pt; color: #111; }
  h2 { font-size: 20pt; break-after: avoid; }
  h3, label { break-after: avoid; }
  .workflow { display: block; padding: 0; }
  .form-section, .card, .day { background: #fff; box-shadow: none; break-inside: avoid; border-color: #aaa; }
  .session-block { background: #fff; box-shadow: none; border-color: #999; break-before: page; padding: 6mm; }
  .session-block:first-of-type { break-before: auto; }
  .session-grid, .agenda-grid, .model-route { display: block; }
  .lesson-card, .agenda-item, .model-step, .micro-demo, .day-output, .prompt-card { break-inside: avoid; margin-bottom: 4mm; }
  .prompt-card { background: #fff; color: #111; }
  .prompt-card header { background: #eee; color: #111; }
  .prompt-card button { display: none; }
  .form-section { margin-bottom: 5mm; padding: 5mm; }
  input, textarea, select { border: 0; border-bottom: 1px solid #bbb; border-radius: 0; background: #fff; padding: 1mm 0; overflow: visible; }
  textarea { min-height: 14mm; field-sizing: content; }
  .day-side { background: #fff; color: #111; border-bottom: 1px solid #aaa; }
  .day-side .big { color: #111; }
  .ratio { border: 1px solid #999; }
  .ratio .talk, .ratio .practice, .deliverable { background: #eee; }
  a { text-decoration: none; }
}
