/* AnyClaw Hub. Palette from anyclaw-logo-kit-lime: cream #F6F5F0, dark #252820, lime #DFF779. */
:root {
  --paper: #f6f5f0;
  --canvas: #ffffff;
  --surface: #ffffff;
  --ink: #252820;
  --muted: #7b7d73;
  --faint: #a2a69a;
  --line: #e2e3db;
  --line-strong: #d3d6cb;
  --soft: #edeee7;
  --soft-hover: #e2e4d9;
  --field: #fafbf7;
  --primary: #252820;
  --primary-hover: #3d4236;
  --on-primary: #ffffff;
  --exchange: #c4c7be;
  --ok: #5b8a1f;
  --danger: #b73535;
  --danger-soft: #fff0ef;
  --danger-solid: #b73535;
  --danger-hover: #9a2a2a;
  --raised: #ffffff;
  --notice-bg: #eef2df;
  --notice-ink: #3d4a1c;
  --warn-bg: #fbf2dc;
  --warn-ink: #6b5212;
  --warn-dot: #c27c0e;
  --focus: #99b743;
  --lime: #dff779;
  --tint: #f6f5f0;
  --check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.6 6.3 5 8.6l4.4-5' fill='none' stroke='%23def779' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  color-scheme: light dark;
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
    'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-synthesis: none;
  -webkit-text-size-adjust: 100%;
  color: var(--ink);
  background: var(--paper);
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121410;
    --canvas: #141612;
    --tint: #1d201b;
    --surface: #1b1e19;
    --ink: #eceee6;
    --muted: #9ca196;
    --faint: #6e7469;
    --line: #2c3029;
    --line-strong: #3b4036;
    --soft: #272b23;
    --soft-hover: #31362c;
    --field: #171914;
    --primary: #def779;
    --primary-hover: #cbe46b;
    --on-primary: #1b1e16;
    --exchange: #4d5348;
    --ok: #a5d36b;
    --danger: #ff8f84;
    --danger-soft: #3a1f1c;
    --danger-solid: #c8433a;
    --danger-hover: #b03a32;
    --raised: #23271f;
    --notice-bg: #252c18;
    --notice-ink: #dbe6bd;
    --warn-bg: #322a19;
    --warn-ink: #eed6a2;
    --warn-dot: #e8b04f;
    --check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.6 6.3 5 8.6l4.4-5' fill='none' stroke='%231b1e16' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; min-height: 100svh; line-height: 1.6; background: var(--paper); }
body.focus { background: var(--canvas); }
a { color: inherit; text-underline-offset: 3px; }
img { vertical-align: middle; }
p { margin: 0 0 12px; }
h1, h2 { font-weight: 650; letter-spacing: -0.02em; }
h1 { font-size: 28px; line-height: 1.3; margin: 0 0 20px; }
h2 { font-size: 17px; line-height: 1.4; margin: 0 0 8px; }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86em; padding: 1px 6px; border-radius: 6px; background: var(--soft);
  overflow-wrap: anywhere;
}
svg.icon { width: 18px; height: 18px; flex: none; }
a:focus-visible, button:focus-visible, summary:focus-visible, input[type='checkbox']:focus-visible {
  outline: 3px solid var(--focus); outline-offset: 3px;
}

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 76px; }
.shell .top { width: min(760px, calc(100% - 48px)); margin: 0 auto; border-bottom: 1px solid var(--line); }
.focus .top { padding: 0 32px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none; white-space: nowrap;
  font-size: 19px; font-weight: 650; letter-spacing: -0.035em;
}
.brand img { width: 32px; height: 32px; }
.top-end { display: flex; align-items: center; gap: 24px; min-width: 0; }
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav { font-size: 14px; font-weight: 550; color: var(--muted); text-decoration: none; white-space: nowrap; }
.nav:hover, .nav[aria-current] { color: var(--ink); }
.who { display: flex; align-items: center; gap: 10px; margin: 0; min-width: 0; font-size: 14px; color: var(--muted); }
.who-name { color: var(--ink); font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar {
  width: 28px; height: 28px; flex: none; display: inline-grid; place-items: center; border-radius: 50%;
  background: var(--primary); color: var(--on-primary); font-size: 12px; font-weight: 600; line-height: 1;
}
.shell main { width: min(760px, calc(100% - 48px)); margin: 0 auto; padding: 36px 0 72px; }
.focus main { padding: 0 0 56px; }

/* Text */
.small { font-size: 13px; }
.lede { color: var(--muted); font-size: 15px; line-height: 1.7; margin: 0 0 28px; }
.crumbs { margin: 0 0 18px; font-size: 14px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.chevron { flex: none; color: var(--faint); font-size: 22px; line-height: 1; transition: transform 0.15s; }
.badge {
  display: inline-flex; align-items: center; gap: 6px; flex: none; white-space: nowrap;
  font-size: 12px; font-weight: 550; color: var(--muted);
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.ok { color: var(--ok); }
.badge.warn { color: var(--warn-dot); }
.badge.bad { color: var(--danger); }
.badge.off { color: var(--faint); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips code { padding: 2px 8px; border-radius: 999px; font-size: 11.5px; color: var(--muted); background: var(--soft); }

/* Settings pages: sections of items, one account, key, mailbox or place per row */
.detail-head { display: flex; align-items: flex-start; gap: 16px; }
.detail-head img { width: 56px; height: 56px; flex: none; border-radius: 15px; border: 1px solid var(--line); background: #fff; }
.detail-head > div { flex: 1; min-width: 0; }
.detail-head h1 { margin: 2px 0 4px; font-size: 26px; }
.detail-head p { margin: 0; font-size: 14px; color: var(--muted); }
.detail-head .badge { margin-top: 10px; }
.detail-section { margin: 32px 0 0; }
.lede + .detail-section { margin-top: 0; }
.section-label { margin: 0 0 10px; font-size: 13px; font-weight: 600; letter-spacing: 0; color: var(--muted); }
.section-hint { margin: 10px 2px 0; font-size: 13px; line-height: 1.65; color: var(--muted); }
.items { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.items > * + * { border-top: 1px solid var(--line); }
.item {
  display: flex; align-items: center; gap: 14px; min-height: 68px; padding: 14px 18px;
  color: inherit; text-decoration: none;
}
a.item, summary.item { cursor: pointer; transition: background-color 0.15s; }
a.item:hover, summary.item:hover { background: var(--field); }
.items > :first-child, .items > :first-child > summary { border-radius: 15px 15px 0 0; }
.items > :last-child, .items > :last-child:not([open]) > summary { border-bottom-left-radius: 15px; border-bottom-right-radius: 15px; }
.items > :only-child:not(details), .items > :only-child:not([open]) > summary { border-radius: 15px; }
.tile {
  width: 40px; height: 40px; flex: none; display: grid; place-items: center;
  border-radius: 11px; background: var(--soft); color: var(--ink);
}
.tile.image { border: 1px solid var(--line); background: #fff; object-fit: cover; }
.tile.person { border-radius: 50%; background: var(--primary); color: var(--on-primary); font-size: 14px; font-weight: 600; }
.tile.initial { background: var(--primary); color: var(--on-primary); font-size: 17px; font-weight: 650; }
.tile.mark { border: 1px solid var(--line); background: #fff; }
.tile.mark img { width: 24px; height: 24px; filter: brightness(0); }
.tile.app { background: none; object-fit: cover; }
.glyph { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.item-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.item-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 15px; line-height: 1.4; }
.item-title strong { font-weight: 600; overflow-wrap: anywhere; }
.item-sub { font-size: 13px; line-height: 1.5; color: var(--muted); overflow-wrap: anywhere; }
.item-meta { font-size: 12px; line-height: 1.5; color: var(--faint); overflow-wrap: anywhere; }
.item-sub code { padding: 0; background: none; font-size: 12.5px; }
.item.add strong { font-weight: 550; }
.item.add .tile { background: none; border: 1.5px dashed var(--line-strong); color: var(--muted); }
.item.empty { min-height: 56px; font-size: 14px; color: var(--muted); }
.item.head { background: var(--field); }
.client-group + .client-group { margin-top: 16px; }
.tag {
  flex: none; padding: 1px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 550; color: var(--muted); background: var(--soft);
}
.item-details > summary { list-style: none; }
.item-details > summary::-webkit-details-marker { display: none; }
.item-details[open] > summary .chevron { transform: rotate(90deg); }
.item-details-body { padding: 0 18px 18px 72px; }
.item-details-body h3 { margin: 4px 0 8px; font-size: 12px; font-weight: 600; color: var(--muted); }
.item-details-body .chips + h3 { margin-top: 16px; }
.item-details-body .field-hint { margin: -2px 0 8px; }

/* The ⋯ menu of a row. While open, its summary covers the page, so a click outside closes it. */
.menu { position: relative; flex: none; }
.menu > summary {
  width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px;
  list-style: none; cursor: pointer; color: var(--muted);
}
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary:hover, .menu[open] > summary { background: var(--soft); color: var(--ink); }
.menu[open] > summary::before { content: ''; position: fixed; inset: 0; z-index: 20; cursor: default; }
.dots { width: 20px; height: 20px; fill: currentColor; }
.menu-list {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 21;
  width: max-content; min-width: 200px; max-width: min(300px, calc(100vw - 40px)); padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 14px 36px rgba(20, 22, 17, 0.16), 0 2px 6px rgba(20, 22, 17, 0.06);
}
.menu-list form { margin: 0; }
.menu-list hr { margin: 6px 4px; border: none; border-top: 1px solid var(--line); }
.menu-item {
  display: block; width: 100%; min-height: 0; padding: 9px 12px; border: none; border-radius: 8px;
  background: none; color: var(--ink); font-size: 14px; font-weight: 450; line-height: 1.45;
  text-align: left; text-decoration: none; list-style: none; cursor: pointer;
}
.menu-item:hover { background: var(--soft); }
.menu-item:active { transform: none; }
.menu-item::-webkit-details-marker { display: none; }
.menu-item.danger { color: var(--danger); }

/* Confirmation dialog for destructive actions: a popover, centred and dimmed behind. */
.dialog {
  width: min(400px, calc(100vw - 40px)); margin: auto; padding: 22px 24px 20px;
  border: 1px solid var(--line-strong); border-radius: 18px; background: var(--raised); color: var(--ink);
  box-shadow: 0 28px 70px rgba(20, 22, 17, 0.3);
}
.dialog::backdrop { background: rgba(20, 22, 17, 0.42); }
@media (prefers-color-scheme: dark) { .dialog::backdrop { background: rgba(0, 0, 0, 0.6); } }
.dialog h2 { margin: 0 0 8px; font-size: 17px; overflow-wrap: anywhere; }
.dialog p { margin: 0; font-size: 14px; line-height: 1.65; color: var(--muted); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.dialog-actions form { margin: 0; }
button.danger.solid { background: var(--danger-solid); border-color: var(--danger-solid); color: #fff; }
button.danger.solid:hover { background: var(--danger-hover); border-color: var(--danger-hover); }

/* 接入: one tab per client (radio buttons, no script), then that client's setup */
.connect { overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.tab-radio { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.tab-list {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 6px;
  background: var(--field); border-bottom: 1px solid var(--line);
}
.tab {
  flex-direction: row; align-items: center; justify-content: center; gap: 8px; min-width: 0;
  padding: 9px 10px; border-radius: 10px; cursor: pointer;
  font-size: 14px; font-weight: 550; color: var(--muted); transition: background-color 0.15s, color 0.15s;
}
.tab span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tab:hover { color: var(--ink); }
.tab-icon { width: 20px; height: 20px; flex: none; border-radius: 5px; }
.tab-icon.mono { filter: brightness(0); }
/* After the rule above, which would otherwise win: OpenAI's mark in the text colour. */
@media (prefers-color-scheme: dark) { .tab-icon.mono { filter: brightness(0) invert(1); } }
.tab-panel { display: none; padding: 18px 20px 20px; font-size: 14px; line-height: 1.7; }
.tab-panel h3 { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.tab-panel * + h3 { margin-top: 20px; }
.tab-panel p { margin: 0 0 8px; }
.tab-panel .button { margin-top: 4px; }
.tab-radio:nth-of-type(1):checked ~ .tab-panels > .tab-panel:nth-child(1),
.tab-radio:nth-of-type(2):checked ~ .tab-panels > .tab-panel:nth-child(2),
.tab-radio:nth-of-type(3):checked ~ .tab-panels > .tab-panel:nth-child(3),
.tab-radio:nth-of-type(4):checked ~ .tab-panels > .tab-panel:nth-child(4) { display: block; }
.tab-radio:nth-of-type(1):checked ~ .tab-list > .tab:nth-child(1),
.tab-radio:nth-of-type(2):checked ~ .tab-list > .tab:nth-child(2),
.tab-radio:nth-of-type(3):checked ~ .tab-list > .tab:nth-child(3),
.tab-radio:nth-of-type(4):checked ~ .tab-list > .tab:nth-child(4) {
  background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(20, 22, 17, 0.12);
}
.tab-radio:nth-of-type(1):focus-visible ~ .tab-list > .tab:nth-child(1),
.tab-radio:nth-of-type(2):focus-visible ~ .tab-list > .tab:nth-child(2),
.tab-radio:nth-of-type(3):focus-visible ~ .tab-list > .tab:nth-child(3),
.tab-radio:nth-of-type(4):focus-visible ~ .tab-list > .tab:nth-child(4) { outline: 3px solid var(--focus); outline-offset: -3px; }

/* 接入: copyable values and per-client setup steps */
.copy-buffer { position: fixed; top: 0; left: 0; opacity: 0; }
.command { display: flex; align-items: center; gap: 8px; margin: 6px 0 2px; }
.command code {
  flex: 1; min-width: 0; padding: 8px 10px; border-radius: 8px; font-size: 12.5px; line-height: 1.5;
  background: var(--field); border: 1px solid var(--line); overflow-wrap: anywhere;
}
.snippet { display: flex; align-items: flex-start; gap: 8px; margin: 6px 0 2px; }
.snippet pre {
  flex: 1; min-width: 0; margin: 0; padding: 8px 10px; border-radius: 8px; font-size: 12.5px; line-height: 1.5;
  background: var(--field); border: 1px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere;
}
.snippet pre code { padding: 0; background: none; font-size: inherit; }
.steps { margin: 0; padding-left: 20px; font-size: 14px; line-height: 1.7; }
.steps li + li { margin-top: 8px; }
.steps code { font-size: 12.5px; }
.steps .field-hint { display: block; margin-top: 2px; }
/* ChatGPT's last step: paste the plugin's link, get its package */
.package-form { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; }
.package-form input[type='text'] {
  flex: 1 1 240px; width: auto; min-width: 0; min-height: 40px; padding: 7px 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13.5px;
}
/* A short menu path such as 「⋯ → 上传新版本」 stays on one line. */
.keep { white-space: nowrap; }
.package-form button { flex: none; }

/* The public site (home, plugins): wider than the settings shell, on white, with few boxes */
.site { background: var(--canvas); }
.site .top, .site main, .site-foot { width: min(1120px, calc(100% - 80px)); margin: 0 auto; }
.site .top { border-bottom: 1px solid var(--line); }
.site-foot { padding: 26px 0 40px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.eyebrow { margin: 0; font-size: 11px; font-weight: 650; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 0 0 30px; }
.section-head h2 { margin: 0; font-size: 24px; letter-spacing: -0.03em; }
.section-head a, .section-head span { font-size: 13px; color: var(--muted); text-decoration: none; white-space: nowrap; }
.section-head a:hover { color: var(--ink); }

.home-hero { display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 40px; min-height: 520px; padding: 40px 0; }
.home-hero h1 { margin: 22px 0 20px; font-size: clamp(44px, 5.6vw, 72px); line-height: 1.17; letter-spacing: -0.045em; }
.home-lede { margin: 0; font-size: 17px; color: var(--muted); }
.home-cta { margin-top: 34px; min-height: 46px; padding: 11px 22px; }
.hero-art { width: 100%; max-width: 500px; height: auto; justify-self: end; overflow: visible; }
.art-dot { fill: var(--line-strong); }
.art-orbit { fill: none; stroke: var(--line); stroke-width: 1; }
.art-tile { fill: #fff; }
.art-edge { fill: none; stroke: #e2e3db; stroke-width: 1; }
.home-section { padding: 56px 0 64px; border-top: 1px solid var(--line); }
.capability-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 28px; }
.capability { display: flex; flex-direction: column; gap: 4px; color: inherit; text-decoration: none; }
.capability img {
  width: 52px; height: 52px; margin-bottom: 14px; border-radius: 14px; border: 1px solid var(--line);
  background: #fff; transition: transform 0.2s;
}
.capability:hover img { transform: translateY(-3px); }
.capability strong { font-size: 15px; font-weight: 600; line-height: 1.4; }
.capability span { font-size: 13px; line-height: 1.6; color: var(--muted); word-break: keep-all; }
.home-points { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; padding: 36px 0 56px; border-top: 1px solid var(--line); }
.home-points p { margin: 0; font-size: 13px; line-height: 1.7; color: var(--muted); }
.home-points strong { display: block; margin-bottom: 4px; font-size: 15px; font-weight: 600; color: var(--ink); }

.page-head { padding: 56px 0 36px; }
.page-head h1 { margin: 16px 0 12px; font-size: clamp(34px, 4.4vw, 48px); line-height: 1.2; letter-spacing: -0.04em; }
.page-lede { margin: 0; font-size: 16px; color: var(--muted); }
.plugin-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 40px; padding-bottom: 64px; }
.plugin-tile {
  display: flex; align-items: flex-start; gap: 18px; margin: 0 -18px; padding: 18px;
  border-radius: 18px; color: inherit; text-decoration: none; transition: background-color 0.15s;
}
.plugin-tile:hover { background: var(--tint); }
.plugin-tile img { width: 56px; height: 56px; flex: none; border-radius: 15px; border: 1px solid var(--line); background: #fff; }
.plugin-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.plugin-text strong { font-size: 16px; font-weight: 600; line-height: 1.4; }
.plugin-text span { font-size: 13px; line-height: 1.65; color: var(--muted); }
.plugin-text small { margin-top: 4px; font-size: 12px; color: var(--faint); }

.breadcrumbs { display: flex; align-items: center; gap: 8px; padding-top: 36px; font-size: 13px; color: var(--muted); }
.breadcrumbs a { color: inherit; text-decoration: none; }
.breadcrumbs a:hover { color: var(--ink); }
.plugin-head { display: flex; align-items: center; gap: 24px; padding: 28px 0 44px; }
.plugin-head img { width: 72px; height: 72px; flex: none; border-radius: 20px; border: 1px solid var(--line); background: #fff; }
.plugin-head > div { flex: 1; min-width: 0; }
.plugin-head h1 { margin: 0 0 6px; font-size: 32px; line-height: 1.3; letter-spacing: -0.035em; }
.plugin-head p { margin: 0; max-width: 620px; font-size: 15px; line-height: 1.7; color: var(--muted); }
.plugin-head .button { flex: none; }
.features { padding: 40px 0 64px; border-top: 1px solid var(--line); }
.feature-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; margin: 0; padding: 0; list-style: none; }
.feature-list li { display: flex; flex-direction: column; gap: 4px; padding: 18px 0; border-top: 1px solid var(--line); }
.feature-list strong { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; }
.feature-list em {
  padding: 1px 8px; border-radius: 999px; font-size: 11px; font-style: normal; font-weight: 550;
  color: var(--warn-ink); background: var(--warn-bg);
}
.feature-list span { font-size: 13px; line-height: 1.6; color: var(--muted); }
.feature-list code { align-self: flex-start; margin-top: 2px; padding: 0; background: none; font-size: 11.5px; color: var(--faint); }
.features-note { margin: 18px 0 0; font-size: 12px; color: var(--faint); }

/* Messages */
.flash, .notice {
  padding: 12px 16px; border-radius: 12px; margin: 0 0 16px; font-size: 14px; line-height: 1.65;
  background: var(--notice-bg); color: var(--notice-ink);
}
.flash.error { background: var(--danger-soft); color: var(--danger); }
.notice.warn {
  display: block; padding: 12px 14px; border-radius: 10px; font-size: 13px; line-height: 1.65;
  background: var(--warn-bg); color: var(--warn-ink);
}
.callout {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  margin: 0 0 12px; padding: 14px 16px; border-radius: 14px;
  font-size: 13px; line-height: 1.65; background: var(--warn-bg); color: var(--warn-ink);
}
.callout-body { flex: 1; min-width: 0; }
.callout-body p { margin: 0 0 8px; }
.callout-body p:last-child { margin: 0; }
.callout-body ol { margin: 8px 0 0; padding-left: 20px; }
.callout-body .chips code { background: var(--surface); color: var(--warn-ink); }
.callout-actions { flex: none; }
.callout-actions form { margin: 0; }

/* Forms: first-time setup on a settings page, or a form page of its own */
.form-card { padding: 22px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.form-card h2 { margin: 0 0 6px; font-size: 18px; }
.form-lede { margin: 0 0 16px; font-size: 14px; line-height: 1.7; color: var(--muted); }
.form-fields { display: flex; flex-direction: column; gap: 16px; }
.form-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.form-actions form { margin: 0; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; }
label.inline { flex-direction: row; align-items: center; gap: 8px; font-size: 14px; font-weight: 400; }
.field-hint { font-size: 12.5px; font-weight: 400; line-height: 1.6; color: var(--muted); }
.disclosure { font-size: 13px; }
.disclosure > summary { cursor: pointer; color: var(--muted); }
.disclosure > summary:hover { color: var(--ink); }
.disclosure .chips { margin: 10px 0 8px; }
input[type='text'], input[type='password'], input[type='email'], input[type='url'], select {
  font: inherit; font-size: 16px; font-weight: 400; width: 100%; min-height: 46px; padding: 10px 14px;
  border-radius: 10px; border: 1px solid var(--line-strong); background: var(--field); color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
input::placeholder { color: var(--faint); }
input:focus, select:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px rgba(222, 247, 121, 0.55); }
input[type='checkbox'] { accent-color: var(--primary); width: 16px; height: 16px; margin: 0; }
button, .button {
  font: inherit; font-size: 14px; font-weight: 550; line-height: 1.3; text-align: center; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 9px 18px; border: 1px solid transparent; border-radius: 10px; cursor: pointer;
  background: var(--primary); color: var(--on-primary);
  transition: background-color 0.15s, transform 0.15s;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
button:hover, .button:hover { background: var(--primary-hover); }
button:active, .button:active { transform: translateY(1px); }
button.secondary, .button.secondary { background: var(--soft); color: var(--ink); }
button.secondary:hover, .button.secondary:hover { background: var(--soft-hover); }
button.danger { background: var(--danger-soft); color: var(--danger); }
button.danger:hover { background: var(--danger-soft); border-color: var(--danger); }
button.link {
  min-height: 0; padding: 0; border: none; background: none; color: inherit; font-weight: 400;
  text-decoration: underline; text-decoration-color: var(--line-strong);
}
button.link:hover { color: var(--ink); text-decoration-color: currentColor; }
button.small, .button.small { min-height: 32px; padding: 5px 12px; font-size: 13px; border-radius: 8px; }
.pill { min-height: 48px; padding: 12px 26px; border-radius: 999px; font-size: 15px; }
.wide { width: 100%; }

/* Single-task pages: sign-in and messages */
.hero { width: min(420px, calc(100% - 40px)); margin: 56px auto 0; text-align: center; }
.hero-mark { display: block; width: 64px; height: 64px; margin: 0 auto 26px; }
.hero h1 { margin: 0 0 12px; }
.hero .steps { margin: 20px 0 0; padding-left: 20px; text-align: left; line-height: 1.75; }
.hero .steps li + li { margin-top: 8px; }

/* Consent */
.consent { width: min(440px, calc(100% - 40px)); margin: 40px auto 0; text-align: center; }
.consent-apps { display: flex; justify-content: center; align-items: flex-start; gap: 16px; margin: 0 0 26px; }
.consent-app { width: 136px; min-width: 0; display: flex; flex-direction: column; align-items: center; }
.app-icon {
  width: 76px; height: 76px; flex: none; display: grid; place-items: center; overflow: hidden;
  border-radius: 21px; border: 1px solid var(--line); background: #fff;
}
.app-icon img { width: 100%; height: 100%; object-fit: cover; }
.app-icon.mark img { width: 72%; height: 72%; object-fit: contain; filter: brightness(0); }
.app-icon.app { border: 0; background: none; }
.app-icon.initial { border-color: transparent; background: var(--primary); color: var(--on-primary); font-size: 30px; font-weight: 650; }
.consent-app strong { margin-top: 12px; font-size: 14px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.client-host {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 3px; max-width: 100%;
  font-size: 12px; line-height: 1.5; color: var(--muted); overflow-wrap: break-word;
}
.client-host span { min-width: 0; }
.client-host .icon { width: 13px; height: 13px; }
.client-host.verified circle { fill: var(--ok); }
.client-host.verified path { fill: none; stroke: var(--canvas); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.client-host.unverified { color: var(--warn-ink); }
.consent-exchange { width: 28px; height: 28px; flex: none; margin-top: 24px; color: var(--exchange); }
.consent-exchange path { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.consent h1 { font-size: 28px; line-height: 1.4; margin: 0 0 18px; overflow-wrap: anywhere; }
.consent-user {
  display: inline-flex; align-items: center; gap: 9px; max-width: 100%; padding: 4px 14px 4px 4px;
  border: 1px solid var(--line); border-radius: 999px; font-size: 14px; font-weight: 550;
}
.consent-user > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.consent form { margin: 0; }
.scopes-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 32px 0 8px;
  font-size: 13px; font-weight: 600; text-align: left;
}
.scopes-head span + span { font-size: 12px; font-weight: 400; color: var(--muted); }
.scopes {
  list-style: none; margin: 0; padding: 0; text-align: left; overflow: hidden;
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface);
}
.scopes li + li { border-top: 1px solid var(--line); }
.scope {
  flex-direction: row; align-items: flex-start; gap: 12px; padding: 14px 16px; cursor: pointer;
  font-size: 14px; font-weight: 400; line-height: 1.5;
}
.scope:has(input:disabled) { cursor: default; }
.scope input[type='checkbox'] {
  appearance: none; -webkit-appearance: none; flex: none; width: 20px; height: 20px; margin: 1px 0 0;
  border: 1.5px solid var(--line-strong); border-radius: 6px; cursor: inherit;
  background: var(--surface) no-repeat center / 12px 12px;
  transition: background-color 0.15s, border-color 0.15s;
}
.scope input[type='checkbox']:checked { background-color: var(--primary); border-color: var(--primary); background-image: var(--check); }
.scope input[type='checkbox']:disabled { opacity: 0.45; }
.scope-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.scope-text code { padding: 0; background: none; font-size: 11.5px; color: var(--faint); }
.tag {
  flex: none; margin-top: 1px; padding: 1px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 550; color: var(--muted); background: var(--soft);
}
.consent .notice { margin: 16px 0 0; font-size: 13px; text-align: left; overflow-wrap: anywhere; }
.consent-note { margin: 16px 0 0; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.consent-actions { display: flex; gap: 12px; margin-top: 24px; }
.consent-actions button { flex: 1; min-height: 50px; border-radius: 999px; font-size: 15px; }
.consent-foot { margin: 18px 0 0; font-size: 12px; color: var(--faint); }

@media (max-width: 900px) {
  .home-hero { grid-template-columns: 1fr; min-height: 0; gap: 16px; padding: 40px 0 36px; }
  .hero-art { justify-self: center; max-width: 440px; }
  .capability-row { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 36px; }
  .plugin-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .shell .top, .shell main { width: calc(100% - 32px); }
  /* Below 16px, iOS zooms in on the field. */
  .package-form input[type='text'] { font-size: 16px; }
  .site .top, .site main, .site-foot { width: calc(100% - 32px); }
  .home-hero { padding-top: 28px; }
  .home-hero h1 { margin: 16px 0 14px; font-size: 46px; }
  .home-lede { font-size: 15px; }
  .home-cta { margin-top: 24px; }
  .home-section { padding: 40px 0 44px; }
  .section-head { margin-bottom: 22px; }
  .section-head h2 { font-size: 21px; }
  .capability-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 20px; }
  .home-points { grid-template-columns: 1fr; gap: 18px; padding: 30px 0 40px; }
  .page-head { padding: 36px 0 20px; }
  .plugin-grid { grid-template-columns: 1fr; gap: 0; padding-bottom: 40px; }
  .plugin-tile { margin: 0 -14px; padding: 16px 14px; }
  .plugin-head { flex-wrap: wrap; align-items: flex-start; gap: 16px; padding: 22px 0 32px; }
  .plugin-head img { width: 60px; height: 60px; border-radius: 17px; }
  .plugin-head > div { flex-basis: calc(100% - 76px); }
  .plugin-head h1 { font-size: 26px; }
  .plugin-head .button { margin-left: 76px; }
  .features { padding: 28px 0 44px; }
  .feature-list { grid-template-columns: 1fr; }
  .top { height: 64px; }
  .focus .top { padding: 0 20px; }
  .who-name { display: none; }
  .shell main { padding-top: 24px; }
  .top-end { gap: 16px; }
  .nav-links { gap: 14px; }
  .detail-head { gap: 14px; }
  .detail-head img { width: 48px; height: 48px; border-radius: 13px; }
  .detail-head h1 { font-size: 22px; }
  .item { gap: 12px; padding: 12px 14px; }
  .item-details-body { padding: 0 14px 16px; }
  .form-card { padding: 18px; }
  .callout { flex-direction: column; gap: 10px; }
  .tab-list { grid-template-columns: repeat(2, 1fr); }
  .snippet { flex-direction: column; align-items: flex-end; }
  .snippet pre { align-self: stretch; }
  .tab-panel { padding: 16px; }
  .hero { margin-top: 32px; }
  .consent { margin-top: 12px; }
  .consent-apps { gap: 8px; margin-bottom: 22px; }
  .app-icon { width: 64px; height: 64px; border-radius: 18px; }
  .consent-exchange { width: 24px; height: 24px; margin-top: 20px; }
  .consent h1 { font-size: 24px; }
  .scopes-head { margin-top: 26px; }
}
@media (max-width: 360px) {
  .top:has(.who) .brand span { display: none; }
  .consent-app { width: 116px; }
  .consent-apps { gap: 4px; }
  .consent h1 { font-size: 22px; }
  .consent-actions { gap: 10px; }
}
