/* The community's web pages (Web.kt), after Anthropic's design language (anthropic.com, measured): an ivory page,
   ink text, warm neutral surfaces and hairlines; pill navigation; dark slate buttons with 10 corners; large tight sans
   titles, a serif for the lead text, monospaced figures and labels; tables of rows split by hairlines; a dark footer.
   Dark: the warm greys of the Claude apps. Only system fonts (no brand fonts or marks are copied). */
:root {
  color-scheme: light dark;
  --bg: #faf9f5;
  --surface: #f5f4ed;
  --surface-2: #efede5;
  --surface-3: #e8e6dc;
  --field: #ffffff;
  --border: #e8e6dc;
  --border-strong: #dedcd1;
  --ink: #141413;
  --text: #30302e;
  --text-nav: #3d3d3a;
  --text-2: #5e5d59;
  --text-3: #87867f;
  --btn: #30302e;
  --btn-hover: #141413;
  --on-btn: #faf9f5;
  --accent: #d97757;
  --danger: #b3452f;
  --danger-bg: #f6e2dc;
  --warn: #6f5419;
  --warn-bg: #efe6d2;
  --foot-bg: #141413;
  --foot-text: #faf9f5;
  --foot-muted: #87867f;
  --foot-border: #30302e;
  --shadow: 0 12px 32px rgb(20 20 19 / .12), 0 2px 6px rgb(20 20 19 / .06);
  --sans: "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans",
    "Microsoft YaHei UI", "Malgun Gothic", "Noto Sans", sans-serif;
  /* (A serif for Latin text; CJK falls to a serif where the system has a good one, else to the sans, never to a bitmap Song face.) */
  --serif: "Iowan Old Style", Charter, "Charter BT", Georgia, "Noto Serif SC", "Source Han Serif SC", "Songti SC", "Noto Serif JP", "Hiragino Mincho ProN",
    "Microsoft YaHei UI", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, Menlo, monospace;
  --side: 20px;
  /* Small labels: monospaced capitals in Latin scripts; Chinese, Japanese and Korean in the sans, without the spacing. */
  --label-font: var(--mono);
  --label-track: .04em;
}
:root:lang(zh), :root:lang(ja), :root:lang(ko), :root:lang(ar), :root:lang(fa), :root:lang(he) { --label-font: var(--sans); --label-track: 0; }
@media (min-width: 600px) { :root { --side: 40px; } }
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #262624;
    --surface: #30302e;
    --surface-2: #383835;
    --surface-3: #3d3d3a;
    --field: #1f1e1d;
    --border: #3d3d3a;
    --border-strong: #4a4945;
    --ink: #faf9f5;
    --text: #e8e6dc;
    --text-nav: #dedcd1;
    --text-2: #b5b3aa;
    --text-3: #8c8a82;
    --btn: #faf9f5;
    --btn-hover: #ffffff;
    --on-btn: #141413;
    --danger: #e58c78;
    --danger-bg: #4a2c25;
    --warn: #e2c98f;
    --warn-bg: #45391f;
    --foot-bg: #1a1a18;
    --foot-border: #30302e;
    --shadow: 0 12px 32px rgb(0 0 0 / .4), 0 2px 6px rgb(0 0 0 / .3);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
body.site { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
body.site > main { flex: 1 0 auto; width: 100%; box-sizing: border-box; }
a { color: var(--ink); text-underline-offset: 3px; }
img { display: block; }
.icon { width: 20px; height: 20px; fill: currentColor; flex: none; }
[dir="rtl"] .icon.mirror { transform: scaleX(-1); }
.icon.forward { transform: scaleX(-1); }
[dir="rtl"] .icon.forward { transform: none; }
[hidden] { display: none !important; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- Masthead: the site, the destinations as pills, the search and the account; on phones the pills and the search
   take rows of their own. ---- */
.masthead { position: sticky; top: 0; z-index: 10; background: var(--bg); }
.masthead-inner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px;
  max-width: 1200px; min-height: 72px; margin: 0 auto; padding: 12px var(--side);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: 19px; line-height: 28px; font-weight: 650; letter-spacing: -.01em; }
.logo { width: 28px; height: 28px; flex: none; }
.logo rect { fill: var(--ink); }
.logo path { fill: var(--bg); }
.pills { display: flex; gap: 8px; }
.pill {
  display: inline-flex; align-items: center; height: 32px; padding: 0 16px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--text-nav); font-size: 13px; letter-spacing: .01em; text-decoration: none; white-space: nowrap;
}
.pill:hover { background: var(--surface-2); }
.pill[aria-current] { background: var(--surface-3); border-color: var(--border-strong); color: var(--ink); }
.masthead .search { flex: 0 1 320px; margin-inline-start: auto; }
.tools { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.has-search .tools { margin-inline-start: 0; }
@media (max-width: 839px) {
  .masthead-inner { min-height: 60px; padding-top: 10px; padding-bottom: 12px; }
  .pills { order: 3; flex: 1 1 100%; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--side)); padding: 0 var(--side); }
  .masthead .search { order: 4; flex: 1 1 100%; margin: 0; }
  .has-search .tools { margin-inline-start: auto; }
}

.search { margin: 0; }
.search-bar {
  display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text-3); cursor: text;
}
.search-bar .icon { width: 18px; height: 18px; }
.search-bar input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; color: var(--ink); font: inherit; font-size: 14px; }
.search-bar input::placeholder { color: var(--text-3); opacity: 1; }
.search-bar input::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
.search-bar:focus-within { border-color: var(--text-3); outline: 2px solid var(--accent); outline-offset: 1px; }
.search-bar .search-clear { width: 28px; height: 28px; margin-inline-end: -6px; border: 0; background: none; }
@media (max-width: 839px) { .search-bar { height: 44px; } .search-bar input { font-size: 16px; } }

.icon-button {
  display: inline-grid; place-items: center; width: 36px; height: 36px; flex: none; padding: 0;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text-2); cursor: pointer; list-style: none;
}
.icon-button::-webkit-details-marker { display: none; }
.icon-button:hover { background: var(--surface-2); color: var(--ink); }
.account { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; list-style: none; }
.account::-webkit-details-marker { display: none; }
.account:hover .avatar { background: var(--border-strong); }

/* ---- Buttons: dark slate (ink on dark pages) with 10 corners; a quiet one on the warm grey; text; destructive. ---- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 20px; border: 1px solid var(--btn); border-radius: 10px;
  background: var(--btn); color: var(--on-btn); font: inherit; font-size: 15px; font-weight: 500; line-height: 1;
  text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s;
}
.button .icon { width: 18px; height: 18px; }
.button:hover { background: var(--btn-hover); border-color: var(--btn-hover); }
.button:active { transform: translateY(1px); }
.button.small { height: 32px; padding: 0 14px; border-radius: 8px; font-size: 13px; }
.button.medium { height: 48px; padding: 0 26px; border-radius: 12px; font-size: 16px; }
.button.tonal { background: var(--surface-3); border-color: var(--border-strong); color: var(--text); }
.button.tonal:hover { background: var(--border-strong); }
.button.tonal[aria-pressed="true"] { background: var(--btn); border-color: var(--btn); color: var(--on-btn); }
.button.text { background: none; border-color: transparent; color: var(--text); padding: 0 12px; }
.button.text:hover { background: var(--surface-2); }
.button.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.button.danger:hover { filter: brightness(.92); }
@media (prefers-color-scheme: dark) { .button.danger { color: #141413; } }
.row-actions, .sheet-actions, .dialog-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.row-actions form, .hero-actions form, .sheet-actions form { display: contents; }

/* ---- Pages ---- */
.page { max-width: 1200px; margin: 0 auto; padding: 8px var(--side) 0; }
.page.detail { max-width: 1200px; }
.page.narrow { max-width: calc(720px + 2 * var(--side)); }
.page-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin: 40px 0 28px; }
.display, .title { margin: 40px 0 28px; color: var(--ink); font-size: 44px; line-height: 1.12; font-weight: 600; letter-spacing: -.02em; overflow-wrap: anywhere; text-wrap: balance; }
.page-head .display { margin: 0; }
.page-head .sort { align-self: center; }
@media (max-width: 599px) {
  .display, .title { font-size: 32px; margin: 28px 0 20px; }
  .page-head { margin: 28px 0 20px; }
}
.count { margin: 0; color: var(--text-2); font: 13px/20px var(--label-font); letter-spacing: var(--label-track); }
.banner { margin: 0 0 28px; padding: 16px 20px; border-radius: 12px; background: var(--surface-3); color: var(--text); font-size: 15px; }
.hint { margin: 12px 0 0; color: var(--text-2); font-size: 13px; line-height: 20px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 24px; }

/* The breadcrumb back. */
.crumbs { margin: 28px 0 0; }
.crumbs a { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 13px; text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.crumbs .icon { width: 16px; height: 16px; }

/* A segmented control (as Anthropic's "All | Product | Company"): the chosen one in ink. */
.segmented { display: inline-flex; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.seg-btn {
  display: inline-flex; align-items: center; height: 36px; padding: 0 18px; flex: none;
  background: var(--surface-3); color: var(--text); font-size: 14px; text-decoration: none; white-space: nowrap;
}
.seg-btn:first-child { border-start-start-radius: 10px; border-end-start-radius: 10px; }
.seg-btn:last-child { border-start-end-radius: 10px; border-end-end-radius: 10px; }
.seg-btn:hover { background: var(--border-strong); }
.seg-btn[aria-current] { background: var(--ink); color: var(--bg); }

/* The order: a small bordered button naming it, opening its menu. */
.sort { flex: none; }
.select-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px 0 14px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--ink); font-size: 14px; cursor: pointer; list-style: none;
}
.select-btn::-webkit-details-marker { display: none; }
.select-btn:hover { background: var(--surface-2); }
.select-label { color: var(--text-3); }
.select-btn .icon { width: 16px; height: 16px; color: var(--text-2); }
.sort[open] .select-btn .icon { transform: rotate(180deg); }
.sort .menu { inset-inline-start: auto; inset-inline-end: 0; }

/* ---- Cards (a library: its picture on an ivory mat, who uploaded it above its name, its figures in mono). ---- */
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
@media (max-width: 599px) { .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; } }
.grid > li { min-width: 0; }
.card {
  display: flex; flex-direction: column; height: 100%; padding: 12px 12px 20px; border-radius: 16px;
  background: var(--surface); color: inherit; text-decoration: none; transition: background-color .2s;
}
.card:hover { background: var(--surface-2); }
.art { display: grid; place-items: center; aspect-ratio: 4 / 3; border-radius: 10px; background: var(--bg); }
.art .cover { width: 58%; height: auto; aspect-ratio: 1; }
.card-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 16px 8px 0; }
.card-sub { order: -1; color: var(--text-2); font-size: 13px; line-height: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-title { color: var(--ink); font-size: 18px; line-height: 24px; font-weight: 650; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-stats { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 10px; color: var(--text-3); font: 12px/16px var(--mono); }
.card-stats > span:not(.vh) { display: inline-flex; align-items: center; gap: 5px; }
.card-stats .icon { width: 14px; height: 14px; }
@media (max-width: 599px) { .card { padding: 8px 8px 16px; border-radius: 14px; } .card-text { padding: 12px 6px 0; } .card-title { font-size: 16px; line-height: 22px; } }

/* A library's picture: its cover, or four of its icons in a 2 × 2 grid. */
.cover { display: block; width: 56px; height: 56px; flex: none; border-radius: 12px; overflow: hidden; }
.cover img, .cell img { display: block; width: 100%; height: 100%; object-fit: contain; }
.cover.grid4 { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 6.25%; border-radius: 0; overflow: visible; }
.cell { display: block; min-width: 0; min-height: 0; }
/* A Monet icon: its glyph (white in the file) in ink on a warm plate (light on a dark one in dark pages). */
.mono { display: grid; place-items: center; border-radius: 50%; background: var(--surface-3); }
.mono img { width: 70%; height: 70%; filter: brightness(0); opacity: .78; }
@media (prefers-color-scheme: dark) { .mono img { filter: none; opacity: .9; } }

/* People: the first letter of their name, in the serif, on a warm circle (no pictures of people are kept). */
.avatar {
  display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%;
  background: var(--surface-3); color: var(--ink); font: 400 18px/1 var(--serif);
}
.avatar.small { width: 32px; height: 32px; font-size: 15px; }
.avatar.large { width: 72px; height: 72px; font-size: 32px; }
.avatar.huge { width: 52%; height: auto; aspect-ratio: 1; font-size: clamp(44px, 7vw, 96px); }

/* ---- Rows (as Anthropic's lists): hairlines between, monospaced figures in columns; on phones the figures go below. ---- */
.rows { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--border); }
.rows-head, .row { display: grid; grid-template-columns: minmax(0, 1fr) repeat(3, 120px); align-items: center; gap: 16px; }
.rows-head { padding: 0 0 10px; color: var(--text-3); font: 12px/16px var(--label-font); letter-spacing: var(--label-track); text-transform: uppercase; }
.rows-head span:not(:first-child) { text-align: end; }
.row { padding: 14px 0; border-top: 1px solid var(--border); color: inherit; text-decoration: none; }
.row:hover .row-title { text-decoration: underline; text-underline-offset: 3px; }
.row-main { display: flex; align-items: center; gap: 14px; min-width: 0; }
.row-text { display: flex; flex-direction: column; min-width: 0; }
.row-title { color: var(--ink); font-size: 16px; line-height: 22px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-sub { color: var(--text-2); font-size: 13px; line-height: 20px; }
.num { color: var(--text); font: 14px/20px var(--mono); text-align: end; }
.num-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 699px) {
  .rows-head { display: none; }
  .row { display: flex; flex-wrap: wrap; gap: 4px 16px; }
  .row-main { flex: 1 1 100%; }
  .num { font-size: 12px; text-align: start; color: var(--text-2); }
  .num:first-of-type { margin-inline-start: 54px; }
  .num-label { position: static; width: auto; height: auto; overflow: visible; clip: auto; margin-inline-end: 6px; color: var(--text-3); font-family: var(--sans); }
}

/* ---- A library's or an author's page: an article's head (meta, a large title, the lead in the serif, actions; the
   picture on a warm panel beside it, above it on phones), then sections under hairline labels. ---- */
.article-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 380px); align-items: center; gap: 56px; margin: 24px 0 48px; }
.article-text { min-width: 0; }
.article-head.person { grid-template-columns: minmax(0, 1fr) minmax(200px, 260px); }
.article-text .display { margin: 0; }
.eyebrow { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0 0 16px; color: var(--text-2); font-size: 13px; line-height: 20px; }
.eyebrow a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--border-strong); }
.eyebrow a:hover { text-decoration-color: currentColor; }
.lead { margin: 20px 0 0; max-width: 38em; color: var(--text); font: 400 21px/1.5 var(--serif); overflow-wrap: anywhere; text-wrap: pretty; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.article-art { display: grid; place-items: center; aspect-ratio: 1; border-radius: 16px; background: var(--surface); }
.article-art .cover.large { width: 56%; height: auto; aspect-ratio: 1; border-radius: 22%; }
.article-art .cover.large.grid4 { border-radius: 0; gap: 7%; }
@media (max-width: 839px) {
  .article-head, .article-head.person { grid-template-columns: 1fr; gap: 24px; margin: 20px 0 36px; }
  .article-art { order: -1; width: 120px; border-radius: 20px; }
  .article-art .avatar.huge { width: 70%; font-size: 48px; }
  .lead { font-size: 19px; }
  .hero-actions .button { flex: 1 1 auto; }
  .hero-actions .button.medium { flex: 1 1 100%; }
}

/* Figures: a mono label over a large value, in columns between hairlines (2 × 2 on phones). */
.stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.stats li { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 6px; padding: 20px 0; min-width: 0; }
.stats li + li { border-inline-start: 1px solid var(--border); padding-inline-start: 24px; }
.stat-value { color: var(--ink); font-size: 28px; line-height: 1.15; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; }
.stat-label { color: var(--text-3); font: 12px/16px var(--label-font); letter-spacing: var(--label-track); text-transform: uppercase; }
@media (max-width: 599px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats li:nth-child(3) { border-inline-start: 0; padding-inline-start: 0; }
  .stats li:nth-child(n + 3) { border-top: 1px solid var(--border); }
  .stat-value { font-size: 24px; }
}

/* Sections: a small bold label on a hairline (as Anthropic's "Latest news"); with an arrow when it leads further. */
.block { margin: 64px 0 0; }
.block.first { margin-top: 0; }
@media (max-width: 599px) { .block { margin-top: 48px; } }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 20px; padding-top: 16px; border-top: 1px solid var(--border); color: var(--ink); font-size: 14px; line-height: 20px; font-weight: 650; }
.title-link { display: inline-flex; align-items: center; gap: 6px; color: inherit; text-decoration: none; }
.title-link:hover { text-decoration: underline; }
.title-link .icon { width: 16px; height: 16px; }
main > .section-title { margin-top: 48px; }

/* A library's icons: tiles on a warm panel. */
.previews { list-style: none; margin: 0; padding: 20px; border-radius: 16px; background: var(--surface); display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 16px; }
.previews li { display: grid; place-items: center; aspect-ratio: 1; border-radius: 12px; background: var(--bg); }
.previews img, .previews .mono { width: 70%; height: 70%; object-fit: contain; }
@media (min-width: 600px) { .previews { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); } }

/* Details: a table of rows (name, value). */
.facts-grid { margin: 0; }
.facts-grid > div { display: grid; grid-template-columns: minmax(110px, 240px) minmax(0, 1fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.facts-grid dt { color: var(--text-2); font-size: 14px; line-height: 22px; }
.facts-grid dd { margin: 0; color: var(--ink); font-size: 15px; line-height: 22px; overflow-wrap: anywhere; }
@media (max-width: 599px) { .facts-grid > div { grid-template-columns: 7.5em minmax(0, 1fr); gap: 12px; } }

/* ---- Lists of settings and links: rows on a warm panel, hairlines between. ---- */
.seg { list-style: none; margin: 0; padding: 0; border-radius: 16px; background: var(--surface); }
.seg > li { position: relative; border-radius: 0; }
.seg > li + li { border-top: 1px solid var(--border); }
.seg > li:first-child { border-start-start-radius: 16px; border-start-end-radius: 16px; }
.seg > li:last-child { border-end-start-radius: 16px; border-end-end-radius: 16px; }
.seg > li:has(.menu-anchor[open]) { z-index: 2; }
.seg form { margin: 0; }
.li {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 56px; padding: 14px 20px; margin: 0;
  border: 0; border-radius: inherit; background: none; color: inherit; font: inherit; text-align: start; text-decoration: none;
}
.li.two { min-height: 76px; }
a.li, label.li, button.li { cursor: pointer; }
a.li:hover, label.li:hover, button.li:hover { background: var(--surface-2); }
.li:has(input[type="file"]:focus-visible) { outline: 2px solid var(--accent); outline-offset: -2px; }
.li > .icon { color: var(--text-2); }
.li .body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.li .headline { color: var(--ink); font-size: 15px; line-height: 22px; font-weight: 600; overflow-wrap: anywhere; text-decoration: none; }
.li .supporting { color: var(--text-2); font-size: 14px; line-height: 20px; overflow-wrap: anywhere; }
.li .cover { width: 48px; height: 48px; border-radius: 10px; }
.li .labels { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.li code { font: 13px/20px var(--mono); color: var(--text-2); overflow-wrap: anywhere; user-select: all; }
.li.code { align-items: flex-start; }
.li.code img { width: min(220px, 100%); height: auto; aspect-ratio: 1; margin-top: 10px; border-radius: 12px; background: #fff; }
.li.danger > .icon, .li.danger .headline { color: var(--danger); }
.li-main { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; align-self: stretch; margin: -14px 0 -14px -20px; padding: 14px 0 14px 20px; border-radius: inherit; color: inherit; text-decoration: none; }
[dir="rtl"] .li-main { margin: -14px -20px -14px 0; padding: 14px 20px 14px 0; }
.seg > li:has(a.li-main:hover) { background: var(--surface-2); }
.seg .li[aria-current] .headline { font-weight: 650; }
.seg .li[aria-current] > .icon { color: var(--ink); }
.seg .icon-button { border-color: transparent; background: none; }
.seg .icon-button:hover { background: var(--surface-3); }

/* Status labels: small warm pills. */
.tag { display: inline-flex; align-items: center; min-height: 22px; padding: 0 10px; border-radius: 999px; background: var(--surface-3); color: var(--text); font-size: 12px; line-height: 22px; font-weight: 500; }
.tag.error { background: var(--danger-bg); color: var(--danger); }
.tag.tertiary { background: var(--warn-bg); color: var(--warn); }

/* One's own page head (the account): the initial beside the name. */
.hero.person-hero { display: flex; align-items: center; gap: 20px; margin: 40px 0 8px; }
.hero-text { min-width: 0; }
.hero .display { margin: 0; }
.byline { margin: 4px 0 0; color: var(--text-2); font-size: 14px; line-height: 20px; }
@media (max-width: 599px) { .hero.person-hero { margin-top: 28px; } .hero .avatar.large { width: 56px; height: 56px; font-size: 24px; } }

/* ---- Menus: an ivory panel with a hairline and a soft shadow; items 36 high; the chosen one on the warm grey. A menu
   closes on a click anywhere else (an invisible layer over the page belongs to its button). ---- */
.menu-anchor { position: relative; flex: none; }
.menu-anchor[open] > summary::before { content: ""; position: fixed; inset: 0; z-index: 19; cursor: default; }
.menu {
  position: absolute; z-index: 20; top: calc(100% + 6px); inset-inline-end: 0;
  min-width: 200px; width: max-content; max-width: 300px; padding: 6px;
  border: 1px solid var(--border); border-radius: 12px; background: var(--bg); box-shadow: var(--shadow);
}
.menu form { margin: 0; }
.mi {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 6px 10px;
  border: 0; border-radius: 8px; background: none; color: var(--text); cursor: pointer; text-align: start; text-decoration: none;
  font: inherit; font-size: 14px; line-height: 20px; white-space: normal;
}
.mi .icon { width: 18px; height: 18px; color: var(--text-2); }
.mi:hover { background: var(--surface-2); color: var(--ink); }
.mi:has(input[type="file"]:focus-visible) { outline: 2px solid var(--accent); outline-offset: -2px; }
.mi[aria-current] { background: var(--surface-3); color: var(--ink); font-weight: 600; }
.mi[aria-current] .icon { color: var(--ink); }
.mi.danger, .mi.danger .icon { color: var(--danger); }
.account-menu .menu { min-width: 240px; }
.menu-head { display: flex; align-items: center; gap: 12px; padding: 10px; }
.menu-head-text { display: flex; flex-direction: column; min-width: 0; }
.menu-head-name { color: var(--ink); font-size: 15px; line-height: 22px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-head-sub { color: var(--text-2); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-divider { height: 1px; margin: 6px 4px; background: var(--border); }

/* ---- Controls ---- */
/* Switch: a 44 × 24 track; its knob carries a close mark off and a check on (the track ink when on). */
.switch-box { position: relative; display: inline-flex; flex: none; }
.switch {
  appearance: none; -webkit-appearance: none; position: relative; flex: none;
  width: 44px; height: 24px; margin: 0; border: 0; border-radius: 12px; background: var(--border-strong); cursor: pointer; transition: background-color .2s;
}
.switch::before { content: ""; position: absolute; top: 2px; inset-inline-start: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--field); box-shadow: 0 1px 2px rgb(20 20 19 / .25); transition: inset-inline-start .22s cubic-bezier(.3, 1.3, .6, 1); }
.switch:checked { background: var(--btn); }
.switch:checked::before { inset-inline-start: 22px; background: var(--on-btn); }
.switch-box .icon { position: absolute; top: 6px; width: 12px; height: 12px; pointer-events: none; transition: opacity .15s, inset-inline-start .22s cubic-bezier(.3, 1.3, .6, 1); }
.sw-off { inset-inline-start: 6px; color: var(--text-3); }
.sw-on { inset-inline-start: 26px; color: var(--btn); opacity: 0; }
.switch:checked ~ .sw-on { opacity: 1; }
.switch:checked ~ .sw-off { opacity: 0; }

/* Checkbox: an 18 box with 5 corners; checked in ink. */
.checkbox {
  appearance: none; -webkit-appearance: none; position: relative; flex: none; display: grid; place-content: center;
  width: 18px; height: 18px; margin: 3px; border: 1.5px solid var(--text-3); border-radius: 5px; background: var(--field); cursor: pointer;
}
.checkbox:hover { border-color: var(--ink); }
.checkbox:checked { border-color: var(--btn); background: var(--btn); }
.checkbox:checked::after { content: ""; width: 9px; height: 5px; border: solid var(--on-btn); border-width: 0 0 2px 2px; transform: translateY(-1px) rotate(-45deg); }
.check-row { display: flex; align-items: flex-start; gap: 10px; margin: 16px 0 0; cursor: pointer; }

/* Text fields: the label above, a white field with 10 corners. */
.outlined { position: relative; display: flex; flex-direction: column-reverse; gap: 6px; }
.outlined > span { color: var(--text); font-size: 13px; line-height: 18px; font-weight: 600; }
.outlined input, .outlined textarea, .outlined select {
  display: block; width: 100%; margin: 0; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: 10px;
  background: var(--field); color: var(--ink); font: inherit; font-size: 15px; line-height: 22px;
}
.outlined input, .outlined select { height: 44px; }
.outlined textarea { min-height: 88px; resize: vertical; }
.outlined select { appearance: none; -webkit-appearance: none; padding-inline-end: 40px; cursor: pointer; }
.outlined select option { color: var(--ink); background: var(--field); }
.outlined :is(input, textarea, select):hover { border-color: var(--text-3); }
.outlined :is(input, textarea, select):focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--text-3); }
.outlined.select .icon { position: absolute; inset-inline-end: 12px; bottom: 12px; width: 18px; height: 18px; pointer-events: none; color: var(--text-2); }
.stack { display: grid; gap: 16px; margin: 16px 0 0; }
.supporting-text { margin: 6px 0 0; color: var(--text-2); font-size: 12px; line-height: 18px; }

/* Folded away until asked for (reporting; the admins' log). */
.disclosure { margin: 40px 0 0; }
.disclosure > summary { list-style: none; width: fit-content; }
.disclosure > summary::-webkit-details-marker { display: none; }
.disclosure-arrow { width: 16px !important; height: 16px !important; }
.disclosure[open] .disclosure-arrow { transform: rotate(180deg); }
.disclosure[open] > .stack, .disclosure[open] > .reports { margin: 12px 0 0; padding: 20px; border-radius: 16px; background: var(--surface); }
.disclosure[open] > .reports { padding-inline-start: 40px; }

/* Uploading: the state on a panel while there is one; a 4 line in ink on the warm grey. */
.upload .hint { margin-top: 14px; }
.upload-state { margin: 14px 0 0; padding: 16px 20px; border-radius: 16px; background: var(--surface); }
.upload-state:has(.progress[hidden]):has(.status:empty) { display: none; }
.upload-state .status { margin: 0; font-size: 14px; }
.upload-state .status:empty { display: none; }
.progress { position: relative; height: 4px; margin: 12px 0 0; overflow: hidden; border-radius: 2px; background: var(--surface-3); --p: 0; }
.progress .active { position: absolute; top: 0; bottom: 0; inset-inline-start: 0; width: calc(var(--p) * 100%); border-radius: 2px; background: var(--ink); transition: width .2s; }
.progress .track, .progress .stop { display: none; }
.progress.indeterminate .active { width: 35%; animation: progress-slide 1.4s cubic-bezier(.4, 0, .2, 1) infinite; }
@keyframes progress-slide { from { inset-inline-start: -35%; } to { inset-inline-start: 100%; } }
.upload.dropping .seg { outline: 2px dashed var(--text-3); outline-offset: 6px; }

/* Dialog: an ivory panel with a hairline, 16 corners. */
dialog.dialog {
  width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 28px; border: 1px solid var(--border);
  border-radius: 16px; background: var(--bg); color: var(--text); box-shadow: var(--shadow);
}
dialog.dialog::backdrop { background: rgb(20 20 19 / .45); }
.dialog h2 { margin: 0 0 12px; color: var(--ink); font-size: 22px; line-height: 28px; font-weight: 650; letter-spacing: -.01em; }
.dialog p { margin: 0 0 14px; color: var(--text-2); font-size: 15px; line-height: 24px; }
.dialog form { margin: 0; }
.dialog .stack { margin: 8px 0 0; }
.dialog .outlined { margin-top: 8px; }
.dialog-actions { justify-content: flex-end; margin-top: 24px; }

/* Snackbar: ink with ivory text, 10 corners, bottom centre, a few seconds. */
.snackbar {
  position: fixed; z-index: 30; left: 50%; bottom: 24px; transform: translateX(-50%);
  max-width: min(560px, calc(100vw - 32px)); padding: 12px 18px; border-radius: 10px;
  background: var(--ink); color: var(--bg); font-size: 14px; line-height: 20px; box-shadow: var(--shadow);
  animation: snackbar 4s forwards;
}
@keyframes snackbar { 0% { opacity: 0; transform: translate(-50%, 8px); } 6% { opacity: 1; transform: translate(-50%, 0); } 90% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .snackbar { animation-duration: 6s; } }

/* ---- Notices (a decision, an appeal, the account waiting to go; a case for the admins): warm panels. ---- */
.notices { display: grid; gap: 12px; margin: 0 0 12px; }
.notice { padding: 20px; margin: 0 0 12px; border-radius: 16px; background: var(--surface); }
.notice-head { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; }
.notice-head .icon { color: var(--danger); }
.notice.reversed .notice-head .icon { color: var(--text-2); }
.notice-title { margin: 0; color: var(--ink); font-size: 16px; line-height: 24px; font-weight: 650; overflow-wrap: anywhere; }
.notice p { margin: 6px 0; font-size: 15px; overflow-wrap: anywhere; }
.notice .meta { color: var(--text-2); font-size: 13px; }
.notice .label { margin-top: 14px; color: var(--text-3); font: 12px/16px var(--label-font); letter-spacing: var(--label-track); text-transform: uppercase; }
.notice .status { margin-top: 14px; color: var(--ink); font-weight: 600; }
.notice .hint { margin: 8px 0; }
.notice .row-actions { margin-top: 12px; }
.reports { margin: 10px 0; padding-inline-start: 20px; font-size: 14px; }
.case { display: flex; align-items: center; gap: 14px; }
.case > div { flex: 1; min-width: 0; }
.case .meta { margin: 0; }

/* Nothing to show; the next part of a long list. */
.empty { margin: 72px 0; text-align: center; color: var(--text-2); font-size: 16px; }
.empty > .icon { display: block; width: 36px; height: 36px; margin: 0 auto 16px; color: var(--text-3); }
.empty p { margin: 0 0 18px; }
.narrow .empty { margin: 32px 0; }
.more { display: flex; justify-content: center; margin: 32px 0 0; }
.more .button .icon { width: 16px; height: 16px; }

/* ---- A step of its own (signing in, a refusal, a question): one centred column, its heading in the serif. A policy:
   a readable column. ---- */
.page.step { max-width: calc(560px + 2 * var(--side)); }
.page.doc { max-width: calc(760px + 2 * var(--side)); }
.sheet { margin: 56px 0 0; }
@media (max-width: 599px) { .sheet { margin-top: 32px; } }
.sheet h1 { margin: 0 0 20px; color: var(--ink); font: 400 36px/1.2 var(--serif); letter-spacing: -.01em; overflow-wrap: anywhere; text-wrap: balance; }
@media (max-width: 599px) { .sheet h1 { font-size: 28px; } .sheet-actions > .button { flex: 1 1 0; } }
.sheet p, .sheet li { margin: 0 0 14px; font-size: 16px; line-height: 1.65; overflow-wrap: anywhere; }
.sheet .facts { padding: 14px 16px; border-radius: 12px; background: var(--surface); color: var(--text-2); font-size: 14px; line-height: 22px; }
.sheet form { margin: 0; }
.sheet .check-row span { font-size: 14px; line-height: 22px; }
.sheet-actions { justify-content: flex-end; margin-top: 28px; }
.sheet.doc h1 { font: 600 44px/1.12 var(--sans); letter-spacing: -.02em; }
.sheet.doc h2 { margin: 48px 0 12px; color: var(--ink); font-size: 22px; line-height: 30px; font-weight: 650; letter-spacing: -.01em; }
.sheet.doc h3 { margin: 28px 0 8px; color: var(--ink); font-size: 17px; line-height: 26px; font-weight: 650; }
.sheet ul, .sheet ol { padding-inline-start: 22px; margin: 0 0 14px; }
.sheet hr { border: 0; border-top: 1px solid var(--border); margin: 32px 0; }
.sheet table { width: 100%; border-collapse: collapse; margin: 0 0 18px; font-size: 14px; line-height: 22px; }
.sheet td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--border); text-align: start; vertical-align: top; }
.sheet code { font: 13px var(--mono); }
.doc-langs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 32px; }
.chip {
  display: inline-flex; align-items: center; height: 32px; padding: 0 16px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--text-nav); font-size: 13px; text-decoration: none;
}
.chip:hover { background: var(--surface-2); }

/* ---- Footer: dark, the site and its notice, the destinations and the policies as hairline rows. ---- */
.site-foot { margin-top: 112px; background: var(--foot-bg); color: var(--foot-text); }
.foot-inner { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr); gap: 32px 48px; max-width: 1200px; margin: 0 auto; padding: 64px var(--side) 80px; }
.site-foot .brand { color: var(--foot-text); }
.site-foot .logo rect { fill: var(--foot-text); }
.site-foot .logo path { fill: var(--foot-bg); }
.foot-brand p { max-width: 42ch; margin: 20px 0 0; color: var(--foot-muted); font-size: 13px; line-height: 20px; }
.foot-col { display: flex; flex-direction: column; }
.foot-col a { padding: 12px 0; border-top: 1px solid var(--foot-border); color: var(--foot-muted); font-size: 14px; text-decoration: none; }
.foot-col a:hover { color: var(--foot-text); }
@media (max-width: 839px) { .foot-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px 24px; padding-top: 48px; padding-bottom: 56px; } .foot-brand { grid-column: 1 / -1; } .site-foot { margin-top: 80px; } }
/* A focused page's footer: one line under a hairline. */
.foot-slim { margin-top: 96px; border-top: 1px solid var(--border); }
.foot-slim-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; max-width: 1200px; margin: 0 auto; padding: 20px var(--side) 32px; color: var(--text-3); font-size: 13px; line-height: 20px; }
.foot-slim-inner span { margin-inline-end: auto; color: var(--text-2); font-weight: 650; }
.foot-slim-inner a { color: var(--text-2); text-decoration: none; }
.foot-slim-inner a:hover { color: var(--ink); text-decoration: underline; }

/* Touch: 44 targets around the small controls. */
@media (pointer: coarse) {
  .button.small, .pill, .icon-button, .chip, .select-btn, .seg-btn { position: relative; }
  .button.small::after, .pill::after, .chip::after { content: ""; position: absolute; inset: -6px 0; }
  .icon-button::after, .select-btn::after, .seg-btn::after { content: ""; position: absolute; inset: -4px 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; }
  .progress.indeterminate .active { animation-duration: 3s; }
}
