:root {
  --ink: #183437;
  --muted: #627477;
  --paper: #f6f7f2;
  --surface: #fff;
  --line: #e3e9e4;
  --teal: #167c75;
  --teal-dark: #105b56;
  --gold: #e9b856;
  --shadow: 0 18px 48px rgba(24, 52, 55, .08);
}

* { box-sizing: border-box; }
body {
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  line-height: 1.6;
}
a { color: inherit; }

.site-header {
  min-height: 76px;
  padding: 12px clamp(20px, 5vw, 76px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: rgba(255,255,255,.94);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 10;
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 800; letter-spacing: -.03em; font-size: 20px; line-height: 1.05; }
.brand small { display: block; color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; margin-top: 5px; }
.brand-mark { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 13px; color: #fff; background: var(--teal); font: 800 20px/1 Georgia, serif; }
.brand-accent { color: var(--teal); }
.header-actions, .account-menu { display: flex; align-items: center; gap: 12px; }
.account-menu[hidden], [hidden] { display: none !important; }
.account-name { color: var(--muted); font-size: 14px; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 10px; min-height: 44px; padding: 10px 18px; border: 1px solid transparent; border-radius: 999px; text-decoration: none; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; transition: transform .18s ease, background .18s ease, box-shadow .18s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: #fff; background: var(--teal); box-shadow: 0 8px 18px rgba(22,124,117,.2); }
.button-primary:hover { color: #fff; background: var(--teal-dark); }
.button-quiet { color: var(--ink); background: #fff; border-color: var(--line); }
.button-quiet:hover { background: #f2f7f4; }
.text-link { color: var(--teal-dark); text-decoration: none; font-size: 14px; font-weight: 700; }
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }

.home-page { min-height: 100vh; }
.home-main { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.hero-panel { min-height: 405px; margin: 36px 0 70px; padding: clamp(34px, 6vw, 70px); display: grid; grid-template-columns: 1.25fr .75fr; align-items: center; gap: 36px; overflow: hidden; position: relative; border-radius: 28px; background: #e8f2ed; }
.hero-panel::before { content: ""; width: 280px; height: 280px; position: absolute; right: -75px; top: -125px; border-radius: 50%; background: rgba(255,255,255,.48); }
.hero-copy { max-width: 650px; position: relative; z-index: 1; }
.eyebrow { margin: 0 0 12px; color: var(--teal); font-size: 11px; font-weight: 800; letter-spacing: .16em; }
.hero-copy h1 { margin: 0; color: var(--ink); font-size: clamp(35px, 5vw, 58px); font-weight: 750; line-height: 1.08; letter-spacing: -.055em; }
.hero-copy h1 em { color: var(--teal); font-style: normal; }
.hero-description { max-width: 510px; margin: 22px 0 28px; color: #53696b; font-size: 17px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; }
.hero-art { height: 260px; display: grid; place-items: center; position: relative; }
.art-orbit { position: absolute; border: 1px solid rgba(22,124,117,.2); border-radius: 50%; }
.orbit-one { width: 250px; height: 250px; transform: rotate(-25deg) scaleY(.64); }
.orbit-two { width: 205px; height: 205px; transform: rotate(40deg) scaleY(.68); }
.art-card { width: 205px; min-height: 210px; padding: 24px; position: relative; transform: rotate(4deg); border: 1px solid rgba(24,52,55,.08); border-radius: 20px; background: #fff; box-shadow: 0 22px 48px rgba(24,52,55,.17); }
.art-tag { color: #93a4a1; font-size: 9px; font-weight: 800; letter-spacing: .14em; }
.art-line { width: 76%; height: 7px; margin-top: 12px; border-radius: 9px; background: #e5eeea; }
.line-long { width: 95%; height: 12px; margin-top: 18px; background: #b8d8cc; }
.line-short { width: 54%; }
.art-chart { height: 50px; margin-top: 15px; display: flex; align-items: end; gap: 8px; }
.art-chart i { width: 20px; border-radius: 5px 5px 2px 2px; background: #e9b856; }
.art-chart i:nth-child(1) { height: 22px; }.art-chart i:nth-child(2) { height: 36px; background: #8bbfb2; }.art-chart i:nth-child(3) { height: 29px; }.art-chart i:nth-child(4) { height: 44px; background: #8bbfb2; }.art-chart i:nth-child(5) { height: 33px; }
.art-check { width: 35px; height: 35px; display: grid; place-items: center; position: absolute; right: -12px; bottom: 24px; color: #fff; border-radius: 50%; background: var(--teal); font-weight: 800; }

.learning-section, .tools-section { margin-bottom: 72px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 22px; }
.section-heading .eyebrow { margin-bottom: 5px; }
.section-heading h2 { margin: 0; font-size: clamp(24px, 3vw, 32px); line-height: 1.2; letter-spacing: -.035em; }
.course-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.course-card { min-height: 245px; padding: 24px; position: relative; display: flex; flex-direction: column; text-decoration: none; border: 1px solid rgba(24,52,55,.06); border-radius: 20px; transition: transform .2s ease, box-shadow .2s ease; }
.course-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-teal { background: #e1efeb; }.card-gold { background: #f8efd9; }.card-lilac { background: #eeebf5; }.card-coral { background: #f7e8df; }
.card-number { color: #718581; font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.card-icon { position: absolute; top: 21px; right: 24px; color: var(--teal); font-size: 25px; }
.card-gold .card-icon { color: #b47d16; }.card-lilac .card-icon { color: #76659b; }.card-coral .card-icon { color: #b96c49; }
.course-card h3 { margin: 26px 0 8px; font-size: 20px; letter-spacing: -.025em; }
.course-card p { margin: 0 0 20px; color: var(--muted); font-size: 13px; }
.card-link { display: flex; justify-content: space-between; align-items: center; margin-top: auto; color: var(--teal-dark); font-size: 12px; font-weight: 800; }
.tools-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tool-card { min-height: 78px; padding: 15px 18px; display: flex; align-items: center; gap: 14px; text-decoration: none; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); transition: border-color .18s ease, transform .18s ease; }
.tool-card:hover { transform: translateY(-2px); border-color: #a8cbc0; }
.tool-icon { width: 40px; height: 40px; display: grid; place-items: center; flex: 0 0 auto; color: var(--teal); border-radius: 13px; background: #e8f2ed; font-size: 18px; font-weight: 800; }
.tool-card span:nth-child(2) { display: grid; gap: 2px; }
.tool-card strong { font-size: 14px; }.tool-card small { color: var(--muted); font-size: 12px; }
.tool-card > b { margin-left: auto; color: var(--teal); }
.site-footer { min-height: 78px; padding: 18px clamp(20px, 5vw, 76px); display: flex; justify-content: space-between; align-items: center; gap: 18px; color: var(--muted); border-top: 1px solid var(--line); background: #fff; font-size: 12px; }
.footer-brand { color: var(--ink); text-decoration: none; font-size: 16px; font-weight: 800; }

.auth-page { min-height: 100vh; display: grid; grid-template-columns: minmax(280px, .9fr) 1.1fr; background: #fff; }
.auth-aside { padding: clamp(28px, 5vw, 68px); display: flex; flex-direction: column; justify-content: space-between; color: #fff; background: #163f40; }
.auth-aside .brand { color: #fff; }.auth-aside .brand small { color: #c2d5cf; }.auth-aside .brand-accent { color: #e9b856; }
.auth-aside-copy { max-width: 460px; margin: auto 0; padding: 60px 0; }
.auth-aside-copy .eyebrow { color: #a6d5c6; }
.auth-aside-copy h1 { margin: 0; font-size: clamp(34px, 4.5vw, 58px); line-height: 1.08; letter-spacing: -.05em; }
.auth-aside-copy p { color: #d2e1dc; font-size: 16px; }
.auth-aside-foot { color: #bdd0ca; font-size: 12px; }
.auth-main { padding: 36px; display: grid; place-items: center; }
.auth-card { width: min(100%, 430px); padding: clamp(24px, 5vw, 44px); border: 1px solid var(--line); border-radius: 24px; background: #fff; box-shadow: var(--shadow); }
.auth-card h2 { margin: 0 0 8px; font-size: 28px; letter-spacing: -.04em; }
.auth-card .auth-subtitle { margin: 0 0 26px; color: var(--muted); font-size: 14px; }
.auth-card label { display: block; margin: 14px 0 6px; color: #42595b; font-size: 13px; font-weight: 700; }
.auth-card input { width: 100%; min-height: 48px; padding: 11px 13px; border: 1px solid #d9e2dc; border-radius: 12px; background: #fbfcfa; color: var(--ink); font: inherit; }
.auth-card input:focus { outline: 3px solid rgba(22,124,117,.15); border-color: var(--teal); }
.auth-card .button { width: 100%; margin-top: 20px; }
.auth-switch { margin: 18px 0 0; color: var(--muted); text-align: center; font-size: 13px; }
.auth-switch button { padding: 0; border: 0; color: var(--teal); background: none; font: inherit; font-weight: 800; cursor: pointer; }
.auth-message { min-height: 22px; margin: 12px 0 0; color: #a13b30; font-size: 13px; }

/* Consistent framing for the existing learning pages. */
body:not(.home-page):not(.auth-page) { background: var(--paper); }
body:not(.home-page):not(.auth-page) > h1.text-center { margin: 0; padding: 17px 20px; color: #fff; background: #163f40; font-size: 21px; font-weight: 800; letter-spacing: .04em; }
body:not(.home-page):not(.auth-page) .navbar { padding: 10px 18px; border-bottom: 1px solid var(--line); background: #fff !important; box-shadow: 0 5px 18px rgba(24,52,55,.04); }
body:not(.home-page):not(.auth-page) .navbar .nav-link { color: #3f5b5c; font-weight: 650; }
body:not(.home-page):not(.auth-page) .navbar .nav-link:hover { color: var(--teal); }
body:not(.home-page):not(.auth-page) .list-group-item { border-color: var(--line); background: #fff; color: var(--ink); }
body:not(.home-page):not(.auth-page) .list-group-item:hover { color: var(--teal-dark); background: #edf5f1; }
body:not(.home-page):not(.auth-page) .container-fluid { padding-left: clamp(16px, 4vw, 48px); padding-right: clamp(16px, 4vw, 48px); }
body:not(.home-page):not(.auth-page) .section-content { border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 10px 32px rgba(24,52,55,.05); }
body:not(.home-page):not(.auth-page) h2, body:not(.home-page):not(.auth-page) h3 { color: var(--ink); }
body:not(.home-page):not(.auth-page) #remainingTime { color: var(--teal-dark); font-weight: 700; }

/* Shared visual system for the older course and tool pages. */
body:not(.home-page):not(.auth-page) {
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
  font-size: 16px;
}
body:not(.home-page):not(.auth-page) > h1.text-center {
  padding: 16px 24px;
  color: var(--ink);
  background: #fff;
  border-bottom: 1px solid var(--line);
  font-size: 20px;
  letter-spacing: -.02em;
}
body:not(.home-page):not(.auth-page) .navbar {
  min-height: 58px;
  padding: 8px clamp(16px, 4vw, 48px);
  background: rgba(255,255,255,.96) !important;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 4px 14px rgba(24,52,55,.035);
}
body:not(.home-page):not(.auth-page) .navbar .nav-link {
  padding: 9px 12px;
  color: #41595b;
  font-size: 14px;
  font-weight: 650;
  border-radius: 10px;
}
body:not(.home-page):not(.auth-page) .navbar .nav-link:hover,
body:not(.home-page):not(.auth-page) .navbar .nav-link:focus {
  color: var(--teal-dark);
  background: #edf5f1;
}
body:not(.home-page):not(.auth-page) .container-fluid { max-width: 1480px; }
body:not(.home-page):not(.auth-page) .row.flex-nowrap { align-items: flex-start; }
body:not(.home-page):not(.auth-page) .list-group {
  position: sticky;
  top: 76px;
  width: 244px;
  max-height: calc(100vh - 92px);
  overflow-y: auto;
  padding: 8px;
  border: 1px solid var(--line) !important;
  border-radius: 16px !important;
  background: #fff;
  box-shadow: 0 8px 24px rgba(24,52,55,.045);
}
body:not(.home-page):not(.auth-page) .list-group-item {
  margin: 2px 0;
  padding: 11px 12px;
  color: #41595b;
  border: 0 !important;
  border-radius: 10px;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  white-space: normal;
}
body:not(.home-page):not(.auth-page) .list-group-item:hover,
body:not(.home-page):not(.auth-page) .list-group-item:focus {
  color: var(--teal-dark);
  background: #edf5f1;
}
body:not(.home-page):not(.auth-page) main.col {
  min-width: 0;
  padding: 18px clamp(12px, 2vw, 28px) 40px;
}
body:not(.home-page):not(.auth-page) .masthead {
  min-height: 250px;
  margin: 0 0 28px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #fff;
  text-align: center;
  background: linear-gradient(120deg, #163f40, #167c75) !important;
  border: 0;
  border-radius: 22px;
  box-shadow: 0 14px 34px rgba(16,91,86,.14);
}
body:not(.home-page):not(.auth-page) .masthead-content { padding: 34px 24px; }
body:not(.home-page):not(.auth-page) .masthead .container { max-width: 900px; }
body:not(.home-page):not(.auth-page) .masthead-heading,
body:not(.home-page):not(.auth-page) .masthead h1,
body:not(.home-page):not(.auth-page) .masthead .display-4 {
  margin: 0;
  color: #fff !important;
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 750;
  line-height: 1.15;
  letter-spacing: -.04em;
}
body:not(.home-page):not(.auth-page) .masthead p {
  max-width: 700px;
  margin: 14px auto 0;
  color: rgba(255,255,255,.86);
  font-size: clamp(15px, 1.8vw, 18px);
}
body:not(.home-page):not(.auth-page) main > .container-fluid {
  max-width: 1120px;
  padding-right: 0;
  padding-left: 0;
}
body:not(.home-page):not(.auth-page) .section-content,
body:not(.home-page):not(.auth-page) .row.gx-5.align-items-center,
body:not(.home-page):not(.auth-page) .content-section,
body:not(.home-page):not(.auth-page) .faq-section {
  margin: 0 0 22px;
  padding: clamp(18px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(24,52,55,.045);
}
body:not(.home-page):not(.auth-page) h2,
body:not(.home-page):not(.auth-page) h3 { color: var(--ink); }
body:not(.home-page):not(.auth-page) h2.display-4,
body:not(.home-page):not(.auth-page) h2.display-5 {
  margin: 0 0 14px;
  font-size: clamp(21px, 2.5vw, 29px);
  font-weight: 720;
  line-height: 1.3;
  letter-spacing: -.03em;
}
body:not(.home-page):not(.auth-page) p,
body:not(.home-page):not(.auth-page) li { color: #43595b; line-height: 1.75; }
body:not(.home-page):not(.auth-page) img {
  max-width: 100%;
  height: auto;
  border-radius: 16px;
}
body:not(.home-page):not(.auth-page) .btn-primary,
body:not(.home-page):not(.auth-page) #sendButton {
  color: #fff;
  background: var(--teal);
  border-color: var(--teal);
  border-radius: 999px;
  font-weight: 700;
}
body:not(.home-page):not(.auth-page) .btn-primary:hover,
body:not(.home-page):not(.auth-page) #sendButton:hover {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
}
body:not(.home-page):not(.auth-page) .bg-dark {
  color: #dce8e4 !important;
  background: #163f40 !important;
}
body:not(.home-page):not(.auth-page) footer {
  margin-top: 32px;
  padding: 24px clamp(20px, 5vw, 76px) !important;
  border-top: 1px solid rgba(255,255,255,.12);
  text-align: center;
}
#chatButton {
  color: #fff;
  background: var(--teal);
  box-shadow: 0 10px 24px rgba(16,91,86,.24);
}
#chatButton:hover { background: var(--teal-dark); }
.chat-header { background: #163f40 !important; }

@media (max-width: 768px) {
  body:not(.home-page):not(.auth-page) .container-fluid { padding-right: 14px; padding-left: 14px; }
  body:not(.home-page):not(.auth-page) main.col { padding: 12px 4px 28px; }
  body:not(.home-page):not(.auth-page) .masthead { min-height: 190px; margin-bottom: 20px; border-radius: 17px; }
  body:not(.home-page):not(.auth-page) .list-group { width: min(78vw, 280px); }
  body:not(.home-page):not(.auth-page) .row.gx-5.align-items-center { margin-right: 0; margin-left: 0; }
  body:not(.home-page):not(.auth-page) footer { margin-top: 20px; }
}

@media (max-width: 900px) {
  .hero-panel { grid-template-columns: 1fr .65fr; min-height: 350px; }
  .course-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .site-header { min-height: 66px; padding: 10px 16px; }
  .brand { font-size: 17px; }.brand-mark { width: 36px; height: 36px; }
  .brand small { font-size: 8px; }
  .account-name { display: none; }
  .button { min-height: 40px; padding: 9px 14px; font-size: 13px; }
  .home-main { width: min(100% - 28px, 560px); }
  .hero-panel { margin: 18px 0 48px; padding: 30px 24px; grid-template-columns: 1fr; gap: 0; border-radius: 22px; }
  .hero-copy h1 { font-size: clamp(34px, 10vw, 46px); }
  .hero-description { margin: 16px 0 22px; font-size: 15px; }
  .hero-art { height: 190px; margin-top: 6px; }
  .art-card { transform: scale(.82) rotate(4deg); }
  .orbit-one { width: 210px; height: 210px; }.orbit-two { width: 175px; height: 175px; }
  .section-heading { align-items: start; flex-direction: column; }
  .section-heading > .text-link { margin-top: -7px; }
  .course-grid { gap: 10px; }
  .course-card { min-height: 218px; padding: 17px; border-radius: 16px; }
  .course-card h3 { margin-top: 25px; font-size: 17px; }
  .course-card p { font-size: 12px; }
  .card-icon { top: 16px; right: 17px; }
  .tools-grid { grid-template-columns: 1fr; }
  .learning-section, .tools-section { margin-bottom: 52px; }
  .site-footer { align-items: start; flex-direction: column; }
  .auth-page { grid-template-columns: 1fr; }
  .auth-aside { min-height: 210px; padding: 20px 22px; }
  .auth-aside-copy { padding: 28px 0 10px; }
  .auth-aside-copy h1 { font-size: 32px; }
  .auth-aside-copy p { margin-bottom: 0; font-size: 14px; }
  .auth-aside-foot { display: none; }
  .auth-main { padding: 22px 14px 38px; }
  .auth-card { padding: 25px 20px; border-radius: 19px; }
  body:not(.home-page):not(.auth-page) > h1.text-center { padding: 13px; font-size: 18px; }
  body:not(.home-page):not(.auth-page) .navbar { padding: 8px 10px; }
}

/* Shared details migrated from the individual page-level style blocks. */
body:not(.home-page):not(.auth-page) .doc-container,
body:not(.home-page):not(.auth-page) .slide-container {
  padding: clamp(18px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(24,52,55,.045);
}
body:not(.home-page):not(.auth-page) iframe {
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(24,52,55,.06);
}
body:not(.home-page):not(.auth-page) .doc-container iframe { width: 100%; height: min(72vh, 720px); }
body:not(.home-page):not(.auth-page) #docUrl,
body:not(.home-page):not(.auth-page) .url-input { max-width: 640px; margin-right: auto; margin-left: auto; }
body:not(.home-page):not(.auth-page) .iframe-container { position: relative; width: 100%; padding-top: 56.25%; margin-top: 24px; }
body:not(.home-page):not(.auth-page) .iframe-container iframe { position: absolute; inset: 0; width: 100%; height: 100%; }
body:not(.home-page):not(.auth-page) .faq-img { border-radius: 16px; box-shadow: 0 8px 22px rgba(24,52,55,.08); }
body:not(.home-page):not(.auth-page) .recording-container,
body:not(.home-page):not(.auth-page) .reflection-question { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #f7faf7; }
body:not(.home-page):not(.auth-page) .recording-time { color: var(--teal-dark); font: 700 1.15rem/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
body:not(.home-page):not(.auth-page) .remaining-time { color: var(--teal-dark); font-weight: 700; }
body:not(.home-page):not(.auth-page) .btn-action { min-width: 120px; margin: 6px; }
body:not(.home-page):not(.auth-page) .color-box { padding: 18px; margin: 10px 0; border-radius: 12px; }
body:not(.home-page):not(.auth-page) .message-time { color: var(--muted); }
body:not(.home-page):not(.auth-page) .typing-indicator span { margin-right: 10px; color: var(--muted) !important; }
body:not(.home-page):not(.auth-page) ol { padding-left: 1.5rem; }
body:not(.home-page):not(.auth-page) .btn-large { min-height: 52px; padding: 12px 24px; font-size: 18px; }
body.admin-page { background: var(--paper); }
body.admin-page .container { border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
body.admin-page .header { background: linear-gradient(120deg, #163f40, #167c75); }
body.admin-page .controls { background: #f7faf7; }
body.admin-page button { background: var(--teal); color: #fff; border-radius: 999px; text-transform: none; }
body.admin-page button:hover { background: var(--teal-dark); }
body.admin-page table { width: 100%; border-collapse: collapse; }
body.admin-page th { background: #edf5f1; color: var(--ink); }
body.admin-page td, body.admin-page th { padding: 10px 12px; border: 1px solid var(--line); }
@media (max-width: 640px) {
  body:not(.home-page):not(.auth-page) .doc-container iframe { height: 58vh; }
  body.admin-page { padding: 10px; }
  body.admin-page .controls { padding: 18px; }
}
body:not(.home-page):not(.auth-page) .welcome-list { margin: 10px 0 0 20px; padding: 0; }
body:not(.home-page):not(.auth-page) .typing-label { margin-right: 10px; color: var(--muted); }
.page-readingCoach main { text-align: center; }
.page-readingCoach main ol { display: inline-block; text-align: left; }
