/* Homepage visual styles adapted from the authorized CoreCode reference. */
@font-face {
  font-family: "Lora";
  src: url("./lora-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --brand-symbol: url("./mark.svg?v=2");
  --bg: #faf9f5; --fg: #141413; --muted: #5e5d59; --faint: #8a8780;
  --line: rgb(31 30 29 / 0.12); --line-soft: rgb(31 30 29 / 0.07);
  --card: #ffffff; --code: #f5f4ed; --code-head: #efede4; --hover: rgb(31 30 29 / 0.05); --pill: #f0eee6;
  --accent: #b5532f; --accent-ring: #c96442;
  --accent-soft: color-mix(in oklab, #c96442 11%, var(--bg));
  --tip: #4d7a3a; --tip-soft: color-mix(in oklab, #4d7a3a 10%, var(--bg));
  --warn: #8a5a12; --warn-soft: color-mix(in oklab, #c58a1c 13%, var(--bg));
  /* API reference: method badges and highlighted code */
  --get: #2f7d4f; --post: #2f64ad;
  --hl-k: #a8432a; --hl-s: #3f7a3b; --hl-n: #94600f; --hl-p: #2f5f9e; --hl-f: #7b4fa0;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 4px 14px rgb(0 0 0 / 0.06);
  --shadow-lg: 0 4px 8px rgb(0 0 0 / 0.06), 0 16px 40px -4px rgb(0 0 0 / 0.14);
  --serif: "Lora", "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  /* the header is its bar, plus the tab bar on docs pages (site-seo.mjs marks
     their <html> data-docs); sticky offsets read --header-h */
  --bar-h: 60px; --tabs-h: 0px;
  --header-h: calc(var(--bar-h) + var(--tabs-h));
  color-scheme: light;
}
:root.dark {
  --bg: #262624; --fg: #faf9f5; --muted: #a6a39b; --faint: #85827b;
  --line: rgb(250 249 245 / 0.1); --line-soft: rgb(250 249 245 / 0.06);
  --card: #30302e; --code: #1f1e1d; --code-head: #2a2927; --hover: rgb(250 249 245 / 0.06); --pill: #2d2c2a;
  --accent: #e08264; --accent-ring: #d97757;
  --accent-soft: color-mix(in oklab, #d97757 16%, var(--bg));
  --tip: #8fb07a; --tip-soft: color-mix(in oklab, #8fb07a 13%, var(--bg));
  --warn: #e0a44a; --warn-soft: color-mix(in oklab, #e0a44a 13%, var(--bg));
  --get: #7cc597; --post: #8db4f0;
  --hl-k: #e8906f; --hl-s: #a3cf8a; --hl-n: #e5b062; --hl-p: #8fb6ec; --hl-f: #c7a6ea;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.2), 0 4px 14px rgb(0 0 0 / 0.25);
  --shadow-lg: 0 4px 8px rgb(0 0 0 / 0.3), 0 16px 40px -4px rgb(0 0 0 / 0.45);
  color-scheme: dark;
}
.dark body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 20px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15.5px/1.8 var(--sans); overflow-x: hidden; }
::selection { background: color-mix(in oklab, var(--accent) 24%, transparent); }
a { color: var(--accent); text-decoration: none; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
/* ---------- header ---------- */
header { position: sticky; top: 0; z-index: 30; height: var(--header-h); background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line-soft); }
/* the header's 1px bottom border sits inside --header-h */
.bar { max-width: 1320px; height: calc(var(--bar-h) - 1px); margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--fg); font: 600 17px/1 var(--serif); letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
  border-radius: 8px;
  background: var(--accent-soft);
}
.brand-mark::before {
  width: 22px;
  height: 22px;
  background: var(--accent);
  mask: var(--brand-symbol) center / contain no-repeat;
  content: "";
}
.brand b { color: var(--accent); font-weight: 600; }
.brand .tag { font: 500 12px/1 var(--sans); color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 4px 8px; margin-left: 2px; letter-spacing: 0; }
.bar nav { margin-left: auto; display: flex; align-items: center; gap: 4px; font-size: 14px; }
.bar nav a { color: var(--muted); padding: 6px 10px; border-radius: 8px; }
.bar nav a:hover { color: var(--fg); background: var(--hover); text-decoration: none; }
.bar nav a[aria-current="page"] { color: var(--fg); }
.bar nav a.cta { color: #fff; background: var(--accent); margin-left: 6px; font-weight: 550; }
.bar nav a.cta:hover { background: color-mix(in oklab, var(--accent) 88%, black); color: #fff; }
.dark .bar nav a.cta, .dark .bar nav a.cta:hover { color: #141413; }
.bar nav .sep { width: 1px; height: 16px; margin: 0 6px; background: var(--line); }

.theme { flex: none; position: relative; display: inline-grid; place-items: center; width: 36px; height: 36px; margin-left: 2px; border: 0; border-radius: 8px; background: transparent; color: var(--fg); cursor: pointer; }
.theme:hover, .theme[aria-expanded="true"] { background: var(--hover); }
.theme svg { grid-area: 1 / 1; width: 19px; height: 19px; transition: transform 300ms, opacity 300ms; }
.theme .moon, .dark .theme .sun { opacity: 0; transform: rotate(90deg) scale(0); }
.dark .theme .moon { opacity: 1; transform: none; }
.theme-menu { position: fixed; z-index: 50; min-width: 128px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); box-shadow: var(--shadow-lg); }
.theme-menu button { display: flex; align-items: center; gap: 16px; width: 100%; padding: 6px 8px; border: 0; border-radius: 6px; background: none; color: var(--fg); font: 14px/1.4 var(--sans); text-align: left; cursor: pointer; }
.theme-menu button:hover, .theme-menu button:focus-visible { background: var(--hover); outline: none; }
.theme-menu svg { width: 14px; height: 14px; margin-left: auto; }
.theme-menu [aria-checked="false"] svg { visibility: hidden; }
footer { border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 13px; }
footer .bar { height: auto; min-height: 64px; padding-top: 16px; padding-bottom: 16px; justify-content: space-between; flex-wrap: wrap; }
footer .bar span:last-child { display: flex; flex-wrap: wrap; gap: 4px 16px; }
footer a { color: var(--muted); }
footer a:hover { color: var(--fg); }

main.home { max-width: none; padding: 0; }
.cc { display: flow-root; }
.cc :where(h1, h2, h3, p, ul, ol, figure, pre) { margin: 0; padding: 0; }
.cc :where(h1, h2, h3) { font: inherit; color: inherit; letter-spacing: inherit; scroll-margin-top: 0; }
.cc :where(code) { background: none; border: 0; padding: 0; font-size: inherit; border-radius: 0; }
.cc :where(ul) { list-style: none; }
.cc :where(img, svg) { display: block; max-width: 100%; }
header { transition: background-color .35s, border-color .35s; }
header .bar { transition: max-width .55s cubic-bezier(.22, 1, .36, 1), height .45s cubic-bezier(.22, 1, .36, 1), margin-top .45s cubic-bezier(.22, 1, .36, 1), padding .45s, border-radius .45s, background-color .35s, box-shadow .35s; }
header .bar > * { flex-shrink: 0; }
header.pill { background-color: transparent; border-bottom-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
header.pill .bar { width: max-content; max-width: calc(100% - 20px); height: 48px; margin-top: 6px; padding: 0 6px 0 14px; border-radius: 999px;
    background-color: color-mix(in srgb, var(--bg) 78%, transparent); -webkit-backdrop-filter: saturate(1.5) blur(16px); backdrop-filter: saturate(1.5) blur(16px);
    box-shadow: 0 0 0 1px var(--line), 0 12px 32px -12px rgb(0 0 0 / .28); }
header.pill .bar nav a.cta { border-radius: 999px; }
/* On a phone the docs reach these links through the sidebar's drawer; the home
     page has none, so they take a second row under the bar. The header keeps
     its height when the bar becomes the pill, so the page does not move. */
@media (max-width: 900px) {
    header { height: calc(var(--header-h) + 38px); }
    header .bar { flex-wrap: wrap; align-content: flex-start; height: auto; padding-top: 12px; row-gap: 8px; }
    header .bar nav { display: contents; }
    header .bar .theme-wrap { margin-left: auto; }
    header .bar::after { content: ""; order: 1; flex-basis: 100%; height: 0; }
    header .bar nav > a:not(.cta) { display: block; order: 2; padding: 5px 10px; }
    header .bar nav > a[aria-current="page"] { display: none; }
    header .bar nav > a[aria-current="page"] + a { margin-left: -10px; }
    header.pill { pointer-events: none; }
    header.pill .bar { flex-wrap: nowrap; align-content: center; height: 48px; padding-top: 0; pointer-events: auto; }
    header.pill .bar::after, header.pill .bar nav > a:not(.cta) { display: none; }
}
.cc {
    /* CDS surfaces and clay accent (open-claude-ui cds-theme.css) */
    --s0: #f9f9f7; --s1: #fcfcfb; --s2: #ffffff;
    --t1: #151515; --t2: #525252; --t3: #8a8a8a;
    --line: hsla(0, 0%, 8%, .10); --line-strong: hsla(0, 0%, 8%, .20); --ghost: hsla(0, 0%, 8%, .05);
    --clay: #d97757; --brand: #c6613f; --clay-hover: #cc5a36; --clay-soft: #fbf3ef; --clay-ink: #ae461c;
    --ok: #2f7d4f; --ok-soft: #e7f2ea; --warn: #b26b00;
    /* the report card and the diff are terminal printouts in both themes */
    --ink: #1d1c1a; --ink-line: hsla(40, 10%, 90%, .10); --ink-t1: #ecebe6; --ink-t2: #b9b5ac; --ink-t3: #8f8b83; --ink-ok: #86cf9e; --ink-bad: #f0907f; --ink-clay: #e8906f;
    /* the signature mark, the glow behind cards, and outages */
    --sig-a: #dc7a52; --sig-b: #9a3c18; --sig-glint: rgba(255, 246, 238, .95); --sig-hi: #6b2208; --sig-bad: #c8352b;
    --bloom: hsla(18, 85%, 62%, .16); --card-glow: hsla(18, 75%, 58%, .09); --glow: hsla(18, 80%, 60%, .13);
    --shadow-sm: 0 1px 2px 0 rgba(0,0,0,.05), 0 2px 8px 0 rgba(0,0,0,.08);
    --shadow-lg: 0 4px 8px 0 rgba(0,0,0,.06), 0 18px 40px -6px rgba(0,0,0,.18);
    --ease-enter: cubic-bezier(.22, 1, .36, 1);
    --ease-swift: cubic-bezier(.16, 1, .3, 1);
    --serif: "Tiempos Headline", "Lora", ui-serif, Georgia, "Songti SC", "Noto Serif SC", "Source Han Serif SC", "PingFang SC", "Microsoft YaHei", serif;
    --sans: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    background: var(--s1); color: var(--t1); font-family: var(--sans); line-height: 1.6;
    -webkit-font-smoothing: antialiased; overflow-x: clip;
}
.dark .cc {
    --s0: #0b0b0b; --s1: #151515; --s2: #1a1a19;
    --t1: #f5f5f5; --t2: #a3a3a3; --t3: #737373;
    --line: hsla(0, 0%, 100%, .09); --line-strong: hsla(0, 0%, 100%, .18); --ghost: hsla(0, 0%, 100%, .05);
    --clay-hover: #e08264; --clay-soft: #2d1006; --clay-ink: #f09978;
    --ok: #86cf9e; --ok-soft: #12291b; --warn: #f0b44c;
    --ink: #0f0f0e; --ink-line: hsla(40, 10%, 90%, .09);
    --sig-a: #ffb38c; --sig-b: #d9653d; --sig-glint: rgba(255, 236, 222, 1); --sig-hi: #fff4ec; --sig-bad: #ff6f5e;
    --bloom: hsla(18, 90%, 60%, .22); --card-glow: hsla(18, 85%, 62%, .10); --glow: hsla(18, 85%, 58%, .20);
    --shadow-sm: 0 1px 2px 0 rgba(0,0,0,.4), 0 2px 8px 0 rgba(0,0,0,.4);
    --shadow-lg: 0 4px 8px 0 rgba(0,0,0,.5), 0 18px 40px -6px rgba(0,0,0,.55);
}
.cc *, .cc *::before, .cc *::after { box-sizing: border-box; }
.cc a { color: inherit; text-decoration: none; }
.cc a:focus-visible, .cc button:focus-visible { outline: 2px solid var(--clay); outline-offset: 3px; border-radius: 6px; }
.cc-in { max-width: 1120px; margin: 0 auto; padding: 0 24px; counter-reset: cc-sec; }
.cc ::selection { background: color-mix(in srgb, var(--clay) 28%, transparent); }
.cc-eyebrow { font: 500 12px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--clay-ink); }
.cc-serif { font-family: var(--serif); font-weight: 500; letter-spacing: -.02em; }
.cc .arr { display: inline-block; transition: transform .2s var(--ease-swift); }

/* enter motion: every animation ends */
@keyframes cc-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.cc-r { animation: cc-rise .7s var(--ease-enter) both; }
.cc-r2 { animation-delay: .06s; } .cc-r3 { animation-delay: .12s; } .cc-r4 { animation-delay: .18s; } .cc-r5 { animation-delay: .24s; } .cc-r6 { animation-delay: .3s; }
@media (prefers-reduced-motion: reduce) { .cc *, .cc *::before { animation: none !important; transition: none !important; } }

/* The character field uses the same silhouette as the navigation mark. */
/* the field drifts down as the hero scrolls away; clipped at the hero's foot, it
     slides under the ledger, not through its figures */
.cc-hero { position: relative; isolation: isolate; overflow-x: visible; overflow-y: clip; padding: 36px 0 26px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .95fr); gap: 48px; align-items: center; }
.cc-hero h1 { font-size: clamp(44px, 6vw, 76px); line-height: 1.06; margin: 0 0 24px; }
.cc-hero h1 em { font-style: normal; color: var(--brand); }
.cc-lead { font-size: 18px; color: var(--t2); max-width: 25em; margin: 0 0 32px; text-wrap: pretty; }
.cc-lead b { color: var(--t1); font-weight: 600; }
.cc-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.cc-btn { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 10px; font-size: 15px; font-weight: 550;
            transition: background .15s var(--ease-swift), transform .15s var(--ease-swift); }
.cc-btn:active { transform: scale(.98); }
.cc-btn.p { background: var(--brand); color: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.cc-btn.p:hover { background: var(--clay-hover); }
.cc-btn.g { color: var(--t1); box-shadow: inset 0 0 0 1px var(--line-strong); }
.cc-btn.g:hover { background: var(--ghost); }
.cc-btn:hover .arr, .cc a:hover .arr { transform: translateX(3px); }
.cc-base { margin: 28px 0 0; display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: var(--t3); }
.cc-base code { font: 13px var(--mono); color: var(--t1); padding: 5px 10px; border-radius: 7px; background: var(--s2); box-shadow: 0 0 0 1px var(--line); }

.cc-stage { position: relative; justify-self: end; width: 100%; max-width: 510px; margin: 0; text-align: center; }
.cc-sig { width: 100%; aspect-ratio: 547 / 554;
    --sig: linear-gradient(140deg, var(--sig-a) 15%, var(--sig-b) 85%);
    background: linear-gradient(100deg, transparent 42%, var(--sig-glint) 50%, transparent 58%) no-repeat -60% 0 / 220% 100%, var(--sig);
    mask: var(--brand-symbol) center / 112% auto no-repeat, url(./signature-field.svg) center / cover no-repeat;
    mask-composite: intersect;
    animation: cc-sig-in 1.2s var(--ease-enter) both, cc-glint 2.4s .6s var(--ease-swift) both; }
@keyframes cc-sig-in { from { opacity: 0; transform: scale(.985); } to { opacity: 1; transform: none; } }
@keyframes cc-glint { from { background-position: -60% 0, 0 0; } to { background-position: 160% 0, 0 0; } }
/* a soft plate of the page's colour, so the caption reads while the mark drifts behind it */
.cc-sig-cap { position: relative; z-index: 1; width: fit-content; padding: 4px 12px; border-radius: 12px; background: color-mix(in srgb, var(--s1) 88%, transparent); box-shadow: 0 0 14px 8px color-mix(in srgb, var(--s1) 88%, transparent);
    max-width: 29em; margin: -12px auto 0; font-size: 13px; line-height: 1.7; color: var(--t3); text-align: center; }
.cc-sig-cap b { color: var(--t2); font-weight: 550; }
.cc-sig-cap a { color: var(--clay-ink); font-weight: 550; white-space: nowrap; }
/* on the dark field --t3 reads as 4.1:1, under the 4.5:1 small text needs */
.dark .cc .cc-sig-cap { color: var(--t2); }
.dark .cc .cc-sig-cap b { color: var(--t1); }

.cc-field { position: absolute; z-index: -1; top: 0; left: calc(50% - 50vw); width: 100vw; height: 100%; pointer-events: none; will-change: transform; }
.cc-bloom { position: absolute; z-index: -2; top: 0; left: 0; width: 440px; height: 440px; margin: -220px 0 0 -220px; border-radius: 50%;
  background: radial-gradient(circle, var(--bloom), transparent 64%); opacity: 0; pointer-events: none; will-change: transform, opacity; }
.cc-fielded .cc-sig { visibility: hidden; animation: none; }
/* As the hero scrolls away the field drifts back and fades. Where the browser
   can drive that from the scroll position, home.js sets cc-css-drift and it
   runs on the compositor, in the same frame as the page; set from a scroll
   handler, it trails the page by a frame and judders on phones. */
@keyframes cc-drift { to { translate: 0 calc(var(--cc-hero-h, 0px) * .35); } }
@keyframes cc-fade { 95%, to { opacity: 0; } }
.cc-css-drift .cc-field { animation: cc-drift linear both, cc-fade ease-in-out both; animation-timeline: scroll(root), scroll(root); animation-range: 0px var(--cc-hero-h, 100vh); }
.cc-css-drift .cc-bloom { animation: cc-drift linear both; animation-timeline: scroll(root); animation-range: 0px var(--cc-hero-h, 100vh); }

.cc-ledger { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); }
.cc-fig { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "n k" "n d" "n e"; column-gap: 16px; align-content: start; padding: 22px 24px 18px; transition: background .2s var(--ease-swift); }
.cc-fig:first-child { padding-left: 6px; }
.cc-fig + .cc-fig { border-left: 1px solid var(--line); }
.cc-fig:hover { background: var(--ghost); }
.cc-fig .k { grid-area: k; align-self: end; font: 500 12px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--clay-ink); }
/* sans, not serif: Georgia's old-style figures make a lone 0 read as the letter o */
.cc-fig b { grid-area: n; align-self: center; min-width: 2.5em; font: 650 48px/1 var(--sans); letter-spacing: -.045em; font-variant-numeric: tabular-nums; color: var(--t1); }
.cc-fig b small { font-size: .42em; font-weight: 600; letter-spacing: 0; margin-left: 3px; color: var(--clay-ink); }
.cc-fig .d { grid-area: d; margin-top: 8px; font-size: 14px; line-height: 1.45; color: var(--t2); text-wrap: balance; }
.cc-fig .e { grid-area: e; align-self: start; margin-top: 5px; font: 500 12.5px/1.4 var(--mono); color: var(--t3); transition: color .2s; }
.cc-fig:hover .e { color: var(--clay-ink); }
/* sections: each opens on a rule */
.cc-sec { position: relative; display: grid; grid-template-columns: minmax(0, 17fr) minmax(0, 36fr); column-gap: 64px; align-items: start; margin-top: 112px; padding-top: 44px; border-top: 1px solid var(--line); }
.cc-sec { counter-increment: cc-sec; }
.cc-sec .cc-eyebrow::before { content: counter(cc-sec, decimal-leading-zero); margin-right: 12px; color: var(--t3); }
/* sections */
/* the claim on the left stays in view while its evidence scrolls past on the right */
.cc-head { position: sticky; top: 92px; }
.cc-head h2 { font-size: clamp(28px, 3.1vw, 38px); line-height: 1.18; margin: 16px 0 14px; text-wrap: balance; overflow-wrap: anywhere; }
/* a Chinese or Korean heading breaks at its punctuation and spaces, a Japanese one between phrases, never inside a word */
.cc-head h2:lang(zh), .cc-head h2:lang(ko) { word-break: keep-all; }
.cc-head p { margin: 0; color: var(--t2); font-size: 16px; text-wrap: pretty; }
.cc-head .cc-btn { margin-top: 26px; }
.cc-body { min-width: 0; display: grid; gap: 24px; }

/* genuine check: its four checks as a ruled list */
.cc-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; margin: 0; padding: 0; list-style: none; }
.cc-checks li { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; align-items: center; align-content: start; padding: 17px 2px 18px; border-top: 1px solid var(--line); }
.cc-checks li:nth-child(-n+2) { border-top-color: var(--line-strong); }
.cc-checks b { grid-row: 1; grid-column: 1; font-family: var(--serif); font-weight: 500; font-size: 19px; letter-spacing: -.01em; }
.cc-pass { grid-row: 1; grid-column: 2; display: inline-block; font: 500 11.5px/1 var(--mono); padding: 5px 8px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); transition: opacity .3s, filter .3s; }
.cc-pass::before { content: "✓ "; }
.cc-pass.w { background: var(--clay-soft); color: var(--clay-ink); }
.cc-pass.w::before { content: none; }
.cc-checks p { grid-column: 1 / -1; margin: 5px 0 0; color: var(--t2); font-size: 14px; }
/* two bills, the unit price and the cache, each hanging from the slot it
     was printed through and torn off at the foot. With the script the paper
     feeds out as the section comes into view, then the saving is stamped on */
.cc-bills { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; align-items: start; }
.cc-bill { position: relative; margin: 0; filter: drop-shadow(0 1px 1px rgba(0,0,0,.07)) drop-shadow(0 12px 22px rgba(0,0,0,.08)); }
.dark .cc .cc-bill { filter: drop-shadow(0 0 1px hsla(0, 0%, 100%, .28)) drop-shadow(0 12px 22px rgba(0,0,0,.5)); }
.cc-bill::before { content: ""; position: relative; z-index: 1; display: block; height: 9px; border-radius: 999px; background: var(--ink); box-shadow: inset 0 2px 3px rgba(0,0,0,.6), inset 0 -1px 0 hsla(40, 10%, 90%, .12); }
.cc-bill-in { --z: 8px; margin: -4px 9px 0; padding: 26px 24px 30px; background: var(--s2);
    -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / calc(2 * var(--z)) 100%;
    mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / calc(2 * var(--z)) 100%; }
.cc-bill-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px; margin-bottom: 22px; padding-bottom: 14px; border-bottom: 1px dashed var(--line-strong); font: 12.5px/1.4 var(--mono); color: var(--t3); }
.cc-bill-top b { flex: none; font-weight: 500; font-size: 12px; letter-spacing: .12em; color: var(--clay-ink); }
.cc-bill-top span { text-align: right; }
.cc-bar { margin: 0 0 20px; }
/* a label and a figure too long for one line stack, as in Russian */
.cc-bar-l { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 12px; font-size: 14px; margin-bottom: 8px; }
.cc-bar-l b { font-weight: 550; white-space: nowrap; }
.cc-bar-l > span { font: 500 13px var(--mono); color: var(--t2); font-variant-numeric: tabular-nums; }
.cc-track { height: 10px; border-radius: 2px; background: var(--ghost); overflow: hidden; }
.cc-fill { height: 100%; border-radius: inherit; background: var(--line-strong); transform-origin: left; animation: cc-grow 1.1s var(--ease-enter) .2s both; }
.cc-fill.c { background: linear-gradient(90deg, var(--clay), var(--brand)); }
@keyframes cc-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.cc-note { min-height: 3.2em; margin: 0; font-size: 12.5px; color: var(--t3); }
.cc-note a { color: var(--clay-ink); font-weight: 550; white-space: nowrap; }
.cc-total { display: flex; justify-content: space-between; gap: 16px; margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--line-strong); }
.cc-total > span { font: 12.5px/1.4 var(--mono); color: var(--t3); }
.cc-total { align-items: center; }
/* the saving, as a stamp */
.cc-big { flex: none; margin: 2px 4px 2px 0; padding: 7px 13px 8px; border: 2px solid currentColor; border-radius: 9px; outline: 1px solid currentColor; outline-offset: 2.5px; transform: rotate(-4deg);
    font: 700 27px/1 var(--sans); letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--clay-ink); }
/* three steps as ruled rows, the number in the margin */
.cc-steps { display: grid; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line-strong); }
.cc-step { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: baseline; padding: 22px 2px 24px; border-bottom: 1px solid var(--line); }
.cc-step .n { grid-row: 1 / span 2; font: 500 13px var(--mono); letter-spacing: .1em; color: var(--clay-ink); }
.cc-step b { display: block; font: 500 21px/1.3 var(--serif); letter-spacing: -.01em; }
.cc-step p { grid-column: 2; margin: 6px 0 0; color: var(--t2); font-size: 14.5px; }
.cc-step .cc-diff { grid-column: 2; max-width: 460px; margin-top: 12px; }
.cc-diff { position: relative; margin: 4px 0 0; padding: 14px 16px; border-radius: 12px; background: var(--ink); color: var(--ink-t1); font: 13px/1.9 var(--mono); white-space: pre; overflow-x: auto; }
.cc-diff .k { color: var(--ink-t3); }
.cc-diff .del { color: var(--ink-bad); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--ink-bad) 55%, transparent); }
.cc-diff .add { color: var(--ink-ok); }
.cc-js .cc-diff .cc-copy { position: absolute; top: 9px; right: 9px; color: var(--ink-t3); }
.cc-js .cc-diff .cc-copy:hover { background: var(--ink-line); color: var(--ink-t1); }
.cc-clients { display: flex; flex-wrap: wrap; gap: 10px; }
.cc-client { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 15px 0 11px; border-radius: 999px; background: var(--s2); box-shadow: 0 0 0 1px var(--line);
    font-size: 14px; font-weight: 550; transition: box-shadow .2s var(--ease-swift), transform .2s var(--ease-swift); }
.cc-client:hover { box-shadow: 0 0 0 1px var(--clay); transform: translateY(-1px); }
.cc-client img, .cc-client .ico { width: 18px; height: 18px; flex: none; }
.cc-client .ico { display: block; color: var(--t1); background: currentColor; -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat; }

/* faq: the head beside the questions */
.cc-faq { display: block; box-shadow: inset 0 -1px 0 var(--line), inset 0 1px 0 var(--line-strong); }
.cc-faq { interpolate-size: allow-keywords; }
.cc-faq details { box-shadow: inset 0 1px 0 var(--line); }
.cc-faq details::details-content { block-size: 0; overflow: clip; transition: block-size .32s var(--ease-swift), content-visibility .32s allow-discrete; }
.cc-faq details[open]::details-content { block-size: auto; }
.cc-faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 2px; font-size: 16.5px; font-weight: 550; }
.cc-faq summary::-webkit-details-marker { display: none; }
.cc-faq summary::after { content: "+"; flex: none; font: 400 20px/1 var(--mono); color: var(--t3); transition: transform .2s var(--ease-swift); }
.cc-faq details[open] summary::after { transform: rotate(45deg); }
.cc-faq p { margin: -4px 0 20px; padding-right: 32px; color: var(--t2); font-size: 15px; }
.cc-faq p a, .cc-faq p code { color: var(--clay-ink); }
.cc-faq p code { font: 13.5px var(--mono); }
.cc-faq p a:hover { text-decoration: underline; }

/* closing: the call to action on ink in both themes, the mark at its edge */
.cc-end { position: relative; isolation: isolate; overflow: hidden; margin: 112px 0 88px; padding: 64px 56px; border-radius: 28px; background: var(--ink); color: var(--ink-t1); box-shadow: 0 0 0 1px var(--ink-line), var(--shadow-lg); }
.cc-end h2 { font-size: clamp(30px, 4vw, 48px); line-height: 1.12; margin: 0 0 14px; }
.cc-end p { margin: 0 0 30px; color: var(--ink-t2); font-size: 16px; }
.cc-end .cc-btn.g { color: var(--ink-t1); box-shadow: inset 0 0 0 1px hsla(40, 10%, 90%, .28); }
.cc-end .cc-btn.g:hover { background: var(--ink-line); }
.cc-end-mark { position: absolute; z-index: -1; top: 50%; right: -30px; width: 430px; aspect-ratio: 547 / 554; transform: translateY(-50%); pointer-events: none; background: linear-gradient(140deg, #ffb38c 15%, #d9653d 85%);
    mask: var(--brand-symbol) center / 112% auto no-repeat, url(./signature-field.svg) center / cover no-repeat, radial-gradient(closest-side, #000 72%, transparent);
    mask-composite: intersect; }
/* script-only controls: hidden unless site/docs/home.js runs */
.cc-copy { display: none; }
.cc-js .cc-copy { position: relative; display: inline-grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 7px; background: none; color: var(--t3); cursor: pointer; transition: background .15s, color .15s; }
.cc-js .cc-copy:hover { background: var(--ghost); color: var(--t1); }
.cc-copy svg { width: 15px; height: 15px; }
.cc-js .cc-copy.done { color: var(--ok); }
.cc-copy.done::after { content: attr(data-done); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); padding: 3px 8px; border-radius: 6px;
    background: var(--t1); color: var(--s1); font: 500 12px/1.4 var(--sans); white-space: nowrap; pointer-events: none; animation: cc-tip .25s var(--ease-enter) both; }
@keyframes cc-tip { from { opacity: 0; transform: translate(-50%, 4px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (max-width: 900px) {
    .cc-hero { grid-template-columns: 1fr; padding: 40px 0 32px; gap: 28px; }
    .cc-stage { justify-self: center; max-width: 400px; }
    .cc-fig { grid-template-columns: 1fr; grid-template-areas: "k" "n" "d" "e"; padding: 20px 18px; }
    .cc-fig:first-child { padding-left: 2px; }
    .cc-fig b { margin: 14px 0 2px; font-size: 44px; }
    .cc-sec { grid-template-columns: 1fr; row-gap: 28px; margin-top: 88px; padding-top: 36px; }
    .cc-head { position: static; max-width: 620px; }
    .cc-end { padding: 44px 24px; margin: 88px 0 72px; }
    .cc-end-mark { top: auto; right: -90px; bottom: -110px; width: 320px; transform: none; opacity: .55; }
}
@media (max-width: 600px) {
    /* phones: the figures become rows, the number beside its line */
    .cc-sec { margin-top: 72px; padding-top: 30px; row-gap: 24px; }
    .cc-ledger { grid-template-columns: 1fr; }
    .cc-fig, .cc-fig:first-child { grid-template-columns: 118px minmax(0, 1fr); grid-template-areas: "n k" "n d" "n e"; column-gap: 12px; padding: 16px 2px; }
    .cc-fig + .cc-fig { border-left: 0; border-top: 1px solid var(--line); }
    .cc-fig b { margin: 0; min-width: 0; font-size: 40px; }
    .cc-fig .d { margin-top: 6px; font-size: 13.5px; }
    .cc-checks { grid-template-columns: 1fr; }
    .cc-checks li { padding: 15px 2px 16px; }
    .cc-checks li:nth-child(2) { border-top-color: var(--line); }
    .cc-checks b { font-size: 17px; }
    .cc-checks p { font-size: 13.5px; }
    .cc-bills { grid-template-columns: 1fr; gap: 26px; }
    .cc-bill-in { padding: 24px 20px 28px; }
    .cc-bill-top span { display: none; }
    .cc-step { grid-template-columns: 44px minmax(0, 1fr); padding: 18px 2px 20px; }
    .cc-step b { font-size: 19px; }
    .cc-clients { gap: 8px; }
    .cc-client { height: 34px; font-size: 13.5px; }
    .cc-end { margin: 72px 0 56px; border-radius: 22px; }
}

/* Sub2API homepage integrations */
[hidden] { display: none !important; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: fixed; z-index: 80; top: 8px; left: 8px; padding: 8px 16px; background: var(--card); border-radius: 8px; }
.theme-wrap { position: relative; }
.theme-menu { position: absolute; top: calc(100% + 6px); right: 0; }
.theme-menu button[aria-pressed="true"] { color: var(--accent); font-weight: 600; }
.theme-menu button:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: -2px; }
.cc { --t3: #686868; }
.dark .cc { --t3: #a3a3a3; }
.cc-btn.p { background: #b5532f; }
.dark .cc-btn.p { color: #141413; background: #e08264; }
.cc-help { margin-top: 30px; padding: 14px 18px; border-radius: 16px; background: var(--s2); box-shadow: 0 0 0 1px var(--line), var(--shadow-sm); }
.cc-help b { display: block; }
.cc-help p { margin-top: 5px; font-size: 13px; line-height: 1.55; }
.cc-help a { display: inline-block; margin-top: 8px; color: var(--clay-ink); font-size: 13px; }
.cc-fill.full { width: 100%; }
.cc-fill.half { width: 50%; }
.cc-fill.three-quarters { width: 75%; }
.cc-client .mono-icon { display: block; }
.dark .cc-client .mono-icon { filter: invert(1); }
.cc-base code { overflow-wrap: anywhere; }
.cc-status { display: flex; align-items: center; gap: 8px; width: fit-content; min-height: 20px; margin-top: 16px; font-size: 13px; line-height: 20px; }
.cc-status b { font-weight: 550; }
.cc-status b::before { display: inline-block; width: 7px; height: 7px; margin-right: 8px; border: 1px solid currentColor; border-radius: 50%; content: ''; }
.cc-status > span { color: var(--t3); }
.cc-monitor { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; min-height: 42px; padding: 8px 6px; border-top: 1px solid var(--line); font: 12.5px/1.4 var(--mono); }
.cc-monitor b { font-weight: 500; color: var(--t2); }
.cc-monitor > span { color: var(--t3); }
.cc-monitor .more { margin-left: auto; color: var(--clay-ink); white-space: nowrap; }
.cc-copy.fail::after { content: "复制失败，请手动选择地址"; position: absolute; bottom: calc(100% + 6px); right: 0; background: var(--t1); color: var(--s1); font: 500 12px/1.4 var(--sans); padding: 3px 8px; border-radius: 6px; white-space: nowrap; }
.cc-js .cc-diff { padding-right: 42px; }
.cc-btn.p:hover { background: #a44727; }
.dark .cc-btn.p:hover { background: #f09978; }
@media (max-width: 900px) {
  .bar { padding: 0 16px; gap: 8px; }
  .bar nav .sep { display: none; }
  header .bar nav > a:not(.cta) { font-size: 13px; white-space: nowrap; }
  html { scroll-padding-top: 118px; }
}
@media (max-width: 380px) {
  .cc-in { padding-inline: 18px; }
  .cc-hero h1 { font-size: 40px; }
}
@media (max-width: 345px) {
  header .bar nav > a:not(.cta) { padding-inline: 5px; }
  header .bar nav > a[aria-current="page"] + a { margin-left: -5px; }
}
@media (max-width: 360px) {
  .cc-monitor { gap: 8px; }
  .cc-monitor .more { display: none; }
}
