:root {
  --ink: #303942;
  --body: #3E4854;
  --mute: #6B7683;
  --orange: #E99A33;
  --teal: #3FB7C5;
  --teal-d: #267F8B;
  --line: #E6E1D8;
  --soft: #F7F5F0;
  --card: #FFFFFF;
  --o-soft: #FCEBD3;
  --t-soft: #DDF3F5;
  --p-safe-bg: #E6F7F0;
  --p-safe-fg: #047857;
  --p-prev-bg: #E0F2FE;
  --p-prev-fg: #0369A1;
}

* {
  box-sizing: border-box;
  margin: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', sans-serif;
  color: var(--body);
  background: #FFFFFF;
  line-height: 1.78;
  font-size: 19px;
}

html:lang(ja) body {
  font-family: 'Noto Sans JP', 'Noto Sans TC', 'Hiragino Sans', 'Yu Gothic', sans-serif;
}

html:lang(en) body {
  font-family: 'Inter', 'Noto Sans TC', sans-serif;
}

a {
  color: inherit;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.num {
  font-family: 'Inter', 'Noto Sans TC', sans-serif;
  font-variant-numeric: tabular-nums;
}

h1, h2, h3 {
  color: var(--ink);
  line-height: 1.32;
  font-weight: 900;
}

h1 {
  font-size: clamp(32px, 4.4vw, 50px);
}

h2 {
  font-size: clamp(26px, 3.2vw, 36px);
  margin-bottom: 12px;
}

h3 {
  font-size: 22px;
  font-weight: 800;
}

.eyebrow {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--orange);
  margin-bottom: 10px;
  text-transform: uppercase;
}

/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

header .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 900;
  font-size: 20px;
  white-space: nowrap;
}

.brand img {
  height: 34px;
  width: auto;
}

.back-home {
  margin-left: auto;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  color: var(--teal-d);
  white-space: nowrap;
}

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

.lang {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  font-size: 15px;
  font-weight: 700;
  flex: none;
}

.lang button {
  border: 0;
  background: #FFFFFF;
  color: var(--body);
  padding: 6px 13px;
  cursor: pointer;
  font: inherit;
}

.lang button.on {
  background: var(--ink);
  color: #FFFFFF;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  font-size: 17px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}

.btn.p {
  background: var(--ink);
  color: #FFFFFF;
}

.btn.p:hover {
  background: #1F262D;
}

.btn.o {
  background: var(--orange);
  color: #2B1A05;
}

.btn.o:hover {
  background: #D98B24;
}

.btn.s {
  border-color: var(--ink);
  color: var(--ink);
  background: #FFFFFF;
}

.btn.sm {
  padding: 10px 18px;
  font-size: 15px;
  white-space: nowrap;
}

/* Hero */
.hero {
  background: var(--soft);
  padding: 40px 0 32px;
  border-bottom: 1px solid var(--line);
}

.hero h1 em {
  font-style: normal;
  color: var(--orange);
}

.hero .lead {
  margin-top: 12px;
  font-size: 20px;
  max-width: 820px;
}

.meta-strip {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  color: var(--mute);
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: #FFFFFF;
  border: 1px solid var(--line);
  color: var(--ink);
  font-weight: 600;
}

.dot-live {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #10B981;
  display: inline-block;
}

/* Main Tab Strip */
.tab-bar {
  position: sticky;
  top: 72px;
  z-index: 30;
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.tab-list {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 12px 0;
  scrollbar-width: none;
}

.tab-list::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  flex: none;
  border: 2px solid var(--line);
  background: #FFFFFF;
  color: var(--body);
  padding: 11px 22px;
  border-radius: 999px;
  font: inherit;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  transition: all .15s ease;
}

.tab-btn:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.tab-btn.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #FFFFFF;
}

/* Panels */
.panel {
  padding: 44px 0 72px;
}

.panel[hidden] {
  display: none;
}

.sec-block + .sec-block {
  margin-top: 56px;
}

.sec-head {
  margin-bottom: 24px;
}

.sec-head p {
  max-width: 800px;
  font-size: 19px;
}

/* Cards & Grids — spacious 2-col layout */
.picks-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 26px;
}

.pick-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pick-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.pick-task {
  font-size: 17px;
  font-weight: 800;
  color: var(--teal-d);
}

.pick-model {
  font-size: 25px;
  font-weight: 900;
  color: var(--ink);
  line-height: 1.25;
}

.pick-price {
  display: inline-block;
  align-self: flex-start;
  background: var(--o-soft);
  color: #8A500B;
  font-size: 16px;
  font-weight: 800;
  padding: 4px 14px;
  border-radius: 999px;
}

.pick-reason {
  font-size: 18px;
  line-height: 1.7;
}

.pick-alt {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-size: 16px;
  color: var(--mute);
  font-weight: 600;
}

/* Badges */
.p-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.p-badge.enterprise_safe {
  background: var(--p-safe-bg);
  color: var(--p-safe-fg);
}

.p-badge.personal_preview {
  background: var(--p-prev-bg);
  color: var(--p-prev-fg);
}

/* Chart Card */
.chart-card {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
}

.chart-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.pill-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.pill {
  border: 1.5px solid var(--line);
  background: #FFFFFF;
  color: var(--body);
  padding: 8px 16px;
  border-radius: 999px;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.pill.on {
  background: var(--ink);
  border-color: var(--ink);
  color: #FFFFFF;
}

.pill.teal.on {
  background: var(--teal-d);
  border-color: var(--teal-d);
}

.check-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--body);
  cursor: pointer;
  padding: 6px 10px;
}

.check-label input {
  width: 18px;
  height: 18px;
  accent-color: var(--teal-d);
  cursor: pointer;
}

.chart-scroll {
  width: 100%;
  overflow-x: auto;
  padding: 16px 0 8px;
}

.chart-svg {
  width: 100%;
  min-width: 660px;
  height: auto;
  display: block;
}

.inspector {
  margin-top: 14px;
  padding: 18px 20px;
  border-radius: 14px;
  background: var(--soft);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.inspector-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.inspector-name {
  font-weight: 900;
  font-size: 20px;
  color: var(--ink);
}

.inspector-meta {
  font-size: 16px;
  color: var(--body);
}

.inspector-task {
  font-size: 17px;
  font-weight: 700;
  color: var(--teal-d);
}

/* Plain-language Time & Budget Calculator */
.calc {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.calc .in {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
}

.f {
  margin-bottom: 22px;
}

.f label {
  display: flex;
  justify-content: space-between;
  font-weight: 800;
  color: var(--ink);
  font-size: 18px;
  margin-bottom: 8px;
}

.f label b {
  font-family: 'Inter', 'Noto Sans TC', sans-serif;
  color: var(--teal-d);
  font-size: 20px;
}

.f input[type="range"] {
  width: 100%;
  height: 8px;
  accent-color: var(--teal);
}

.f small {
  color: var(--mute);
  font-size: 15px;
  display: block;
  margin-top: 5px;
}

.preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.out {
  background: var(--ink);
  color: #FFFFFF;
  border-radius: 18px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.out .row {
  border-bottom: 1px solid rgba(255, 255, 255, .18);
  padding-bottom: 14px;
}

.out .row:last-of-type {
  border: 0;
  padding-bottom: 0;
}

.out .lab {
  font-size: 16px;
  color: #C9D1DA;
}

.out .val {
  font-family: 'Inter', 'Noto Sans TC', sans-serif;
  font-size: 32px;
  font-weight: 900;
  color: #FFFFFF;
  line-height: 1.25;
  margin-top: 4px;
}

.out .val.o {
  color: var(--orange);
}

.out .val.t {
  color: var(--teal);
}

.out .rec-name {
  font-size: 22px;
  font-weight: 800;
  color: var(--orange);
  margin-top: 4px;
}

.out .note {
  font-size: 15px;
  color: #AEB7C2;
  line-height: 1.65;
}

/* Platforms Tab */
.scenario-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.scenario-card {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
}

.scenario-card .s-k {
  font-size: 14px;
  font-weight: 800;
  color: var(--orange);
  margin-bottom: 4px;
}

.scenario-card h3 {
  font-size: 20px;
  margin-bottom: 6px;
}

.scenario-card p {
  font-size: 17px;
}

.plat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  margin-top: 20px;
}

.plat-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.plat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.plat-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 23px;
  font-weight: 900;
  color: var(--ink);
}

.c-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  flex: none;
}

.rank-pill {
  font-size: 14px;
  font-weight: 700;
  color: var(--teal-d);
  background: var(--t-soft);
  padding: 3px 12px;
  border-radius: 999px;
  align-self: flex-start;
}

.assistant-box {
  background: var(--t-soft);
  border-left: 5px solid var(--teal-d);
  border-radius: 0 12px 12px 0;
  padding: 12px 16px;
  font-size: 17px;
  color: var(--ink);
}

.plat-item {
  font-size: 17px;
}

.plat-item strong {
  color: var(--ink);
}

.si3-box {
  background: var(--o-soft);
  border-left: 5px solid var(--orange);
  border-radius: 0 12px 12px 0;
  padding: 12px 16px;
  font-size: 17px;
  color: var(--ink);
  margin-top: auto;
}

.ext-link {
  font-size: 16px;
  font-weight: 700;
  color: var(--teal-d);
  text-decoration: none;
  align-self: flex-start;
}

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

/* News Tab */
.filter-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 22px;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.news-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.news-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 15px;
  color: var(--mute);
}

.imp-badge {
  font-size: 14px;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--t-soft);
  color: var(--teal-d);
}

.imp-badge.major {
  background: var(--o-soft);
  color: #9A5509;
}

.news-impact {
  background: var(--soft);
  border-left: 4px solid var(--teal);
  padding: 10px 14px;
  border-radius: 0 10px 10px 0;
  font-size: 17px;
  color: var(--ink);
  margin-top: auto;
}

/* Contact & Footer */
.contact {
  background: var(--ink);
  color: #DCE2E8;
  text-align: center;
  padding: 76px 0;
}

.contact h2 {
  color: #FFFFFF;
}

.contact .lead {
  margin: 0 auto;
  max-width: 740px;
  font-size: 20px;
}

.contact .cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 28px;
}

.contact .btn.s {
  background: transparent;
  border-color: #FFFFFF;
  color: #FFFFFF;
}

.contact .btn.s:hover {
  background: rgba(255, 255, 255, .12);
}

footer {
  background: #252C33;
  color: #8F99A4;
  font-size: 15px;
  padding: 26px 0;
  text-align: center;
}

/* Responsive */
@media (max-width: 900px) {
  .picks-grid,
  .plat-grid,
  .scenario-grid,
  .calc,
  .news-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 17px;
  }
  header .btn.sm {
    display: none;
  }
  .back-home {
    font-size: 15px;
  }
  .card {
    padding: 20px;
  }
  .pick-model {
    font-size: 22px;
  }
}
