@font-face {
  font-family: "CantoMore";
  src: url("https://cdn.cantomore.com/font/v1.0.0/cantomore.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-palette-values --cantomore-dark {
  font-family: "CantoMore";
  base-palette: 0;
  override-colors: 0 #75B9FFFF, 1 #D6A7FFFF, 2 #75D99AFF,
    3 #DDB47AFF, 4 #FF8B7AFF, 5 #FFFDF740;
}

:root {
  color-scheme: light;
  --ink: #102b43;
  --muted: #627789;
  --navy: #062942;
  --navy-soft: #103b59;
  --teal: #62cbc7;
  --teal-dark: #247570;
  --blue: #0966bd;
  --cream: #f7f3ea;
  --paper: #f3f8fa;
  --surface: #ffffff;
  --line: #d8e4ea;
  --accent: #cf5139;
  --brand-ink: #173f3b;
  --brand-muted: #a7445c;
  --code: #071d2d;
  --code-line: #1c425c;
  --shadow: 0 22px 64px #082a4514;
  --radius: 22px;
  --font-ui: Inter, ui-sans-serif, system-ui, -apple-system, "Noto Sans CJK HK",
    "PingFang HK", "Microsoft JhengHei", sans-serif;
  --font-cantomore: "CantoMore", "Noto Serif CJK TC", "Songti TC", serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 7% 12%, #dff3f4 0, transparent 28rem),
    radial-gradient(circle at 94% 40%, #f4e7dd 0, transparent 25rem),
    var(--paper);
  font-family: var(--font-ui);
  line-height: 1.65;
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible {
  border-radius: 7px;
  outline: 3px solid #50bcb966;
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: .75rem;
  left: .75rem;
  padding: .65rem .9rem;
  color: #fff;
  background: var(--navy);
  border-radius: 9px;
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.page-shell,
.hero__inner {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

.hero {
  color: var(--ink);
  background:
    linear-gradient(120deg, #fff7 0 40%, transparent 40%),
    var(--cream);
  border-bottom: 4px solid var(--teal);
}

.hero__inner {
  padding: 1.35rem 0 2.2rem;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: center;
  padding-bottom: 1.3rem;
  border-bottom: 1px solid #c9d8d1;
}

.brand-line {
  width: max-content;
  display: inline-flex;
  gap: .42rem;
  align-items: center;
  color: var(--brand-ink);
  text-decoration: none;
}

.brand-wordmark {
  ruby-align: center;
  ruby-position: over;
  white-space: nowrap;
}

.brand-symbol {
  width: auto;
  height: 2.45rem;
  display: block;
  object-fit: contain;
}

.brand-name-zh {
  color: var(--brand-muted);
  font-family: "Noto Serif HK", "Noto Serif TC", "Noto Serif CJK TC", serif;
  font-size: 1.55rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: .1rem;
}

.brand-name-en {
  color: var(--brand-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: .78rem;
  font-weight: 800;
  font-variant-caps: small-caps;
  line-height: 1;
  letter-spacing: .08em;
}

.topbar__links {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  color: #405d58;
  font-size: .83rem;
  font-weight: 750;
}

.topbar__links a {
  text-decoration: none;
}

.topbar__links a:hover {
  color: var(--blue);
}

.hero__layout {
  padding: clamp(2.6rem, 7vw, 5.6rem) 0 2.6rem;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, .88fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.eyebrow {
  margin: 0 0 .55rem;
  color: var(--teal-dark);
  font-size: .74rem;
  font-weight: 850;
  letter-spacing: .16em;
}

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

h1,
h2,
h3 {
  line-height: 1.18;
  letter-spacing: -.025em;
}

.hero h1 {
  margin: 0 0 1.2rem;
}

.hero-title__product {
  display: block;
  margin-bottom: .6rem;
  color: var(--brand-ink);
  font-size: clamp(1.2rem, 2.3vw, 1.75rem);
  font-weight: 780;
  letter-spacing: -.02em;
}

.hero-title__promise {
  display: block;
  color: var(--navy);
  font-family: var(--font-cantomore);
  font-size: clamp(3rem, 7vw, 5.7rem);
  font-weight: 400;
  font-synthesis: none;
  font-feature-settings: "rclt" 1;
  line-height: 1.34;
}

.lede {
  max-width: 680px;
  margin: 0 0 1.5rem;
  color: #3d5b67;
  font-size: clamp(.98rem, 1.5vw, 1.08rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

.button {
  min-height: 46px;
  padding: .7rem 1.15rem;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: .45rem;
  border: 1px solid transparent;
  border-radius: 11px;
  font-weight: 780;
  line-height: 1;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.button small {
  font-size: .69rem;
  font-weight: 650;
  opacity: .72;
}

.button:hover {
  transform: translateY(-2px);
}

.button--primary {
  color: #fff;
  background: var(--navy);
  box-shadow: 0 12px 24px #06294222;
}

.button--primary:hover {
  background: #0b3d5e;
}

.button--secondary {
  color: var(--navy);
  background: #ffffff80;
  border-color: #8aa39e;
}

.button--secondary:hover {
  background: #fff;
}

.hero-preview {
  min-width: 0;
  padding: 1.25rem 1.4rem 1.35rem;
  overflow: hidden;
  color: #fffdf7;
  background:
    radial-gradient(circle at 100% 0, #39729055, transparent 55%),
    var(--navy);
  border: 1px solid #28516b;
  border-radius: var(--radius);
  box-shadow: 0 24px 58px #0629422d;
}

.hero-preview__label {
  margin-bottom: .8rem;
  color: #8de1dd;
  font-family: var(--font-ui);
  font-size: .68rem;
  font-weight: 850;
  letter-spacing: .16em;
}

.hero-preview__sample {
  margin-bottom: .55rem;
  font-family: var(--font-cantomore);
  font-size: clamp(2.15rem, 5vw, 3.85rem);
  font-synthesis: none;
  font-feature-settings: "rclt" 1;
  line-height: 1.7;
}

.hero-preview__note {
  margin-bottom: 0;
  color: #bed2df;
  font-family: var(--font-ui);
  font-size: .8rem;
}

.cantomore-dark {
  font-palette: --cantomore-dark;
}

.release-stats {
  margin: 0;
  display: flex;
  overflow: hidden;
  background: #ffffff9c;
  border: 1px solid #c9d8d1;
  border-radius: 15px;
  box-shadow: 0 10px 28px #082a450c;
}

.release-stats div {
  min-width: 0;
  flex: 1 1 0;
  padding: .85rem 1rem;
  border-right: 1px solid #d6e1dc;
}

.release-stats div:last-child {
  border-right: 0;
}

.release-stats dt {
  color: var(--muted);
  font-size: .7rem;
  font-weight: 700;
}

.release-stats dd {
  margin: .04rem 0 0;
  color: var(--navy);
  font-size: clamp(.96rem, 2vw, 1.22rem);
  font-weight: 820;
  font-variant-numeric: tabular-nums;
}

.showcase {
  padding: clamp(3.6rem, 8vw, 6.2rem) 0;
  display: grid;
  grid-template-columns: minmax(0, .78fr) minmax(420px, 1.22fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.section-copy h2,
.section-heading h2,
.dictionary-feature h2,
.license h2 {
  margin-bottom: 1rem;
  font-size: clamp(1.8rem, 3.6vw, 2.65rem);
}

.section-copy > p:not(.eyebrow),
.section-heading > p:not(.eyebrow) {
  color: var(--muted);
}

.feature-list {
  margin: 1.6rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .7rem;
  list-style: none;
}

.feature-list li {
  padding: .78rem .9rem;
  display: flex;
  flex-direction: column;
  gap: .08rem;
  background: #ffffffa6;
  border: 1px solid var(--line);
  border-radius: 11px;
}

.feature-list strong {
  color: var(--navy);
  font-size: .9rem;
}

.feature-list span {
  color: var(--muted);
  font-size: .79rem;
}

.showcase-samples {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.type-sample {
  min-width: 0;
  padding: 1.45rem 1.6rem 1.55rem;
  overflow: hidden;
  color: #3a0000;
  background: #d0f0ff;
  border: 1px solid #abd9e8;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-family: var(--font-cantomore);
  font-size: clamp(1.75rem, 4vw, 3.25rem);
  font-synthesis: none;
  font-feature-settings: "rclt" 1;
  line-height: 1.7;
}

.type-sample p {
  margin: 0;
  color: inherit;
}

.sample-label {
  display: block;
  margin-bottom: .25rem;
  color: #4d7585;
  font-family: var(--font-ui);
  font-size: .65rem;
  font-weight: 850;
  letter-spacing: .12em;
}

.type-sample--dark {
  color: #fffdf7;
  background:
    linear-gradient(120deg, #0b3553, #102d49);
  border-color: #28516b;
  box-shadow: 0 18px 42px #102d4930;
}

.type-sample--dark .sample-label {
  color: #a7c6d8;
}

.dictionary-feature {
  margin-bottom: clamp(3.6rem, 8vw, 6.2rem);
  padding: clamp(2rem, 5vw, 3.4rem);
  display: grid;
  grid-template-columns: minmax(260px, .72fr) minmax(0, 1.28fr);
  gap: clamp(1.8rem, 5vw, 4rem);
  color: #f7fbfc;
  background:
    radial-gradient(circle at 0 100%, #1d6b6a66, transparent 40%),
    linear-gradient(135deg, #062942, #103b59);
  border: 1px solid #214b66;
  border-radius: calc(var(--radius) + 4px);
  box-shadow: 0 24px 70px #06294225;
}

.dictionary-feature .eyebrow {
  color: #8de1dd;
}

.dictionary-feature h2 {
  margin: 0;
  color: #fff;
}

.dictionary-feature__body p {
  color: #d3e2e9;
}

.dictionary-feature__body a:not(.button) {
  color: #fff;
  font-weight: 800;
  text-decoration-color: var(--teal);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.button--dictionary {
  margin-top: .35rem;
  color: var(--navy);
  background: var(--teal);
  box-shadow: 0 12px 26px #0003;
}

.button--dictionary:hover {
  background: #85ddd9;
}

.usage {
  padding-bottom: clamp(3.6rem, 8vw, 6.2rem);
}

.section-heading {
  max-width: 720px;
  margin-bottom: 2rem;
}

.guide-steps {
  max-width: 900px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.guide-steps article {
  min-width: 0;
  padding: clamp(1.35rem, 3vw, 2.15rem);
  display: flex;
  gap: 1.2rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 17px;
  box-shadow: 0 13px 36px #082a450d;
}

.number {
  width: 3rem;
  height: 3rem;
  flex: 0 0 3rem;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--accent);
  border-radius: 12px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.step-content {
  min-width: 0;
  flex: 1;
}

.step-content h3 {
  margin: .2rem 0 .65rem;
  font-size: clamp(1.3rem, 3vw, 1.72rem);
}

.step-content > p {
  color: var(--muted);
  font-size: .95rem;
}

code {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: .88em;
}

.step-content > p code {
  padding: .12rem .32rem;
  color: #184c6e;
  background: #e8f3f8;
  border-radius: 5px;
}

.code-window {
  max-width: 100%;
  margin: 1.15rem 0;
  overflow: hidden;
  color: #d8e9f2;
  background: var(--code);
  border: 1px solid var(--code-line);
  border-radius: 13px;
  box-shadow: 0 16px 36px #071d2d26;
}

.code-window__title {
  min-height: 2.35rem;
  padding: .55rem .8rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  color: #99b7c9;
  background: #0d293d;
  border-bottom: 1px solid var(--code-line);
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: .1em;
}

.code-window__title span:first-child {
  color: #7ee0dc;
}

pre {
  max-width: 100%;
  margin: 0;
  padding: 1.05rem;
  overflow-x: auto;
  color: #d8e9f2;
  line-height: 1.65;
  tab-size: 2;
}

pre code {
  font-size: .8rem;
}

.syntax-tag,
.syntax-rule {
  color: #7dd3fc;
}

.syntax-attr,
.syntax-property {
  color: #d6a7ff;
}

.syntax-string {
  color: #86efac;
}

.syntax-value {
  color: #f6c979;
}

.syntax-selector {
  color: #ff9b8e;
}

.syntax-function {
  color: #77d8c6;
}

.text-link {
  display: inline-block;
  color: var(--blue);
  font-weight: 780;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.license {
  margin-bottom: 3.6rem;
  padding: clamp(2rem, 5vw, 3.2rem);
  display: grid;
  grid-template-columns: minmax(260px, .7fr) minmax(0, 1.3fr);
  gap: clamp(1.5rem, 5vw, 3.5rem);
  background: #e6eee3;
  border: 1px solid #cfddcb;
  border-radius: calc(var(--radius) + 2px);
}

.license h2 {
  margin-bottom: 0;
}

.license p {
  max-width: 760px;
}

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

footer {
  padding: 1.5rem 0 2.8rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: .82rem;
}

footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
}

footer a {
  text-underline-offset: 3px;
}

@media (max-width: 900px) {
  .hero__layout,
  .showcase,
  .dictionary-feature,
  .license {
    grid-template-columns: 1fr;
  }

  .hero-preview {
    max-width: 680px;
  }

  .showcase {
    gap: 2rem;
  }

  .dictionary-feature,
  .license {
    gap: 1.2rem;
  }
}

@media (max-width: 720px) {
  .page-shell,
  .hero__inner {
    width: min(100% - 1.5rem, 1120px);
  }

  .hero__inner {
    padding-top: 1rem;
  }

  .topbar {
    align-items: flex-start;
  }

  .brand-symbol {
    height: 2rem;
  }

  .brand-name-zh {
    font-size: 1.38rem;
  }

  .brand-name-en {
    font-size: .71rem;
  }

  .topbar__links {
    max-width: 12rem;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: .45rem .8rem;
    text-align: right;
    font-size: .76rem;
  }

  .hero__layout {
    padding: 2.2rem 0 1.7rem;
    gap: 1.5rem;
  }

  .hero-title__promise {
    font-size: clamp(2.65rem, 12vw, 4.8rem);
  }

  .release-stats {
    flex-wrap: wrap;
  }

  .release-stats div {
    flex: 1 1 33.333%;
    border-bottom: 1px solid #d6e1dc;
  }

  .release-stats div:nth-child(3) {
    border-right: 0;
  }

  .release-stats div:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .showcase {
    padding: 3.8rem 0;
  }

  .dictionary-feature {
    margin-bottom: 3.8rem;
  }

  .usage {
    padding-bottom: 3.8rem;
  }

  .guide-steps article {
    gap: .9rem;
  }

  .number {
    width: 2.65rem;
    height: 2.65rem;
    flex-basis: 2.65rem;
  }

  footer {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .page-shell,
  .hero__inner {
    width: min(100% - 1rem, 1120px);
  }

  .topbar {
    gap: .75rem;
  }

  .topbar__links a:nth-child(-n + 2) {
    display: none;
  }

  .hero-title__product {
    font-size: 1.08rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .hero-preview,
  .type-sample {
    padding: 1.1rem;
  }

  .hero-preview__sample,
  .type-sample {
    line-height: 1.58;
  }

  .release-stats div {
    flex-basis: 50%;
  }

  .release-stats div:nth-child(2n) {
    border-right: 0;
  }

  .release-stats div:nth-child(3) {
    border-right: 1px solid #d6e1dc;
  }

  .release-stats div:nth-last-child(2) {
    border-bottom: 1px solid #d6e1dc;
  }

  .release-stats div:last-child {
    flex-basis: 100%;
    border-top: 0;
    border-bottom: 0;
  }

  .dictionary-feature,
  .license {
    padding: 1.4rem;
  }

  .guide-steps article {
    padding: 1.2rem;
    flex-direction: column;
  }

  .number {
    width: auto;
    height: auto;
    align-self: flex-start;
    flex-basis: auto;
    padding: .3rem .55rem;
    border-radius: 7px;
    font-size: .75rem;
  }

  pre {
    padding: .9rem;
  }

  pre code {
    font-size: .73rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .button {
    transition: none;
  }

  .button:hover {
    transform: none;
  }
}
