:root {
  --paper: #f6f7f3;
  --surface: #ffffff;
  --surface-2: #eef2ef;
  --ink: #1a2320;
  --muted: #65706b;
  --line: #d6ded8;
  --green: #2d7460;
  --blue: #315f7a;
  --red: #934b45;
  --amber: #a06d28;
  --shadow: 0 18px 44px rgba(26, 35, 32, 0.1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(45, 116, 96, 0.045) 0 1px, transparent 1px 100%),
    linear-gradient(180deg, rgba(49, 95, 122, 0.045) 0 1px, transparent 1px 100%),
    var(--paper);
  background-size: 48px 48px;
  color: var(--ink);
  font-family: "Noto Sans TC", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid rgba(45, 116, 96, 0.32);
  outline-offset: 3px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
  min-height: 72px;
  padding: 14px clamp(18px, 3vw, 44px);
  border-bottom: 1px solid var(--line);
  background: rgba(246, 247, 243, 0.95);
  backdrop-filter: blur(14px);
}

.brand,
.org-card {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 12px;
  background: var(--ink);
  color: var(--paper);
  font-family: "Outfit", system-ui, sans-serif;
  font-size: 12px;
  font-weight: 700;
}

.brand strong,
.brand small,
.org-card strong,
.org-card small {
  display: block;
}

.brand strong {
  font-family: "Outfit", system-ui, sans-serif;
  font-size: 20px;
  line-height: 1.15;
}

.brand small,
.org-card small {
  color: var(--muted);
  font-size: 12px;
}

.topnav {
  display: flex;
  justify-content: flex-end;
  gap: clamp(12px, 2vw, 24px);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.topnav a:hover {
  color: var(--ink);
}

.top-action,
.btn,
.side-nav button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
}

.top-action {
  min-width: 104px;
  padding: 0 14px;
}

.app-shell {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 18px;
  width: min(1440px, calc(100% - 28px));
  margin: 18px auto 0;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 90px;
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 14px 34px rgba(26, 35, 32, 0.06);
}

.org-mark {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--green);
}

.side-nav {
  display: grid;
  gap: 6px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.side-nav button {
  justify-content: flex-start;
  min-height: 42px;
  padding: 0 12px;
  color: var(--muted);
  text-align: left;
}

.side-nav button.is-active {
  border-color: transparent;
  background: var(--surface-2);
  color: var(--ink);
}

.assistant-card {
  border: 1px solid rgba(49, 95, 122, 0.28);
  border-radius: 8px;
  padding: 14px;
  background: #eef5f8;
}

.assistant-card span,
.eyebrow,
.score-top span,
.score-list span,
.doc-grid span,
.pricing span,
.module-tags span,
.module-preview span,
.task-item small {
  color: var(--muted);
  font-family: "Outfit", system-ui, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.assistant-card p {
  margin: 8px 0 0;
  color: var(--muted);
}

.main-panel {
  display: grid;
  gap: 18px;
}

.hero,
.panel,
.pricing article {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 34px rgba(26, 35, 32, 0.06);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: clamp(24px, 4vw, 52px);
  align-items: stretch;
  min-height: calc(100vh - 126px);
  padding: clamp(30px, 5vw, 58px);
  box-shadow: var(--shadow);
}

.hero-copy {
  align-self: center;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
}

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

h1 {
  max-width: 13ch;
  margin-bottom: 20px;
  font-family: "Noto Serif TC", serif;
  font-size: clamp(44px, 5.4vw, 76px);
  line-height: 1.08;
  text-wrap: balance;
}

h2 {
  margin-bottom: 0;
  font-family: "Noto Serif TC", serif;
  font-size: clamp(25px, 3vw, 38px);
  line-height: 1.18;
}

.lead {
  max-width: 720px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: clamp(17px, 1.8vw, 20px);
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  min-height: 46px;
  padding: 0 18px;
}

.btn.primary {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.score-card {
  display: grid;
  align-self: center;
  gap: 18px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
  background: var(--surface);
}

.score-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.score-top strong {
  font-family: "Outfit", system-ui, sans-serif;
  font-size: 76px;
  line-height: 0.9;
}

.score-ring {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #dce4df;
}

.score-ring i {
  display: block;
  width: 62%;
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--blue));
  transition: width 180ms ease;
}

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

.score-list div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-2);
}

.score-list strong {
  display: block;
  margin-top: 4px;
  font-family: "Outfit", system-ui, sans-serif;
  font-size: 24px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.85fr);
  gap: 18px;
}

.panel {
  padding: clamp(18px, 3vw, 30px);
}

.panel-head {
  display: grid;
  gap: 6px;
  margin-bottom: 20px;
}

.task-list {
  display: grid;
  gap: 10px;
}

.task-item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface);
}

.task-item input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
  margin-top: 4px;
}

.task-item strong,
.task-item small {
  display: block;
}

.task-item small {
  margin-top: 4px;
  color: var(--muted);
  text-transform: none;
}

.task-item:has(input:checked) {
  background: #eef6f1;
}

.task-item:has(input:checked) strong {
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  text-decoration-color: rgba(45, 116, 96, 0.55);
}

.module-panel p {
  color: var(--muted);
  font-size: 18px;
}

.module-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.module-tags span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  background: var(--surface-2);
  color: var(--green);
}

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

.module-preview div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface);
}

.module-preview strong {
  display: block;
  margin-top: 4px;
  font-family: "Outfit", system-ui, sans-serif;
  font-size: 22px;
}

.doc-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.doc-grid article {
  min-height: 170px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--surface);
}

.doc-grid strong {
  display: block;
  margin: 6px 0 8px;
  font-family: "Noto Serif TC", serif;
  font-size: 22px;
  line-height: 1.35;
}

.doc-grid p,
.pricing p {
  margin-bottom: 0;
  color: var(--muted);
}

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

.pricing article {
  padding: 18px;
}

.pricing article.featured {
  border-color: rgba(45, 116, 96, 0.42);
  background: #eef6f1;
}

.pricing strong {
  display: block;
  margin: 6px 0 8px;
  font-family: "Noto Serif TC", serif;
  font-size: 24px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  width: min(1440px, calc(100% - 28px));
  margin: 34px auto 0;
  padding: 22px 0 32px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 1080px) {
  .app-shell,
  .hero,
  .dashboard-grid,
  .doc-grid,
  .pricing {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .side-nav {
    display: flex;
    overflow-x: auto;
    padding: 10px 0;
  }

  .side-nav button {
    min-width: max-content;
  }

  .hero {
    min-height: auto;
  }
}

@media (max-width: 720px) {
  .topbar {
    grid-template-columns: 1fr;
  }

  .topnav {
    justify-content: flex-start;
    overflow-x: auto;
  }

  .top-action {
    width: 100%;
  }

  .app-shell,
  .site-footer {
    width: min(100% - 20px, 1440px);
  }

  .hero,
  .panel {
    padding: 18px;
  }

  h1 {
    font-size: 40px;
  }

  h2 {
    font-size: 27px;
  }

  .score-list,
  .module-preview {
    grid-template-columns: 1fr;
  }

  .site-footer {
    flex-direction: column;
  }
}
