/* chunk55 student site — mint/education tone (Think-inspired) */
:root {
  --ink: #263b40;
  --muted: #5c7278;
  --brand: #28704f;
  --brand-dark: #1f5a3f;
  --green: #e4f5e4;
  --mint: #f7fbf7;
  --yellow: #fff2bd;
  --sky: #e9f6ff;
  --coral: #ffe7e1;
  --paper: #ffffff;
  --line: #d6e6df;
  --shadow: 0 10px 25px rgba(54, 111, 83, 0.1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--mint);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  font-size: 18px;
  line-height: 1.65;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 5vw;
  color: #fff;
  background: var(--brand);
  box-shadow: 0 5px 16px rgba(31, 103, 72, 0.18);
}

.topbar a {
  color: #e8fff2;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
}

.topbar .title {
  font-weight: 800;
  font-size: 16px;
}

.topbar .student-chip {
  margin-left: auto;
  font-size: 13px;
  font-weight: 700;
  background: rgba(255,255,255,0.18);
  padding: 4px 10px;
  border-radius: 999px;
}

main {
  width: min(920px, 92vw);
  margin: 0 auto;
  padding: 36px 0 72px;
}

.eyebrow {
  margin: 0 0 6px;
  color: #28739a;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 10px;
  font-size: clamp(28px, 6vw, 40px);
  line-height: 1.15;
}

h2 {
  margin: 1.6em 0 0.5em;
  font-size: 1.35rem;
  color: var(--brand-dark);
  border-bottom: 2px solid var(--line);
  padding-bottom: 0.25em;
}

h3 {
  margin: 1.25em 0 0.4em;
  font-size: 1.12rem;
  color: var(--ink);
}

p { margin: 0.6em 0; }

.subtitle {
  color: var(--brand);
  font-weight: 700;
  font-size: 1.05rem;
  margin: 0 0 1.2em;
}

.note {
  background: var(--sky);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  color: var(--muted);
  font-size: 0.95rem;
  margin: 1em 0 1.6em;
}

.gate-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 28px 24px;
  max-width: 420px;
  margin: 48px auto;
}

.gate-card label {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
}

.pw-row{display:flex;gap:8px;align-items:stretch}
.pw-row input{flex:1;min-width:0}
.pw-toggle{flex:0 0 auto;padding:10px 14px;border:1px solid var(--line,#d6e6df);border-radius:10px;background:#fff;color:var(--brand,#28704f);font-size:0.95rem;cursor:pointer}
.pw-toggle[aria-pressed="true"]{background:var(--green,#e4f5e4)}
.pw-hint{margin:8px 0 0;color:var(--muted,#5c7278);font-size:0.85rem}
.gate-card input[type="password"],
.gate-card input[type="text"],
.gate-card .pw-row input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 16px;
  margin-bottom: 12px;
}

.gate-card button[type="submit"],
.btn {
  display: inline-block;
  border: none;
  border-radius: 8px;
  padding: 12px 18px;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  cursor: pointer;
}

.gate-card button[type="submit"]:hover,
.btn:hover { background: var(--brand-dark); }

.gate-error {
  color: #a33;
  font-size: 0.9rem;
  min-height: 1.2em;
  margin: 0 0 8px;
}

.gate-note {
  color: var(--muted);
  font-size: 0.85rem;
  min-height: 1.2em;
  margin: 8px 0 0;
}

.hidden { display: none !important; }

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

.route-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--ink);
  transition: 160ms ease;
  min-height: 110px;
  position: relative;
}

.route-card:hover {
  border-color: #9bcfae;
  transform: translateY(-2px);
}

.route-card:nth-child(4n+1) { background: linear-gradient(150deg, #fff 0%, var(--sky) 100%); }
.route-card:nth-child(4n+2) { background: linear-gradient(150deg, #fff 0%, var(--yellow) 100%); }
.route-card:nth-child(4n+3) { background: linear-gradient(150deg, #fff 0%, var(--coral) 100%); }
.route-card:nth-child(4n+4) { background: linear-gradient(150deg, #fff 0%, var(--green) 100%); }

.route-num {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 5px;
  background: var(--green);
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 800;
  width: fit-content;
}

.route-zh { font-weight: 800; font-size: 1.05rem; }
.route-en { color: var(--muted); font-size: 0.9rem; }
.open-hint { margin-top: auto; color: var(--brand); font-weight: 800; font-size: 0.9rem; }

.progress-dot {
  position: absolute;
  top: 12px;
  right: 14px;
  color: var(--brand);
  font-size: 14px;
  line-height: 1;
}
.progress-dot.done { color: var(--brand-dark); }

.audio-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(247, 251, 247, 0.96);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 0 0 1.4em;
  box-shadow: var(--shadow);
}

.audio-bar label {
  display: block;
  font-weight: 800;
  color: var(--brand);
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.audio-bar audio {
  width: 100%;
  display: block;
}

.content ol, .content ul {
  padding-left: 1.35em;
  margin: 0.4em 0 0.9em;
}

.content li { margin: 0.25em 0; }

.content strong { color: var(--brand-dark); }

.content code {
  background: var(--green);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.92em;
}

.back-link {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--brand);
  font-weight: 800;
  text-decoration: none;
}

.back-link:hover { text-decoration: underline; }

footer {
  margin-top: 48px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
}

footer a.teacher-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.8rem;
  margin-left: 8px;
}
footer a.teacher-link:hover { text-decoration: underline; color: var(--brand); }

.teacher-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
}
.teacher-status { color: var(--muted); font-size: 0.9rem; }

.teacher-table-wrap {
  overflow-x: auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.teacher-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  min-width: 720px;
}
.teacher-table th,
.teacher-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.teacher-table th {
  background: var(--green);
  color: var(--brand-dark);
  font-weight: 800;
  position: sticky;
  top: 0;
}
.teacher-table .col-name {
  text-align: left;
  font-weight: 700;
  white-space: nowrap;
  min-width: 88px;
}
.teacher-table .col-seen {
  text-align: left;
  white-space: nowrap;
  color: var(--muted);
  font-size: 0.85rem;
  min-width: 140px;
}
.teacher-table .col-route.done {
  color: var(--brand-dark);
  font-weight: 800;
  background: #f0faf2;
}

@media (max-width: 700px) {
  body { font-size: 17px; }
  main { width: min(94vw, 920px); padding-top: 24px; }
  .route-grid { grid-template-columns: 1fr; }
  .topbar { padding-inline: 4vw; }
  main.teacher-wide, body[data-page="teacher"] main {
    width: min(96vw, 1100px);
  }
}

body[data-page="teacher"] main {
  width: min(96vw, 1100px);
}
