/* 開口 Pipe Up 官網：值取自 docs/launch/design-system/tokens.css。不載入外部字型。 */
:root {
  --paper: #F4F1EA; --paper-raised: #E9E4D8; --line: #D9D3C7; --line-strong: #8A877F;
  --ink: #1C2421; --ink-note: #4A504B; --ink-muted: #5E625C;
  --accent: #1E4A52; --accent-soft: #D8E5E6; --on-accent: #F4F1EA;
  --fix: #E1EBE8; --change: #9A4A1E;
  --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-6: 24px; --space-8: 32px; --space-12: 48px; --space-24: 96px;
  --radius-sm: 8px; --radius-md: 16px;
  --measure: 640px;
  --font-serif: "Noto Serif TC", "Iowan Old Style", "Songti TC", Georgia, serif;
  --font-sans: "Noto Sans TC", -apple-system, "PingFang TC", "Helvetica Neue", sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #161A18; --paper-raised: #212622; --line: #353B37; --line-strong: #737974;
    --ink: #ECE8DF; --ink-note: #BFC2BB; --ink-muted: #A9ADA6;
    --accent: #8FC4C8; --accent-soft: #1E3236; --on-accent: #0F1F22;
    --fix: #1E3236; --change: #E8A97F;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font-sans); font-size: 16px; line-height: 1.6;
  overflow-wrap: anywhere;
}
a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 var(--space-4); }
.band { padding: var(--space-12) 0; border-top: 1px solid var(--line); }
.band.raised { background: var(--paper-raised); }

/* header / footer */
.site-head { border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: 56px; }
.brand { font-family: var(--font-serif); font-size: 19px; font-weight: 500; letter-spacing: 0.03em; color: var(--ink); text-decoration: none; }
.site-head nav { display: flex; gap: var(--space-4); font-size: 15px; }
.site-head nav a { color: var(--ink-muted); text-decoration: none; }
.site-head nav a:hover { color: var(--ink); text-decoration: underline; }
.site-foot { border-top: 1px solid var(--line); padding: var(--space-8) 0 var(--space-12); color: var(--ink-muted); font-size: 14px; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); margin-bottom: var(--space-3); }
.site-foot a { color: var(--ink-muted); }

/* hero */
.hero { padding-top: var(--space-12); padding-bottom: var(--space-12); }
.hero .eyebrow { font-family: var(--font-serif); color: var(--ink-muted); font-size: 19px; letter-spacing: 0.03em; margin: 0 0 var(--space-6); }
.display { font-family: var(--font-serif); font-size: 34px; line-height: 1.2; font-weight: 600; margin: 0 0 var(--space-3); }
.hero .en { font-family: var(--font-serif); font-size: 20px; color: var(--ink-note); margin: 0 0 var(--space-6); }
.lede { color: var(--ink-note); margin: 0 0 var(--space-8); }
.cta {
  display: inline-flex; align-items: center; justify-content: center; min-height: 56px; padding: 0 var(--space-6);
  border-radius: var(--radius-md); border: 1px solid var(--accent); background: var(--accent); color: var(--on-accent);
  font: 500 15px/1.4 var(--font-sans);
}
.cta.is-disabled { background: transparent; color: var(--ink-muted); border-color: var(--line-strong); cursor: default; }
.fine { display: block; margin-top: var(--space-3); color: var(--ink-muted); font-size: 13px; }
@media (min-width: 600px) { .hero { padding-top: var(--space-24); padding-bottom: var(--space-24); } .display { font-size: 44px; } }

/* features */
.features { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-4); }
.features li { border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--space-6); background: var(--paper); }
.features .quote { font-family: var(--font-serif); font-size: 20px; font-weight: 600; margin: 0 0 var(--space-2); }
.features p { margin: 0; color: var(--ink-note); }

/* long-form text (legal, support) */
.doc { padding-top: var(--space-8); padding-bottom: var(--space-12); }
.doc h1 { font-family: var(--font-serif); font-size: 28px; line-height: 1.25; font-weight: 600; margin: 0 0 var(--space-2); }
.doc h2 { font-family: var(--font-serif); font-size: 20px; line-height: 1.4; font-weight: 600; margin: var(--space-8) 0 var(--space-3); }
.doc h3 { font-family: var(--font-serif); font-size: 17px; font-weight: 600; margin: var(--space-6) 0 var(--space-2); }
.doc p, .doc li { color: var(--ink); }
.doc .meta { color: var(--ink-muted); font-size: 14px; }
.doc hr { border: 0; border-top: 1px solid var(--line); margin: var(--space-8) 0; }
.doc ol, .doc ul { padding-left: 1.4em; }
.doc li + li { margin-top: var(--space-2); }
.lang-switch { font-size: 14px; margin: var(--space-3) 0 0; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); margin: var(--space-4) 0; }
table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 14px; line-height: 1.5; }
th, td { text-align: left; vertical-align: top; padding: var(--space-3); border-bottom: 1px solid var(--line); }
th { background: var(--paper-raised); font-weight: 500; }
tr:last-child td { border-bottom: 0; }
.steps { counter-reset: s; list-style: none; padding: 0; }
.steps li { counter-increment: s; position: relative; padding-left: 40px; min-height: 28px; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid var(--accent); color: var(--accent); font-size: 14px; display: flex; align-items: center; justify-content: center;
}
.note-box { border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--radius-sm); padding: var(--space-4); background: var(--paper-raised); }
.en-section { margin-top: var(--space-12); padding-top: var(--space-8); border-top: 1px solid var(--line-strong); }

/* hero band + feature accents (Alvin TG18720: brand color up top, icons on cards) */
.hero-band { background: #1E4A52; color: #F4F1EA; }
.hero-band .eyebrow, .hero-band .en, .hero-band .lede, .hero-band .fine { color: #C9DCDD; }
.hero-band .display { color: #FFFFFF; }
.hero-band .cta.is-disabled { color: #F4F1EA; border-color: rgba(244,241,234,.55); }
.features li { border-top: 3px solid var(--accent); }
.features .icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border-radius: 50%; background: var(--accent-soft); color: var(--accent); margin-bottom: var(--space-3); }
.features .quote { color: var(--accent); }

/* home: D layout (TG18758 picked D; use cases as mock chats TG19064) */
.home .wrap { max-width: 1120px; }
.d-hero { display: flex; flex-wrap: wrap; gap: var(--space-12); align-items: center; padding-top: 72px; padding-bottom: 72px; }
.d-hero-text { flex: 999 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.d-hero > .phone { flex: 1 1 320px; }
.d-pain { margin: 0; font-family: var(--font-serif); font-size: 21px; color: var(--ink-muted); }
.d-title { margin: 0; font-family: var(--font-serif); font-size: clamp(42px, 7vw, 68px); line-height: 1.15; font-weight: 600; }
.d-mark { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 4px; text-underline-offset: 0.18em; }
.d-cta-row { display: flex; flex-wrap: wrap; gap: var(--space-4); align-items: center; }
.d-cta { font: inherit; font-weight: 600; height: 52px; padding: 0 28px; border: 0; border-radius: var(--radius-md); background: var(--accent); color: var(--on-accent); }
.d-cta:disabled { cursor: default; }
.d-cta.on-dark { background: #F4F1EA; color: #1E4A52; }
.d-tags { font-size: 14px; color: var(--ink-muted); }
.d-fine { margin: 0; font-size: 13px; color: var(--ink-muted); }

/* mock chat window: mirrors the app's chat screen (build 7) */
.chat { margin: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 20px; display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }
.chat-bar { display: flex; justify-content: space-between; gap: var(--space-3); font-size: 13px; color: var(--ink-muted); padding-bottom: var(--space-2); border-bottom: 1px solid var(--line); }
.bub { margin: 0; max-width: 85%; padding: 10px 14px; border-radius: var(--radius-md); }
.bub.them { align-self: flex-start; background: var(--paper-raised); }
.bub.me { align-self: flex-end; background: var(--paper); border: 1px solid var(--line); }
.me-wrap { align-self: flex-end; max-width: 85%; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.me-wrap .bub { max-width: 100%; }
.fix { margin: 0; font-size: 14px; color: var(--ink); background: var(--fix); border-radius: 12px; padding: 8px 12px; }
.fix b { font-weight: 700; color: var(--change); }
.hint { align-self: stretch; border: 1px dashed var(--line-strong); border-radius: var(--radius-md); padding: 12px 14px; background: var(--paper); }
.hint p { margin: 0; }
.hint-label { font-size: 13px; color: var(--accent); font-weight: 600; margin-bottom: 4px !important; }
.zh { color: var(--ink-muted); font-size: 14px; }
.chat .zh-line { margin: -6px 0 0; font-size: 13px; color: var(--ink-muted); }
.rows { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: var(--space-2); font-size: 14px; }
.rows li { display: grid; grid-template-columns: 3.5em 1fr; gap: var(--space-3); }
.rows .who { color: var(--ink-muted); }

/* three steps */
.d-band { background: var(--paper-raised); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 64px 0; }
.d-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--space-8); }
.d-steps li { display: flex; flex-direction: column; gap: var(--space-3); border-top: 1px solid var(--line-strong); padding-top: 20px; }
.d-steps .n { font-family: var(--font-serif); font-size: 15px; color: var(--ink-muted); }
.d-steps h2 { margin: 0; font-family: var(--font-serif); font-size: 24px; font-weight: 600; }
.mini { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: var(--space-4); font-size: 14px; color: var(--ink-note); display: flex; flex-direction: column; gap: 4px; }
.mini .fix { align-self: flex-start; }
.mini .strong { color: var(--ink); }

/* use cases */
.d-cases { padding-top: 72px; padding-bottom: 32px; }
.d-h2 { margin: 0 0 var(--space-8); font-family: var(--font-serif); font-size: 32px; font-weight: 600; }
.case { display: flex; flex-wrap: wrap; gap: var(--space-8); align-items: flex-start; padding: var(--space-8) 0; border-top: 1px solid var(--line); }
.case-text { flex: 1 1 300px; min-width: 0; }
.case-text h3 { margin: 0 0 var(--space-3); font-family: var(--font-serif); font-size: 22px; font-weight: 600; }
.case-text p { margin: 0; color: var(--ink-note); }
.case-demo { flex: 1.3 1 360px; min-width: 0; display: flex; flex-direction: column; gap: var(--space-4); }
.sheet { margin: 0; border: 1px solid var(--accent); border-radius: var(--radius-md); padding: var(--space-4) 20px; display: flex; flex-direction: column; gap: var(--space-3); }
.sheet figcaption { font-size: 13px; font-weight: 600; color: var(--accent); }
.sheet p { margin: 0; display: flex; flex-direction: column; }

.d-data { padding-top: 40px; padding-bottom: 40px; font-size: 15px; color: var(--ink-note); }
.d-close { background: #1E4A52; color: #F4F1EA; }
.d-close .wrap { padding-top: 56px; padding-bottom: 56px; display: flex; flex-wrap: wrap; gap: var(--space-6); justify-content: space-between; align-items: center; }
.d-close p { margin: 0; font-family: var(--font-serif); font-size: 30px; color: #FFFFFF; }
.home .site-foot { border-top: 0; }

/* motion (TG19266): JS adds .js-anim; without JS or with reduced motion everything stays static */
@media (prefers-reduced-motion: no-preference) {
  .js-anim [data-live] > .bub, .js-anim [data-live] .me-wrap > * { opacity: 0; transform: translateY(8px); transition: opacity .35s ease, transform .35s ease; }
  .js-anim [data-live] .is-on { opacity: 1; transform: none; }
  .js-anim [data-live] .fix.is-on { animation: fix-in .5s ease; }
  .typing { align-self: flex-start; display: inline-flex; gap: 4px; padding: 12px 14px; border-radius: var(--radius-md); background: var(--paper-raised); }
  .typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-muted); animation: dot 1s infinite ease-in-out; }
  .typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
  .js-anim [data-reveal] > li { opacity: 0; transform: translateY(12px); transition: opacity .5s ease, transform .5s ease; }
  .js-anim [data-reveal] > li:nth-child(2) { transition-delay: .15s; } .js-anim [data-reveal] > li:nth-child(3) { transition-delay: .3s; }
  .js-anim [data-reveal].is-in > li { opacity: 1; transform: none; }
  .js-anim [data-reveal] .mini .fix { opacity: 0; transition: opacity .4s ease .9s; }
  .js-anim [data-reveal].is-in .mini .fix { opacity: 1; }
}
@keyframes dot { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
@keyframes fix-in { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

/* richer home: phone frames, stat strip, band rhythm (T1022) */
.phone { position: relative; background: #1C2421; border-radius: 44px; padding: 10px; box-shadow: 0 18px 40px -18px rgba(28,36,33,.45); width: 100%; max-width: 320px; margin: 0 auto; }
.phone::before { content: ""; position: absolute; top: 20px; left: 50%; transform: translateX(-50%); width: 84px; height: 24px; border-radius: 12px; background: #1C2421; z-index: 2; }
.phone-hero { max-width: 340px; }
.phone-hero .chat { border: 0; border-radius: 34px; padding: 56px 16px 20px; min-height: 560px; }
.phone-sm { max-width: 232px; border-radius: 36px; padding: 8px; }
.phone-sm::before { top: 16px; width: 64px; height: 18px; border-radius: 9px; }
.phone-sm img { display: block; width: 100%; height: auto; border-radius: 28px; background: var(--paper); }
@media (prefers-color-scheme: dark) { .phone, .phone::before { background: #050706; } .phone { box-shadow: 0 0 0 1px var(--line-strong), 0 18px 40px -18px #000; } }

.d-stats { background: var(--accent-soft); border-top: 1px solid var(--line); }
.d-stats dl { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.d-stats dl > div { padding: var(--space-6) var(--space-4); text-align: center; border-left: 1px solid var(--line-strong); }
.d-stats dl > div:first-child { border-left: 0; }
.d-stats dt { font-size: 14px; color: var(--ink-muted); }
.d-stats dd { margin: 0; font-size: 18px; color: var(--ink-note); }
.d-stats dd b { font-family: var(--font-serif); font-size: 44px; line-height: 1.2; font-weight: 600; color: var(--accent); }
@media (max-width: 599px) { .d-stats dl > div { border-left: 0; border-top: 1px solid var(--line-strong); padding: var(--space-4); } .d-stats dl > div:first-child { border-top: 0; } }
.d-steps .n { font-size: 40px; line-height: 1; color: var(--accent); }
.d-steps .phone { margin: var(--space-2) auto; }
.d-data { background: var(--paper-raised); border-top: 1px solid var(--line); }

/* why Pipe Up, comparison, recap card, bars (T1022 value) */
.d-why { padding: 72px 0 24px; }
.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--space-6); align-items: stretch; }
.why { border-top: 3px solid var(--accent); background: var(--paper-raised); border-radius: 0 0 var(--radius-md) var(--radius-md); padding: var(--space-6); display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.why-ico { color: var(--accent); }
.why h3 { margin: var(--space-2) 0 0; font-family: var(--font-serif); font-size: 24px; font-weight: 600; }
.why-line { margin: 0; color: var(--ink-note); }
.recap { margin: var(--space-4) 0 0; background: var(--paper); border: 1px solid var(--accent); border-radius: var(--radius-md); padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-3); font-size: 14px; }
.recap figcaption { font-size: 13px; font-weight: 600; color: var(--accent); }
.rc-row { display: flex; flex-direction: column; gap: 2px; }
.rc-k { font-size: 12px; color: var(--ink-muted); }
.rc-keep { background: var(--fix); border-radius: 12px; padding: 8px 12px; }
.rc-keep > span:last-child { font-weight: 600; }


.bars { gap: var(--space-4); }
.bar { display: grid; grid-template-columns: 4.5em 1fr 4.5em; gap: var(--space-3); align-items: center; font-size: 14px; }
.bar i { display: block; height: 14px; width: var(--w); border-radius: 7px; background: var(--accent); }
.bar b { font-weight: 600; color: var(--ink); text-align: right; }
.rows[data-type] { min-height: 0; }
.rows .cursor { display: inline-block; width: 2px; height: 1em; margin-left: 1px; vertical-align: -0.12em; background: var(--accent); }

@media (prefers-reduced-motion: no-preference) {
  .js-anim .recap .rc-row { opacity: 0; transform: translateY(8px); transition: opacity .5s ease, transform .5s ease; }
  .js-anim .recap.is-in .rc-row { opacity: 1; transform: none; }
  .js-anim .recap.is-in .rc-row:nth-of-type(1) { transition-delay: .2s; }
  .js-anim .recap.is-in .rc-row:nth-of-type(2) { transition-delay: 1s; }
  .js-anim .recap.is-in .rc-row:nth-of-type(3) { transition-delay: 1.8s; }
  .js-anim .bars .bar i { width: 0; transition: width 1.1s cubic-bezier(.2,.7,.2,1); }
  .js-anim .bars.is-in .bar i { width: var(--w); }
  .js-anim .bars.is-in .bar:nth-of-type(2) i { transition-delay: .25s; }
  .js-anim .bars.is-in .bar:nth-of-type(3) i { transition-delay: .5s; }
  .cursor { animation: blink 1s steps(1) infinite; }
}
@keyframes blink { 50% { opacity: 0; } }
@media (max-width: 599px) { .bar { grid-template-columns: 3.8em 1fr 4em; } }

/* festive sticker (T1022): only exists in the DOM during a holiday window; see festive.js */
.festive-row { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.festive-row .d-title { min-width: 0; }
.festive-badge { flex: none; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; line-height: 0; }
.festive-badge:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.festive-img { width: 56px; height: 56px; display: block; border-radius: 50%; }
.festive-wrap { position: relative; flex: none; line-height: 0; }
.festive-bubble { position: absolute; top: 50%; left: calc(100% + 10px); translate: 0 -50%; z-index: 3; margin: 0; width: max-content; max-width: 240px; line-height: 1.5; padding: 10px 14px; border-radius: var(--radius-md); background: var(--paper-raised); border: 1px solid var(--line-strong); color: var(--ink); font-size: 15px; line-height: 1.5; opacity: 0; visibility: hidden; pointer-events: none; }
.festive-row.is-open .festive-bubble { opacity: 1; visibility: visible; }
.festive-stage { position: relative; line-height: 0; }
.phone-sm .festive-sticker, .festive-sticker { position: absolute; left: 67%; top: 46%; width: 17%; height: auto; aspect-ratio: 1; border-radius: 0; background: none; transform: translate(-50%, -50%) rotate(8deg); filter: drop-shadow(0 2px 3px rgba(28,36,33,.25)); pointer-events: none; }
@media (prefers-reduced-motion: no-preference) {
  .festive-bubble { transform: translateX(-4px); transition: opacity .2s ease, transform .2s ease, visibility .2s; }
  .festive-row.is-open .festive-bubble { transform: none; }
  .festive-img { transition: transform .2s ease; }
  .festive-badge:hover .festive-img { transform: rotate(-6deg) scale(1.06); }
}
@media (max-width: 599px) { .festive-bubble { top: 100%; left: auto; right: 0; translate: none; margin-top: 8px; } }
