/*
  Airlock. Light only. Shares its design system with the Blobs, Locksmith and Network14 sites: tokens first,
  then base type, then components, then pages. Inter is self-hosted (fonts/), so nothing loads from other sites.
*/

@font-face { font-family: "Inter"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/inter-regular.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-style: normal; font-display: swap; src: url("fonts/inter-medium.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/inter-semibold.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-style: normal; font-display: swap; src: url("fonts/inter-bold.woff2") format("woff2"); }

:root {
  color-scheme: light;

  --bg: #ffffff;
  --bg-subtle: #f8f8fa;
  --bg-sunken: #f2f2f5;
  --text: #0b0b0f;
  --text-2: #43444d;
  --text-3: #6b6d77;
  --line: #e7e7ec;
  --line-strong: #d4d4db;
  --accent: #6a4fd0;
  --accent-soft: #f2efff;
  --ok: #1f9d55;
  --ok-soft: #eaf7ef;
  --warn: #a15c00;
  --warn-soft: #fff6e8;
  --closed: #b42318;
  --closed-soft: #fdf0ef;

  --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "Cascadia Mono", "Cascadia Code", Consolas, ui-monospace, monospace;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(16, 16, 24, 0.06);
  --shadow-window: 0 1px 1px rgba(16, 16, 24, 0.04), 0 8px 24px -8px rgba(16, 16, 24, 0.12), 0 32px 64px -24px rgba(40, 30, 90, 0.18);

  --page: 1180px;
  --gutter: 24px;
}

/* ----- base ----- */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg);
  color: var(--text-2);
  font: 400 16px/1.65 var(--font);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.app { background: var(--bg-subtle); font-size: 15px; line-height: 1.6; }
main { flex: 1; }

h1, h2, h3 { color: var(--text); margin: 0; font-weight: 600; text-wrap: balance; }
h1 { font-size: clamp(36px, 5.4vw, 60px); line-height: 1.04; letter-spacing: -0.035em; font-weight: 700; }
h2 { font-size: clamp(26px, 3.2vw, 36px); line-height: 1.12; letter-spacing: -0.025em; }
h3 { font-size: 17px; line-height: 1.35; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: inherit; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
strong { color: var(--text); font-weight: 600; }
code { font: 0.88em var(--mono); background: var(--bg-sunken); border-radius: 5px; padding: 0.12em 0.4em; color: var(--text); }
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.skip { position: absolute; left: 12px; top: -48px; z-index: 100; background: var(--text); color: #fff; padding: 8px 14px;
        border-radius: var(--radius-sm); text-decoration: none; font-weight: 500; }
.skip:focus { top: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.wrap { max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--text-3); }
.center { text-align: center; }

/* Holds the shared gradient the mark uses; takes no space. */
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ----- header ----- */

.top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 64px; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand svg { width: 28px; height: 28px; flex: none; }
.brand span { font-size: 21px; font-weight: 600; letter-spacing: -0.02em; margin-top: -2px; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--text-3); text-decoration: none; font-size: 14.5px; font-weight: 500; padding: 7px 12px; border-radius: var(--radius-sm); }
.nav a:hover { color: var(--text); background: var(--bg-sunken); }
.nav a[aria-current="page"] { color: var(--text); background: var(--bg-sunken); }
/* Only the nav's own button (Log in): the Sign out button in the user menu keeps its normal colours. */
.nav > .btn, .nav > .btn[aria-current="page"] { margin-left: 8px; color: #fff; background: var(--text); padding: 0 14px; }
.nav > .btn:hover { color: #fff; background: #26262e; }
.nav > .btn[aria-current="page"] { box-shadow: 0 0 0 3px rgba(106, 79, 208, 0.22); }

/* ----- signed in ----- */

.user-menu { position: relative; margin-left: 6px; }
.user-menu summary { list-style: none; cursor: pointer; border-radius: 50%; }
.user-menu summary::-webkit-details-marker { display: none; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 600;
          color: #1a1b22; background: linear-gradient(135deg, #9cc2ff, #c59cff); }
.avatar svg { width: 17px; height: 17px; }
.user-menu[open] .avatar { box-shadow: 0 0 0 3px rgba(106, 79, 208, 0.22); }
.user-pop { position: absolute; right: 0; top: calc(100% + 10px); z-index: 30; min-width: 240px; padding: 16px; display: grid; gap: 2px;
            background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-window); }
.user-pop strong { font-size: 14.5px; overflow-wrap: anywhere; }
.user-pop span { font-size: 13px; color: var(--text-3); overflow-wrap: anywhere; }
.user-pop .btn { width: 100%; margin-top: 12px; }

/* ----- buttons ----- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px;
  border-radius: var(--radius-sm);
  font: 500 15px/1 var(--font);
  text-decoration: none; white-space: nowrap; cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s, color 0.15s;
}
.btn svg { width: 16px; height: 16px; flex: none; }
.btn-primary { background: var(--text); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: #26262e; }
.btn-secondary { background: var(--bg); color: var(--text); border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.btn-secondary:hover { background: var(--bg-subtle); border-color: #c4c4cc; }
.btn-danger { background: var(--closed); color: #fff; box-shadow: var(--shadow-sm); }
.btn-danger:hover { background: #941c13; }
.btn-ghost-danger { background: transparent; color: var(--closed); }
.btn-ghost-danger:hover { background: var(--closed-soft); }
.btn-small { height: 34px; padding: 0 12px; font-size: 13.5px; }
.btn:disabled, .btn[aria-disabled="true"] { background: var(--bg-sunken); color: var(--text-3); border-color: transparent; box-shadow: none; cursor: not-allowed; }

/* ----- marketing sections ----- */

.section { padding: 96px 0; }
.section-alt { background: var(--bg-subtle); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.eyebrow { display: inline-block; color: var(--accent); font-size: 13px; font-weight: 600; letter-spacing: 0.06em;
           text-transform: uppercase; margin-bottom: 14px; }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head p { font-size: 17.5px; margin-top: 14px; color: var(--text-3); text-wrap: pretty; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

.page-head { padding: 80px 0 56px; border-bottom: 1px solid var(--line); background: var(--bg-subtle); }
.page-head p { font-size: 19px; color: var(--text-3); max-width: 620px; margin-top: 18px; text-wrap: pretty; }
.page-head h1 { font-size: clamp(34px, 4.6vw, 52px); }

/* ----- home ----- */

.hero { padding: 88px 0 96px; text-align: center; overflow: hidden; }
.hero .lead { font-size: clamp(17px, 2vw, 20px); color: var(--text-3); max-width: 640px; margin: 22px auto 0; text-wrap: pretty; }
.hero h1 { max-width: 18ch; margin: 0 auto; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero .actions { justify-content: center; margin-top: 34px; }
.hero .meta { margin-top: 18px; font-size: 14px; color: var(--text-3); display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; }
.hero .meta span { display: inline-flex; align-items: center; gap: 6px; }
.hero .meta svg { width: 15px; height: 15px; color: var(--ok); }
.hero-shot { margin: 64px auto 0; max-width: 820px; position: relative; text-align: left; }
.hero-shot::before {
  content: ""; position: absolute; inset: -60px -10% auto; height: 70%; z-index: -1;
  background: radial-gradient(60% 60% at 50% 40%, rgba(150, 120, 255, 0.16), transparent 70%);
}

/* A terminal in the same window frame Blobs uses for screenshots. */
.window { margin: 0; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--bg); overflow: hidden; box-shadow: var(--shadow-window); }
.window-bar { display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; border-bottom: 1px solid var(--line);
              background: var(--bg-subtle); font: 12px var(--mono); color: var(--text-3); }
.window-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.window-bar span { margin-left: 8px; }
.window pre { margin: 0; padding: 22px 24px; min-height: 186px; font: 13.5px/1.7 var(--mono); color: var(--text); overflow-x: auto; white-space: pre; }
.window pre code { background: none; padding: 0; font: inherit; }
.tok-muted { color: var(--text-3); }
.tok-string { color: var(--accent); }
.cursor-char { color: var(--accent); }

.stats { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden;
         grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); box-shadow: var(--shadow-sm); list-style: none; margin: 0; padding: 0; }
.stat { background: var(--bg); padding: 20px 22px; display: grid; gap: 2px; text-align: left; }
.stat-label { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 500; color: var(--text-3); }
.stat-label svg { width: 16px; height: 16px; color: var(--accent); }
.stat strong { font-size: 30px; line-height: 1.25; letter-spacing: -0.03em; font-weight: 700; margin-top: 6px; }
.stat strong.stat-small { font-size: 21px; line-height: 1.6; letter-spacing: -0.02em; }
.stat-sub { font-size: 13px; color: var(--text-3); }
.hero .stats { margin: 48px auto 0; max-width: 820px; }

.grid-3 { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg);
          overflow: hidden; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.tile { background: var(--bg); padding: 30px 28px; }
.tile h3 { margin: 16px 0 8px; }
.tile p { font-size: 15.5px; color: var(--text-3); }

.icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.icon svg { width: 21px; height: 21px; }

.steps { display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); counter-reset: step;
         list-style: none; margin: 0; padding: 0; }
.steps li { counter-increment: step; position: relative; padding-top: 52px; min-width: 0; }
.steps li::before {
  content: counter(step); position: absolute; top: 0; left: 0;
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line-strong); background: var(--bg); color: var(--text); font-weight: 600; font-size: 14px;
}
.steps h3 { margin-bottom: 8px; }
.steps p { font-size: 15.5px; color: var(--text-3); }
.steps .code-block { margin-top: 18px; }
/* Steps with code share rows across columns (title, text, code), so the code blocks line up whatever the text length. */
.steps:has(.code-block) li { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 0; }

.cta-band { text-align: center; }
.cta-band h2 { margin-bottom: 14px; }
.cta-band p { color: var(--text-3); font-size: 17.5px; }
.cta-band .actions { justify-content: center; margin-top: 30px; }

.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; list-style: none; margin: 0; padding: 0; }
.chips li { display: inline-flex; align-items: center; height: 40px; padding: 0 18px; border: 1px solid var(--line-strong); border-radius: 999px;
            background: var(--bg); color: var(--text); font-size: 15px; font-weight: 500; box-shadow: var(--shadow-sm); }

.code-block { border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; background: #fbfbfd; }
.code-block pre { margin: 0; padding: 14px 16px; font: 12.5px/1.65 var(--mono); color: var(--text); overflow-x: auto; }
.code-block pre code { background: none; padding: 0; font: inherit; }

/* ----- contact ----- */

.links { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.link-card { display: flex; align-items: center; gap: 16px; padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius-lg);
             background: var(--bg); box-shadow: var(--shadow-sm); text-decoration: none; color: var(--text);
             transition: border-color 0.15s, box-shadow 0.15s; }
.link-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-window); }
.link-card .text { flex: 1; min-width: 0; }
.link-card h3 { font-size: 16px; margin: 0; }
.link-card span { display: block; font-size: 14.5px; color: var(--text-3); overflow-wrap: anywhere; }
.link-card .go { width: 18px; height: 18px; color: var(--text-3); flex: none; transition: transform 0.15s, color 0.15s; }
.link-card:hover .go { color: var(--accent); transform: translate(2px, -2px); }
.note { margin-top: 24px; padding: 18px 20px; border-radius: var(--radius); background: var(--bg-subtle); border: 1px solid var(--line); font-size: 15px; }

/* ----- docs ----- */

.docs-shell { display: grid; gap: 48px; grid-template-columns: minmax(0, 1fr); padding-top: 48px; padding-bottom: 96px; }
@media (min-width: 900px) { .docs-shell { grid-template-columns: 230px minmax(0, 1fr); } .docs-sidebar { position: sticky; top: 96px; align-self: start; } }
.docs-group-label { font-size: 12.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); margin-bottom: 10px; padding-left: 12px; }
.docs-nav { display: grid; gap: 2px; }
.docs-nav a { display: block; padding: 7px 12px; border-radius: var(--radius-sm); color: var(--text-3); font-size: 14.5px; font-weight: 500; text-decoration: none; }
.docs-nav a:hover { color: var(--text); background: var(--bg-sunken); }
.docs-nav a.active { color: var(--accent); background: var(--accent-soft); }

.docs-content { max-width: 760px; min-width: 0; }
.docs-kicker { color: var(--accent); font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 12px; }
.docs-content h1 { font-size: clamp(32px, 4vw, 44px); }
.docs-intro { font-size: 18.5px; color: var(--text-3); margin-top: 16px; text-wrap: pretty; }
.docs-content h2 { font-size: 22px; letter-spacing: -0.015em; margin: 48px 0 14px; padding-top: 28px; border-top: 1px solid var(--line);
                   display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.docs-content p { margin: 14px 0; }
.docs-content ul { margin: 14px 0; padding-left: 22px; }
.docs-content li { margin-bottom: 8px; }
.docs-content li::marker { color: var(--text-3); }
.docs-content pre { margin: 16px 0; padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: #fbfbfd;
                    font: 13px/1.65 var(--mono); color: var(--text); overflow-x: auto; }
.docs-content pre code { background: none; padding: 0; font: inherit; }
.docs-content table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14.5px; border: 1px solid var(--line); border-radius: var(--radius);
                      overflow: hidden; display: block; overflow-x: auto; }
.docs-content th { text-align: left; font-size: 12.5px; font-weight: 600; color: var(--text-3); letter-spacing: 0.02em; padding: 10px 14px;
                   background: var(--bg-subtle); border-bottom: 1px solid var(--line); white-space: nowrap; }
.docs-content td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.docs-content tbody tr:last-child td { border-bottom: 0; }

.callout { margin: 20px 0; padding: 14px 18px; border-radius: var(--radius); font-size: 15px; background: var(--accent-soft);
           border: 1px solid #e3dcff; color: #4b36a6; }
.callout strong { color: inherit; }
.callout a { color: inherit; }
.callout code { background: rgba(106, 79, 208, 0.1); color: inherit; }

.method-tag { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 6px; font: 600 12px var(--mono); letter-spacing: 0.02em; }
.method-get { background: var(--ok-soft); color: #157a41; }
.method-post { background: var(--accent-soft); color: var(--accent); }
.method-put { background: var(--warn-soft); color: var(--warn); }
.method-delete { background: var(--closed-soft); color: var(--closed); }

.docs-pager { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); margin-top: 56px; }
.docs-pager a { display: grid; gap: 2px; padding: 16px 20px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--bg);
                box-shadow: var(--shadow-sm); text-decoration: none; color: var(--text); font-weight: 600; transition: border-color 0.15s, box-shadow 0.15s; }
.docs-pager a:hover { border-color: var(--line-strong); box-shadow: var(--shadow-window); }
.docs-pager .next { text-align: right; grid-column: -2; }
.docs-pager .label { font-size: 12.5px; font-weight: 500; color: var(--text-3); }

/* ----- app: page head and tabs ----- */

.app-head { background: var(--bg); border-bottom: 1px solid var(--line); padding: 40px 0 0; }
.app-head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.app-head h1 { font-size: clamp(26px, 3vw, 32px); line-height: 1.1; letter-spacing: -0.03em; }
.app-head .eyebrow { font-size: 12.5px; margin-bottom: 10px; }
.app-head p { margin-top: 12px; color: var(--text-3); font-size: 16px; max-width: 68ch; text-wrap: pretty; }
.app-head-flat { padding-bottom: 34px; }

.tabs { display: flex; gap: 4px; margin-top: 28px; overflow-x: auto; }
.tab { display: inline-flex; align-items: center; gap: 8px; padding: 12px 14px; border: 0; border-bottom: 2px solid transparent;
       background: none; font: 500 14.5px/1 var(--font); color: var(--text-3); cursor: pointer; white-space: nowrap; }
.tab svg { width: 16px; height: 16px; }
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.tab em { font-style: normal; font-size: 12px; font-weight: 600; color: var(--text-3); background: var(--bg-sunken); border-radius: 999px; padding: 2px 8px; }
.tab[aria-selected="true"] em { background: var(--accent-soft); color: var(--accent); }

.section-tight { padding: 28px 0 64px; }
.section-tight .wrap, .tab-panel { display: grid; gap: 20px; align-content: start; }

/* ----- app: cards, lists, tables ----- */

.list-card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 18px 20px 18px 24px; border-bottom: 1px solid var(--line); }
.list-head h2 { font-size: 17px; line-height: 1.3; letter-spacing: -0.015em; }
.list-head p { font-size: 13.5px; color: var(--text-3); margin-top: 2px; }
.list-scroll { overflow-x: auto; }

table.rows { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.rows th { text-align: left; font-size: 12.5px; font-weight: 600; color: var(--text-3); letter-spacing: 0.02em; padding: 10px 16px;
           background: var(--bg-subtle); border-bottom: 1px solid var(--line); white-space: nowrap; }
.rows td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.rows tbody tr:last-child td { border-bottom: 0; }
.rows th:first-child, .rows td:first-child { padding-left: 24px; }
.rows th:last-child, .rows td:last-child { padding-right: 20px; }
.rows tbody tr { transition: background-color 0.12s; }
.rows tbody tr:hover { background: var(--bg-subtle); }
.rows td strong { font-weight: 600; overflow-wrap: anywhere; }
.rows .sub { display: block; font-size: 13px; color: var(--text-3); margin-top: 1px; overflow-wrap: anywhere; }
.rows .when { color: var(--text-3); font-size: 13.5px; white-space: nowrap; }
.rows .row-actions { text-align: right; white-space: nowrap; }
.rows .row-actions .btn + .btn { margin-left: 6px; }
.rows code { font-size: 12.5px; }

.ips { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ips svg { width: 14px; height: 14px; color: var(--text-3); flex: none; }

.key-ref { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); }
.key-ref svg { width: 14px; height: 14px; color: var(--text-3); flex: none; }

.empty { text-align: center; padding: 56px 24px; }
.empty .icon { margin: 0 auto 14px; }
.empty h3 { font-size: 16px; }
.empty p { color: var(--text-3); margin: 6px 0 0; font-size: 14.5px; }

.list-foot { padding: 14px 20px; border-top: 1px solid var(--line); text-align: center; }

/* ----- status pills ----- */

.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px;
        font-size: 12.5px; font-weight: 600; white-space: nowrap; vertical-align: middle; background: var(--bg-sunken); color: var(--text-3); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-ok { background: var(--ok-soft); color: #157a41; }
.pill-failed { background: var(--closed-soft); color: var(--closed); }
.action-name { font: 500 13px var(--mono); color: var(--text); }

/* ----- app: filters ----- */

.filters { display: flex; flex-wrap: wrap; gap: 10px; padding: 14px 20px 14px 24px; border-bottom: 1px solid var(--line); background: var(--bg-subtle); }
.filters select { width: auto; min-width: 150px; }
.filters .search { flex: 1; min-width: 200px; position: relative; }
.filters .search svg { position: absolute; left: 11px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.filters .search input { padding-left: 34px; }
.filters input, .filters select { height: 38px; font-size: 14px; }
.filters .btn { height: 38px; }

/* ----- forms ----- */

.inline-form { padding: 22px 24px 24px; border-bottom: 1px solid var(--line); background: var(--bg-subtle); display: grid; gap: 16px; }
.inline-form h3 { font-size: 15px; }
.form-row { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.field { display: grid; gap: 6px; align-content: start; }
label, .label { font-size: 14px; font-weight: 600; color: var(--text); }
.hint { font-size: 13px; font-weight: 400; color: var(--text-3); }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; }

input[type="text"], input[type="email"], input[type="password"], input[type="number"], input:not([type]), select {
  width: 100%; height: 42px; font: 400 15px/1.4 var(--font); color: var(--text);
  background: var(--bg); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: 0 12px; box-shadow: inset 0 1px 1px rgba(16, 16, 24, 0.03);
  transition: border-color 0.15s, box-shadow 0.15s;
}
select { appearance: none; padding-right: 34px; cursor: pointer;
         background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b6d77' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 16px; }
input:hover, select:hover { border-color: #c4c4cc; }
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(106, 79, 208, 0.16); }
input::placeholder { color: #a3a4ad; }
input.mono { font-family: var(--mono); font-size: 13.5px; }

.form-error { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: var(--radius-sm); font-size: 14px;
              background: var(--closed-soft); color: var(--closed); text-align: left; }

/* ----- one-time reveal (new key, reset password) ----- */

.reveal { display: grid; gap: 12px; padding: 18px 20px; border-radius: var(--radius-lg); background: var(--ok-soft); border: 1px solid #bfe5cd; }
.reveal-head { display: flex; gap: 10px; align-items: flex-start; color: #157a41; font-size: 14.5px; }
.reveal-head svg { width: 19px; height: 19px; flex: none; margin-top: 2px; }
.reveal-head strong { color: inherit; }
.reveal code { display: block; padding: 12px 14px; background: var(--bg); border: 1px solid #bfe5cd; border-radius: var(--radius-sm);
               font-size: 13.5px; overflow-wrap: anywhere; user-select: all; }

/* ----- dialogs ----- */

.confirm { border: 0; padding: 26px 26px 22px; width: min(460px, 92vw); border-radius: var(--radius-lg); background: var(--bg);
           color: var(--text); box-shadow: var(--shadow-window); }
.confirm::backdrop { background: rgba(10, 10, 16, 0.5); backdrop-filter: blur(2px); }
.confirm h2 { font-size: 19px; margin: 0 0 10px; letter-spacing: -0.015em; }
.confirm p { margin: 0 0 20px; color: var(--text-3); font-size: 14.5px; line-height: 1.55; overflow-wrap: anywhere; }
.confirm .field { margin-bottom: 20px; }
.confirm .actions { justify-content: flex-end; gap: 10px; }

/* ----- toasts ----- */

.toast-container { position: fixed; right: 20px; bottom: 20px; z-index: 50; display: grid; gap: 10px; justify-items: end; }
.toast { display: flex; align-items: center; gap: 10px; max-width: min(420px, calc(100vw - 40px)); padding: 12px 16px; border-radius: var(--radius);
         background: var(--text); color: #fff; font-size: 14.5px; box-shadow: var(--shadow-window); animation: toast-in 0.18s ease-out;
         transition: opacity 0.2s, transform 0.2s; }
.toast::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #5fd38d; flex: none; }
.toast-error::before { background: #ff8a80; }
.toast-out { opacity: 0; transform: translateY(6px); }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } }

/* ----- login ----- */

/* The login fills the space between header and footer (main grows to it), with the card in the middle. */
main:has(> .login) { display: grid; }
.login { display: grid; place-content: center; justify-items: center; padding: 64px 18px; position: relative; background: var(--bg-subtle); }
.login::before { content: ""; position: absolute; inset: 0 0 auto; height: 60%; pointer-events: none;
                 background: radial-gradient(45% 60% at 50% 20%, rgba(150, 120, 255, 0.16), transparent 70%); }
.login-card { position: relative; width: min(440px, 100%); padding: 36px 34px 30px; background: var(--bg); border: 1px solid var(--line);
              border-radius: var(--radius-lg); box-shadow: var(--shadow-window); }
.login-mark svg { width: 48px; height: 48px; margin: 0 auto 20px; display: block; }
.login h1 { font-size: 26px; letter-spacing: -0.025em; text-align: center; }
.login-lead { margin: 10px auto 24px; color: var(--text-3); font-size: 15px; max-width: 34ch; text-align: center; text-wrap: pretty; }
.login-form { display: grid; gap: 16px; }
.login-btn { width: 100%; height: 46px; margin-top: 4px; }
.login-note { position: relative; margin-top: 18px; max-width: 440px; font-size: 13.5px; color: var(--text-3); text-align: center; text-wrap: pretty; }

/* ----- footer ----- */

.foot { border-top: 1px solid var(--line); background: var(--bg-subtle); }
.foot .wrap { padding-top: 56px; padding-bottom: 40px; }
.foot-grid { display: grid; gap: 32px; grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr)); }
.foot-brand p { color: var(--text-3); font-size: 14px; max-width: 42ch; margin-top: 14px; }
.foot h4 { margin: 0 0 12px; font-size: 13px; font-weight: 600; color: var(--text); letter-spacing: 0.02em; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.foot ul a { color: var(--text-3); text-decoration: none; font-size: 14.5px; }
.foot ul a:hover { color: var(--text); }
.foot-bottom .maker { color: var(--text); font-weight: 500; text-decoration-color: var(--line-strong); }
.foot-bottom .maker:hover { text-decoration-color: currentColor; }
.foot-bottom { margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap;
               justify-content: space-between; gap: 8px 24px; font-size: 13.5px; color: var(--text-3); }

/* ----- small screens ----- */

@media (max-width: 860px) {
  :root { --gutter: 16px; }
  .top .wrap { height: auto; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; row-gap: 6px; }
  .nav { flex-wrap: wrap; margin-left: -12px; }
  .nav > .btn { margin-left: 4px; }
  .section { padding: 64px 0; }
  .hero { padding: 56px 0 64px; }
  .hero-shot { margin-top: 44px; }
  .page-head { padding: 52px 0 40px; }
  .app-head { padding-top: 28px; }
  .rows { min-width: 720px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
}
