:root {
  --ink: #16211f;
  --muted: #5d6864;
  --paper: #fbfcf8;
  --white: #ffffff;
  --mist: #edf3ef;
  --line: #d7ded8;
  --teal: #147a73;
  --teal-dark: #0d5651;
  --coral: #bb604d;
  --gold: #b68a3c;
  --graphite: #2b302f;
  --shadow: 0 20px 60px rgba(16, 28, 25, 0.16);
  --radius: 8px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.icon-sprite {
  display: none;
}

.icon {
  width: 1.1rem;
  height: 1.1rem;
  flex: 0 0 auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 72px;
  padding: 0.85rem clamp(1rem, 4vw, 3.5rem);
  background: rgba(251, 252, 248, 0.92);
  border-bottom: 1px solid rgba(215, 222, 216, 0.86);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  min-width: 250px;
}

.brand-logo {
  width: 88px;
  height: 44px;
  object-fit: contain;
  object-position: left center;
  flex: 0 0 auto;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1rem;
  letter-spacing: 0;
}

.brand small {
  color: var(--muted);
  font-size: 0.75rem;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.75rem, 2vw, 1.7rem);
  color: var(--muted);
  font-size: 0.95rem;
}

.site-nav a {
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--teal-dark);
}

.header-cta,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.75rem 1rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
}

.header-cta {
  color: var(--white);
  background: var(--ink);
}

.button.primary {
  color: var(--white);
  background: var(--teal);
  box-shadow: 0 12px 28px rgba(20, 122, 115, 0.24);
}

.button.secondary {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(255, 255, 255, 0.7);
}

.button.ghost {
  color: var(--ink);
  background: var(--white);
  border-color: var(--line);
}

.button.wide {
  width: 100%;
}

.button:hover,
.button:focus-visible,
.header-cta:hover,
.header-cta:focus-visible {
  transform: translateY(-1px);
}

.hero {
  position: relative;
  min-height: clamp(540px, calc(100svh - 136px), 720px);
  overflow: hidden;
  display: grid;
  align-items: center;
  background: var(--ink);
}

.hero-media,
.hero-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-media {
  object-fit: cover;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(11, 23, 20, 0.86) 0%, rgba(11, 23, 20, 0.62) 39%, rgba(11, 23, 20, 0.14) 72%, rgba(11, 23, 20, 0.02) 100%),
    linear-gradient(0deg, rgba(11, 23, 20, 0.28), rgba(11, 23, 20, 0.04));
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 5rem) 0;
  color: var(--white);
}

.eyebrow,
.section-kicker {
  margin: 0 0 0.75rem;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  width: min(680px, 100%);
  margin: 0;
  font-size: 4.7rem;
  line-height: 1.05;
  letter-spacing: 0;
}

.hero h1 span {
  display: inline;
}

.hero-copy {
  width: min(590px, 100%);
  margin: 1.35rem 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.12rem;
  overflow-wrap: anywhere;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 145px));
  gap: 0.75rem;
  margin: 2.2rem 0 0;
  padding: 0;
}

.hero-metrics div {
  padding: 0.85rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.hero-metrics dt,
.hero-metrics dd {
  margin: 0;
}

.hero-metrics dt {
  color: var(--white);
  font-size: 1.45rem;
  font-weight: 800;
}

.hero-metrics dd {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.85rem;
}

.section {
  padding: clamp(3rem, 7vw, 6rem) 0;
}

.section-inner {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.intro-band {
  padding: clamp(1.6rem, 4vw, 2.6rem) 0;
  background: var(--mist);
  border-bottom: 1px solid var(--line);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 1.1fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: center;
}

.split h1,
.split h2,
.section-heading h2,
.contact-layout h2,
.dialog-head h2 {
  margin: 0;
  font-size: 2.8rem;
  line-height: 1.15;
  letter-spacing: 0;
}

.split p:last-child,
.contact-copy {
  color: var(--muted);
  font-size: 1.03rem;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.section-heading.compact {
  width: min(760px, 100%);
  display: block;
}

.service-grid,
.plan-grid,
.stat-grid,
.firm-grid {
  display: grid;
  gap: 1rem;
}

.firm-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1.5rem;
}

.firm-card {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  min-height: 230px;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 10px 34px rgba(22, 33, 31, 0.06);
}

.firm-card img {
  width: 100%;
  height: 100px;
  object-fit: contain;
  object-position: left center;
}

.firm-card.ip img {
  max-width: 132px;
}

.firm-card span {
  display: inline-flex;
  margin-bottom: 0.35rem;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 800;
}

.firm-card h3 {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.25;
}

.firm-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.firm-mark {
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
  color: var(--white);
  background: var(--teal-dark);
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  font-size: 2rem;
  font-weight: 900;
}

.positioning-section {
  background: #fbfcf8;
}

.positioning-lead {
  max-width: 430px;
  margin: 0;
  color: var(--muted);
}

.position-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 1rem;
}

.position-card,
.strategy-grid article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 10px 34px rgba(22, 33, 31, 0.06);
}

.position-card {
  padding: 1.35rem;
}

.position-card.highlight {
  color: var(--white);
  background: #142a27;
  border-color: rgba(216, 181, 101, 0.55);
  box-shadow: var(--shadow);
}

.position-card.muted {
  background: #f7f4ed;
}

.position-card span,
.strategy-grid span {
  display: inline-flex;
  margin-bottom: 0.75rem;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 900;
}

.position-card.highlight span {
  color: #d8b565;
}

.position-card h3 {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1.2;
}

.position-card ul {
  display: grid;
  gap: 0.75rem;
  margin: 1.2rem 0 0;
  padding: 0;
  list-style: none;
}

.position-card li {
  display: flex;
  gap: 0.55rem;
}

.position-card li::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  margin-top: 0.58rem;
  border-radius: 999px;
  background: var(--coral);
}

.position-card.highlight li::before {
  background: #d8b565;
}

.position-card.highlight li {
  color: rgba(255, 255, 255, 0.82);
}

.service-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.service-card,
.plan-card,
.stat-card,
.ops-panel,
.lead-form {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 10px 34px rgba(22, 33, 31, 0.06);
}

.service-card,
.plan-card {
  min-height: 260px;
  padding: 1.45rem;
}

.service-card {
  display: flex;
  flex-direction: column;
  align-items: start;
}

.service-card h3,
.plan-card h3,
.ops-panel h3,
.timeline h3 {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.25;
}

.service-card p,
.plan-card p,
.timeline p,
.handoff-box p {
  color: var(--muted);
}

.service-card a {
  margin-top: auto;
  color: var(--teal-dark);
  font-weight: 800;
  text-decoration: none;
}

.service-card.support {
  background: #fbfaf6;
}

.patent-services {
  background: #eef4f1;
}

.card-icon {
  width: 44px;
  height: 44px;
  margin-bottom: 1.1rem;
  color: var(--teal);
  padding: 0.55rem;
  background: var(--mist);
  border-radius: var(--radius);
}

.strategy-section {
  background: #eef4f1;
}

.strategy-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.strategy-grid article {
  min-height: 220px;
  padding: 1.25rem;
}

.strategy-grid h3 {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.25;
}

.strategy-grid p {
  color: var(--muted);
}

.backend-section {
  background: #17211f;
  color: var(--white);
}

.backend-section .section-kicker {
  color: #d8b565;
}

.backend-section .section-heading h2 {
  max-width: 720px;
}

.backend-lead {
  max-width: 430px;
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
}

.backend-status,
.backend-grid {
  display: grid;
  gap: 1rem;
}

.backend-status {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 1rem;
}

.backend-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.backend-status article,
.backend-grid article,
.backend-flow {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.12);
}

.backend-status article {
  padding: 1.1rem;
}

.backend-status strong {
  display: block;
  margin-top: 0.65rem;
  font-size: 1.08rem;
  line-height: 1.35;
}

.backend-status p,
.backend-grid p,
.backend-flow li {
  color: rgba(255, 255, 255, 0.72);
}

.backend-grid article {
  min-height: 230px;
  padding: 1.2rem;
}

.backend-grid span {
  display: inline-flex;
  margin-bottom: 0.95rem;
  color: #d8b565;
  font-size: 0.82rem;
  font-weight: 900;
}

.backend-grid h3,
.backend-flow h3 {
  margin: 0;
  font-size: 1.18rem;
}

.backend-flow {
  margin-top: 1rem;
  padding: 1.2rem;
}

.backend-flow ol {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem 1.4rem;
  margin: 1rem 0 0;
  padding-left: 1.2rem;
}

.backend-workbench {
  margin-top: 1rem;
  padding: 1.2rem;
  border: 1px solid rgba(216, 181, 101, 0.42);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.09);
  box-shadow: var(--shadow);
}

.backend-workbench-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1.2rem;
  margin-bottom: 1rem;
}

.backend-workbench-head h3 {
  margin: 0.65rem 0 0;
  font-size: 1.35rem;
}

.backend-workbench-head p,
.backend-system-note span {
  color: rgba(255, 255, 255, 0.72);
}

.backend-system-note {
  display: grid;
  gap: 0.25rem;
  max-width: 320px;
  padding: 0.9rem;
  border: 1px solid rgba(216, 181, 101, 0.34);
  border-radius: var(--radius);
  background: rgba(255, 248, 234, 0.1);
}

.backend-system-note strong {
  color: #d8b565;
}

.backend-tool-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.75fr) minmax(0, 1.25fr);
  gap: 1rem;
  align-items: start;
}

.backend-search-form,
.backend-report-panel,
.backend-task-table {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
}

.backend-search-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  padding: 1rem;
}

.backend-search-form label {
  display: grid;
  gap: 0.35rem;
  color: rgba(255, 255, 255, 0.84);
  font-weight: 800;
}

.backend-search-form .full {
  grid-column: 1 / -1;
}

.backend-search-form input,
.backend-search-form textarea {
  background: rgba(255, 255, 255, 0.96);
}

.file-status {
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.86rem;
  font-weight: 700;
}

.backend-report-panel {
  min-height: 360px;
  padding: 1rem;
}

.backend-report-panel h3 {
  margin: 0.65rem 0 0;
  font-size: 1.35rem;
}

.backend-report-panel p {
  color: rgba(255, 255, 255, 0.72);
}

.backend-empty,
.backend-report-meta,
.risk-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0.18rem 0.58rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 900;
}

.backend-empty {
  color: #7b4817;
  background: #ffe4bd;
}

.backend-report-meta {
  color: var(--white);
  background: rgba(255, 255, 255, 0.13);
}

.risk-pill.low {
  color: #155f3a;
  background: #d9f0df;
}

.risk-pill.medium {
  color: #7b4817;
  background: #ffe4bd;
}

.risk-pill.high {
  color: var(--white);
  background: #bb604d;
}

.backend-match-list {
  display: grid;
  gap: 0.7rem;
  margin: 1rem 0;
}

.backend-match {
  padding: 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.07);
}

.backend-match strong,
.backend-match span {
  display: block;
}

.backend-match span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.9rem;
}

.backend-report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.official-review-panel {
  margin-top: 1.2rem;
  padding: 1rem;
  border: 1px solid rgba(216, 181, 101, 0.45);
  border-radius: var(--radius);
  background: rgba(255, 244, 222, 0.08);
}

.official-review-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.8rem;
}

.official-review-head h4 {
  margin: 0.55rem 0 0;
  font-size: 1.05rem;
}

.official-review-panel > p {
  margin: 0.85rem 0;
}

.official-review-summary,
.official-review-empty {
  display: grid;
  gap: 0.35rem;
  margin: 0.9rem 0;
  padding: 0.8rem;
  border-left: 3px solid #d8b565;
  background: rgba(255, 255, 255, 0.08);
}

.official-review-summary span,
.official-review-empty {
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.9rem;
  line-height: 1.5;
}

.browser-review-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 1rem;
}

.browser-review-form label {
  display: grid;
  gap: 0.35rem;
  color: rgba(255, 255, 255, 0.84);
  font-weight: 800;
}

.browser-review-form input,
.browser-review-form select,
.browser-review-form textarea {
  background: rgba(255, 255, 255, 0.96);
}

.browser-review-form .full {
  grid-column: 1 / -1;
}

.browser-review-form .official-review-confirm {
  display: flex;
  align-items: start;
  gap: 0.6rem;
  font-size: 0.9rem;
  line-height: 1.45;
}

.official-review-confirm input {
  width: 1rem;
  min-width: 1rem;
  min-height: 1rem;
  margin-top: 0.15rem;
}

.backend-task-table {
  overflow-x: auto;
  margin-top: 1rem;
}

.backend-task-cards {
  display: none;
  gap: 0.85rem;
  margin-top: 1rem;
}

.backend-task-table table {
  min-width: 780px;
}

.backend-task-table th,
.backend-task-table td {
  color: var(--white);
  border-bottom-color: rgba(255, 255, 255, 0.12);
}

.backend-task-table .meta-text {
  color: rgba(255, 255, 255, 0.6);
}

.backend-task-card {
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
}

.backend-task-card.empty {
  text-align: center;
}

.backend-task-card-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.75rem;
}

.backend-task-card-head strong,
.backend-task-card-head p {
  display: block;
}

.backend-task-card-head strong {
  font-size: 1.05rem;
  line-height: 1.3;
}

.backend-task-card-head p {
  margin: 0.35rem 0 0;
  color: rgba(255, 255, 255, 0.72);
}

.backend-task-card-meta {
  display: grid;
  gap: 0.7rem;
  margin: 1rem 0 0;
}

.backend-task-card-meta div {
  display: grid;
  gap: 0.18rem;
}

.backend-task-card-meta dt {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.76rem;
  font-weight: 800;
}

.backend-task-card-meta dd {
  margin: 0;
  color: var(--white);
  font-weight: 700;
  line-height: 1.45;
}

.ai-section {
  background: #f3f7f2;
}

.ai-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(420px, 1.22fr);
  gap: 1.5rem;
  align-items: start;
}

.ai-copy h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.05;
}

.ai-copy p {
  max-width: 620px;
  color: var(--muted);
}

.ai-guardrail {
  display: grid;
  gap: 0.35rem;
  margin-top: 1.2rem;
  padding: 1rem;
  border: 1px solid rgba(182, 138, 60, 0.45);
  border-radius: var(--radius);
  background: #fff8ea;
}

.ai-guardrail strong {
  color: #7b4817;
}

.ai-guardrail span {
  color: var(--muted);
}

.ai-console {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(250px, 0.75fr);
  gap: 1rem;
}

.ai-chat-panel,
.ai-review-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 10px 34px rgba(22, 33, 31, 0.07);
}

.ai-chat-panel {
  display: grid;
  gap: 1rem;
  padding: 1rem;
}

.ai-review-panel {
  padding: 1rem;
}

.ai-panel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
}

.ai-panel-head h3,
.ai-review-panel h3 {
  margin: 0.65rem 0 0;
  font-size: 1.15rem;
}

.ai-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0.18rem 0.58rem;
  border-radius: 999px;
  color: #155f3a;
  background: #d9f0df;
  font-size: 0.8rem;
  font-weight: 900;
  white-space: nowrap;
}

.ai-status.waiting {
  color: #7b4817;
  background: #ffe4bd;
}

.ai-status.done {
  color: var(--white);
  background: var(--teal-dark);
}

.ai-messages {
  display: grid;
  align-content: start;
  gap: 0.65rem;
  min-height: 300px;
  max-height: 380px;
  overflow-y: auto;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.ai-message {
  max-width: 88%;
  padding: 0.7rem 0.8rem;
  border-radius: var(--radius);
  line-height: 1.45;
}

.ai-message.bot {
  justify-self: start;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
}

.ai-message.user {
  justify-self: end;
  color: var(--white);
  background: var(--teal-dark);
}

.ai-chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.7rem;
}

.ai-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.ai-summary-list {
  display: grid;
  gap: 0.7rem;
  margin: 1rem 0;
}

.ai-summary-list div {
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--line);
}

.ai-summary-list div:last-child {
  border-bottom: 0;
}

.ai-summary-list dt {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.ai-summary-list dd {
  margin: 0.15rem 0 0;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.ai-review-button {
  width: 100%;
}

.ai-review-button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
  box-shadow: none;
}

.process {
  background: #f6f0e6;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.timeline li {
  min-height: 210px;
  padding: 1.35rem;
  background: var(--paper);
}

.timeline span {
  display: inline-flex;
  margin-bottom: 1.2rem;
  color: var(--coral);
  font-weight: 900;
}

.payment-section {
  background: #fbfcf8;
}

.payment-layout {
  display: grid;
  gap: 1.5rem;
}

.payment-copy {
  max-width: 760px;
  color: var(--muted);
}

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

.payment-card,
.payment-notice {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 10px 34px rgba(22, 33, 31, 0.06);
}

.payment-card {
  min-height: 220px;
  padding: 1.2rem;
}

.payment-card span {
  display: inline-flex;
  margin-bottom: 1rem;
  color: var(--coral);
  font-weight: 900;
}

.payment-card h3 {
  margin: 0;
  font-size: 1.15rem;
}

.payment-card p,
.payment-notice p {
  color: var(--muted);
}

.payment-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem;
  border-color: rgba(182, 138, 60, 0.42);
  background: #fff8ea;
}

.payment-notice strong {
  color: #7b4817;
  white-space: nowrap;
}

.payment-notice p {
  margin: 0;
}

.payment-internal-flow {
  padding-top: 0;
}

.payment-internal-flow .timeline {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.system-section {
  background: #17211f;
  color: var(--white);
}

.system-section .section-kicker {
  color: #d8b565;
}

.system-heading {
  align-items: center;
}

.internal-note {
  max-width: 640px;
  margin: 0.75rem 0 0;
  color: rgba(255, 255, 255, 0.74);
}

.system-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.75rem;
}

.stat-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 1rem;
}

.stat-card {
  min-height: 112px;
  padding: 1rem;
  color: var(--ink);
}

.stat-card span,
.stat-card strong {
  display: block;
}

.stat-card span {
  color: var(--muted);
  font-size: 0.9rem;
}

.stat-card strong {
  margin-top: 0.35rem;
  color: var(--teal-dark);
  font-size: 2.2rem;
  line-height: 1;
}

.ops-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 1rem;
}

.ops-panel {
  padding: 1rem;
  color: var(--ink);
  overflow: hidden;
}

.release-console {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
}

.admin-framework {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(190px, 1.2fr);
  gap: 1px;
  margin-top: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.18);
}

.admin-framework > a,
.admin-current-release {
  min-width: 0;
  padding: 0.9rem 1rem;
  background: rgba(16, 49, 61, 0.96);
  color: #fff;
  text-decoration: none;
}

.admin-framework > a {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 0.65rem;
  align-items: center;
}

.admin-framework > a span {
  grid-row: 1 / 3;
  color: #d8b565;
  font-size: 0.78rem;
  font-weight: 900;
}

.admin-framework > a strong,
.admin-current-release strong {
  font-size: 0.95rem;
}

.admin-framework > a small,
.admin-current-release span,
.admin-current-release small {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.78rem;
}

.admin-framework > a:hover,
.admin-framework > a:focus-visible {
  background: #164657;
}

.admin-current-release {
  display: grid;
  gap: 0.2rem;
  border-left: 3px solid #d8b565;
}

.release-console-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
}

.release-console-head h3,
.release-console-head p {
  margin: 0;
}

.release-console-head h3 {
  font-size: 1.3rem;
}

.release-console-head > div > p:last-child {
  margin-top: 0.4rem;
  color: var(--muted);
}

.release-api-status,
.release-status {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: var(--mist);
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
}

.release-api-status[data-state="ready"],
.release-status.verified {
  background: #d9f0df;
  color: #1e6339;
}

.release-api-status[data-state="error"],
.release-status.rolled_back {
  background: #f8d9d3;
  color: #8d3325;
}

.release-status.deployed {
  background: #cfedf1;
  color: #0a5b68;
}

.release-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.release-form label {
  display: grid;
  gap: 0.4rem;
  color: var(--ink-soft);
  font-size: 0.88rem;
  font-weight: 800;
}

.release-form .full {
  grid-column: 1 / -1;
}

.release-table-wrap {
  margin-top: 1rem;
  overflow-x: auto;
}

.release-table-wrap table {
  min-width: 1180px;
}

.release-table-wrap a {
  color: var(--teal-dark);
  font-weight: 800;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 170px 170px;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 44px;
  padding: 0 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.search-field input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
}

select,
input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
}

select,
input {
  min-height: 44px;
  padding: 0 0.85rem;
}

textarea {
  padding: 0.85rem;
  resize: vertical;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
}

caption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

th,
td {
  padding: 0.95rem 0.7rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

td {
  font-size: 0.94rem;
}

.case-title {
  display: grid;
  gap: 0.16rem;
}

.case-title strong {
  line-height: 1.25;
}

.case-title span,
.meta-text {
  color: var(--muted);
  font-size: 0.82rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  color: var(--ink);
  background: var(--mist);
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.status-pill[data-stage="補正中"] {
  color: #763f15;
  background: #ffe4bd;
}

.status-pill[data-stage="已送官方"],
.status-pill[data-stage="審查中"] {
  color: #0a5b68;
  background: #cfedf1;
}

.status-pill[data-stage="公告/註冊"],
.status-pill[data-stage="結案"] {
  color: #1e6339;
  background: #d9f0df;
}

.progress-shell {
  width: 120px;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--mist);
}

.progress-bar {
  height: 100%;
  width: var(--progress);
  background: var(--teal);
}

.row-actions {
  display: flex;
  gap: 0.45rem;
}

.mini-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  font-weight: 800;
}

.mini-button {
  min-height: 36px;
  padding: 0.4rem 0.65rem;
}

.mini-button.danger {
  color: #9a3d2d;
}

.side-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.task-list {
  display: grid;
  gap: 0.75rem;
}

.task-item {
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

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

.task-item span {
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.84rem;
}

.handoff-box {
  margin-top: auto;
  padding: 1rem;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--white);
}

.handoff-box span {
  color: #d8b565;
  font-size: 0.8rem;
  font-weight: 800;
}

.handoff-box strong {
  display: block;
  margin-top: 0.3rem;
  line-height: 1.35;
}

.handoff-box p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.72);
}

.version-section {
  background: #eef4f1;
}

.version-heading {
  align-items: center;
}

.version-copy {
  max-width: 680px;
  margin: 0.75rem 0 0;
  color: var(--muted);
}

.version-current {
  min-width: 180px;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 10px 34px rgba(22, 33, 31, 0.06);
}

.version-current span,
.version-current small {
  display: block;
  color: var(--muted);
  font-size: 0.84rem;
}

.version-current strong {
  display: block;
  margin: 0.25rem 0;
  color: var(--teal-dark);
  font-size: 2rem;
  line-height: 1;
}

.visibility-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.visibility-grid article,
.release-notes {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 10px 34px rgba(22, 33, 31, 0.06);
}

.visibility-grid strong {
  display: block;
  margin-top: 0.6rem;
  line-height: 1.3;
}

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

.visibility-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0.18rem 0.58rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 900;
  white-space: nowrap;
}

.visibility-pill.public {
  color: #155f3a;
  background: #d9f0df;
}

.visibility-pill.internal {
  color: #7b4817;
  background: #ffe4bd;
}

.version-table-wrap {
  overflow-x: auto;
  margin-top: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 10px 34px rgba(22, 33, 31, 0.06);
}

.version-table {
  min-width: 860px;
}

.version-table th,
.version-table td {
  padding: 0.95rem;
}

.release-notes {
  margin-top: 1rem;
}

.release-notes h3 {
  margin: 0 0 0.75rem;
}

.release-notes ul {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
}

.plan-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.plan-card {
  min-height: 310px;
}

.plan-card.featured {
  border-color: rgba(20, 122, 115, 0.5);
  box-shadow: var(--shadow);
}

.plan-card ul,
.contact-points {
  display: grid;
  gap: 0.7rem;
  margin: 1.2rem 0 0;
  padding: 0;
  list-style: none;
}

.plan-card li,
.contact-points li {
  display: flex;
  align-items: start;
  gap: 0.5rem;
}

.plan-card li::before {
  content: "";
  width: 8px;
  height: 8px;
  margin-top: 0.58rem;
  border-radius: 999px;
  background: var(--coral);
  flex: 0 0 auto;
}

.contact-section {
  background: var(--mist);
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 480px);
  gap: clamp(1.4rem, 5vw, 4rem);
  align-items: start;
}

.contact-points .icon {
  margin-top: 0.25rem;
  color: var(--teal);
}

.lead-form {
  display: grid;
  gap: 1rem;
  padding: 1.2rem;
}

.lead-form label,
.dialog-grid label {
  display: grid;
  gap: 0.35rem;
  color: var(--graphite);
  font-weight: 800;
}

.form-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.3rem clamp(1rem, 4vw, 3.5rem);
  color: rgba(255, 255, 255, 0.72);
  background: var(--ink);
  font-size: 0.92rem;
}

.case-dialog {
  width: min(780px, calc(100% - 2rem));
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.case-dialog::backdrop {
  background: rgba(8, 15, 14, 0.58);
}

.dialog-shell {
  padding: 1.2rem;
}

.dialog-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.icon-button {
  width: 42px;
  height: 42px;
  font-size: 1.8rem;
  line-height: 1;
}

.dialog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.dialog-grid .full {
  grid-column: 1 / -1;
}

.dialog-actions {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.2rem;
}

.toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 40;
  max-width: min(360px, calc(100% - 2rem));
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  color: var(--white);
  background: var(--ink);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 940px) {
  .site-header {
    flex-wrap: wrap;
  }

  .site-nav {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-top: 0.2rem;
  }

  .hero {
    min-height: auto;
  }

  .hero-inner {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }

  .hero h1 {
    font-size: 3.35rem;
  }

  .split h1,
  .split h2,
  .section-heading h2,
  .contact-layout h2,
  .dialog-head h2 {
    font-size: 2.35rem;
  }

  .hero-overlay {
    background: linear-gradient(90deg, rgba(11, 23, 20, 0.9) 0%, rgba(11, 23, 20, 0.72) 58%, rgba(11, 23, 20, 0.36) 100%);
  }

  .split,
  .firm-grid,
  .visibility-grid,
  .position-grid,
  .service-grid,
  .strategy-grid,
  .backend-status,
  .backend-grid,
  .backend-tool-grid,
  .ai-layout,
  .ai-console,
  .payment-grid,
  .timeline,
  .ops-layout,
  .plan-grid,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .toolbar {
    grid-template-columns: 1fr;
  }

  .firm-card {
    grid-template-columns: 1fr;
    align-items: start;
  }
}

@media (max-width: 620px) {
  .site-header {
    min-height: auto;
    gap: 0.8rem;
    padding: 0.7rem 1rem 0.9rem;
  }

  .brand {
    min-width: 0;
    gap: 0.75rem;
  }

  .brand-logo {
    width: 64px;
    height: 38px;
  }

  .brand strong {
    font-size: 0.9rem;
    line-height: 1.15;
  }

  .brand small {
    display: none;
  }

  .header-cta {
    display: none;
  }

  .site-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem 0.85rem;
    align-items: stretch;
    overflow: visible;
    padding-top: 0;
  }

  .site-nav a {
    min-width: 0;
    padding: 0.6rem 0.7rem;
    border: 1px solid rgba(215, 222, 216, 0.9);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.72);
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
  }

  .hero-inner {
    width: min(1120px, calc(100% - 1.2rem));
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }

  .hero h1 {
    font-size: 1.86rem;
    line-height: 1.18;
  }

  .hero h1 span {
    display: block;
  }

  .eyebrow {
    margin-bottom: 0.9rem;
    font-size: 0.72rem;
  }

  .hero-copy {
    margin-top: 1rem;
    font-size: 0.96rem;
    line-height: 1.75;
    word-break: normal;
    overflow-wrap: anywhere;
  }

  .split h2,
  .section-heading h2,
  .contact-layout h2,
  .dialog-head h2 {
    font-size: 1.75rem;
    line-height: 1.22;
  }

  .hero-actions {
    display: grid;
    gap: 0.75rem;
    margin-top: 1.65rem;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
    gap: 0.65rem;
    margin-top: 1.6rem;
  }

  .hero-metrics div {
    padding: 0.8rem 0.9rem;
  }

  .hero-metrics dt {
    font-size: 1.3rem;
  }

  .hero-metrics dd {
    font-size: 0.82rem;
  }

  .section-inner {
    width: min(1120px, calc(100% - 1.2rem));
  }

  .section {
    padding: 2.5rem 0;
  }

  .section-heading,
  .system-heading,
  .dialog-actions,
  .site-footer {
    display: grid;
    gap: 0.75rem;
  }

  .section-heading {
    margin-bottom: 1.15rem;
  }

  .section-kicker {
    margin-bottom: 0.55rem;
    font-size: 0.72rem;
  }

  .positioning-lead,
  .backend-lead,
  .contact-copy,
  .service-card p,
  .plan-card p,
  .timeline p,
  .handoff-box p {
    font-size: 0.95rem;
    line-height: 1.7;
  }

  .system-actions {
    justify-content: stretch;
  }

  .payment-notice {
    display: grid;
  }

  .backend-workbench-head {
    display: grid;
  }

  .system-actions .button,
  .dialog-actions .button,
  .ai-chat-form .button,
  .ai-actions .button,
  .payment-notice .button {
    width: 100%;
  }

  .stat-grid {
    grid-template-columns: 1fr;
  }

  .release-console {
    padding: 1.15rem;
  }

  .release-console-head,
  .release-form {
    display: grid;
    grid-template-columns: 1fr;
  }

  .release-form .full {
    grid-column: auto;
  }

  .admin-framework {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-current-release {
    grid-column: 1 / -1;
  }

  .ai-chat-form {
    grid-template-columns: 1fr;
  }

  .backend-flow ol {
    grid-template-columns: 1fr;
  }

  .backend-search-form {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1.1rem;
  }

  .official-review-head,
  .browser-review-form {
    display: grid;
    grid-template-columns: 1fr;
  }

  .browser-review-form .full {
    grid-column: auto;
  }

  .official-review-head .button {
    width: 100%;
  }

  .backend-task-table {
    display: none;
  }

  .backend-task-cards {
    display: grid;
  }

  .backend-search-form label {
    gap: 0.45rem;
    font-size: 0.98rem;
  }

  .backend-search-form input,
  .backend-search-form textarea,
  .lead-form input,
  .lead-form textarea,
  .lead-form select {
    padding: 0.9rem 1rem;
    font-size: 0.95rem;
    line-height: 1.45;
  }

  .backend-report-panel,
  .lead-form,
  .service-card,
  .plan-card,
  .stat-card,
  .ops-panel {
    padding: 1.15rem;
  }

  .backend-task-card {
    padding: 1rem 0.95rem;
  }

  .backend-task-card .row-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.55rem;
    margin-top: 1rem;
  }

  .backend-task-card .mini-button {
    width: 100%;
    justify-content: center;
  }

  .ai-message {
    max-width: 100%;
  }

  .dialog-grid {
    grid-template-columns: 1fr;
  }
}
