/* Zerobyte portal — one stylesheet for every page.
 *
 * Apple-inspired: a quiet grey page, white rounded surfaces, large Outfit
 * headlines, Inter for everything else. Each app brings one accent colour
 * (--app), used sparingly: its dot, its picture, its link.
 *
 * Both fonts are bundled (assets/fonts), so no request leaves the site and the
 * browser's default typeface is never what people see.
 */

@font-face {
  font-family: "Inter";
  src: url("fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Outfit";
  src: url("fonts/OutfitVariable.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}

:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --ink: #1d1d1f;
  --ink-2: #424245;
  --ink-3: #6e6e73;
  --ink-4: #a1a1a6;
  --rule: #d2d2d7;
  --rule-2: #e8e8ed;
  --blue: #0071e3;
  --blue-dark: #0061c5;
  --app: #0071e3;

  --ok-bg: #e6f5ea;   --ok-ink: #11602c;
  --warn-bg: #fff3d1; --warn-ink: #7a5300;
  --bad-bg: #fde7e7;  --bad-ink: #a11a1a;
  --idle-bg: #ececf0; --idle-ink: #515154;
  --info-bg: #e5f0fd; --info-ink: #0a4fa0;

  --r-xl: 28px; --r-lg: 22px; --r-md: 14px; --r-sm: 10px; --pill: 980px;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .04), 0 6px 20px rgba(0, 0, 0, .05);
  --shadow-2: 0 2px 4px rgba(0, 0, 0, .04), 0 18px 44px rgba(0, 0, 0, .09);
  --display: "Outfit", "Inter", sans-serif;
  --ui: "Inter", sans-serif;
  --wrap: 1120px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.55 var(--ui); letter-spacing: -.011em;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; }
img, svg { display: block; max-width: 100%; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -.028em; line-height: 1.06; margin: 0; color: var(--ink); }
p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--blue) 45%, transparent); outline-offset: 2px; border-radius: 6px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* ---------- buttons ---------- */
.btn {
  appearance: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 500 16px/1 var(--ui); letter-spacing: -.01em; padding: 13px 22px; border-radius: var(--pill);
  border: 1px solid var(--rule); background: var(--surface); color: var(--ink); text-decoration: none;
  transition: background .18s var(--ease), border-color .18s var(--ease), transform .18s var(--ease), box-shadow .18s var(--ease);
  white-space: nowrap;
}
.btn:hover { text-decoration: none; border-color: var(--ink-4); }
.btn:active { transform: scale(.98); }
.btn.pri { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.pri:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.btn.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.dark:hover { background: #000; }
.btn.sm { padding: 8px 15px; font-size: 14px; }
.btn.xs { padding: 6px 12px; font-size: 13px; }
.btn.danger { color: var(--bad-ink); }
.btn.danger:hover { border-color: var(--bad-ink); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.link-btn { appearance: none; border: 0; background: none; padding: 0; cursor: pointer; color: var(--blue); font: inherit; }
.link-btn:hover { text-decoration: underline; }
.arrow-link { font-weight: 500; display: inline-flex; align-items: center; gap: 4px; }
.arrow-link::after { content: "›"; font-size: 1.25em; line-height: 0; transition: transform .2s var(--ease); }
.arrow-link:hover::after { transform: translateX(3px); }

/* ---------- top bar ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(245, 245, 247, .78); backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.nav.scrolled { border-bottom-color: var(--rule-2); }
.nav-in { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font: 600 19px/1 var(--display); letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 26px; height: 26px; color: var(--ink); }
.nav-links { display: flex; align-items: center; gap: 22px; font-size: 14px; }
.nav-links > a:not(.btn) { color: var(--ink-2); }
.nav-links > a:not(.btn):hover { color: var(--ink); text-decoration: none; }

/* the phone menu: hidden on a big screen */
.nav-menu-btn { display: none; appearance: none; border: 1px solid var(--rule); background: var(--surface); border-radius: var(--pill);
  width: 38px; height: 34px; padding: 0; cursor: pointer; place-items: center; color: var(--ink); }
.nav-menu-btn svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2; stroke-linecap: round; fill: none; }
.nav-menu-btn[aria-expanded="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.nav-sheet { position: absolute; left: 0; right: 0; top: 100%; background: #fafafc;
  backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--rule-2); box-shadow: 0 18px 30px rgba(0, 0, 0, .08); }
.nav-sheet-in { padding: 8px 18px 18px; display: grid; }
.nav-sheet a, .nav-sheet .sheet-out { display: flex; align-items: center; gap: 10px; padding: 13px 4px; font: 500 17px/1.2 var(--ui);
  color: var(--ink); border-bottom: 1px solid var(--rule-2); text-decoration: none; background: none; border-left: 0; border-right: 0;
  border-top: 0; text-align: left; cursor: pointer; }
.nav-sheet .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--app); }
.nav-sheet .sheet-out { color: var(--bad-ink); border-bottom: 0; }
.sheet-label { font: 600 12px/1 var(--ui); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-4); margin: 18px 4px 4px; }

/* folds: a whole section behind one line (phones), or a small section behind a title (any screen) */
.fold-btn { display: none; }
details.fold-block { margin-top: 56px; }
details.fold-block > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font: 600 22px/1.2 var(--display); letter-spacing: -.02em; padding: 14px 0; border-top: 1px solid var(--rule); }
details.fold-block > summary::-webkit-details-marker { display: none; }
details.fold-block > summary::after, .fold-btn::after { content: ""; width: 9px; height: 9px; border-right: 2px solid var(--ink-3);
  border-bottom: 2px solid var(--ink-3); transform: rotate(45deg); transition: transform .2s var(--ease); margin-right: 6px; }
details.fold-block[open] > summary::after, .fold-btn[aria-expanded="true"]::after { transform: rotate(-135deg); }
details.fold-block > summary .muted { font: 400 15px/1 var(--ui); }

/* ---------- front page ---------- */
.hero { padding: 84px 0 56px; text-align: center; }
.eyebrow { font: 500 14px/1 var(--ui); letter-spacing: .02em; color: var(--ink-3); display: inline-flex; align-items: center; gap: 8px; }
.eyebrow .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--app); }
.hero h1 { font-size: clamp(40px, 7.2vw, 80px); max-width: 14ch; margin: 18px auto 0; text-wrap: balance; }
.hero .lede { font-size: clamp(18px, 2.1vw, 22px); line-height: 1.45; color: var(--ink-3); max-width: 40em; margin: 24px auto 0; text-wrap: balance; }
.cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 34px; }

.section { padding: 72px 0; }
.section-head { max-width: 40em; margin-bottom: 36px; }
.section-head h2 { font-size: clamp(30px, 4.2vw, 46px); }
.section-head p { color: var(--ink-3); margin-top: 14px; font-size: 19px; }

.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; }
.app-card {
  --tint: color-mix(in srgb, var(--app) 9%, #fff);
  grid-column: span 2; background: var(--surface); border-radius: var(--r-xl); overflow: hidden;
  display: flex; flex-direction: column; color: var(--ink); box-shadow: var(--shadow-1);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.app-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); text-decoration: none; }
.app-card.wide { grid-column: span 3; }
.app-card .art { background: var(--tint); padding: 26px 26px 0; }
.app-card .art svg { filter: drop-shadow(0 10px 22px rgba(0, 0, 0, .1)); border-radius: 18px 18px 0 0; margin-bottom: -20px; }
.app-card .body { padding: 28px 28px 30px; display: flex; flex-direction: column; gap: 10px; flex: 1; position: relative; background: var(--surface); }
.app-card h3 { font-size: 26px; }
.app-card .line { color: var(--ink-3); font-size: 16px; }
.app-card ul { list-style: none; margin: 6px 0 12px; padding: 0; display: grid; gap: 7px; font-size: 15px; color: var(--ink-2); }
.app-card li { padding-left: 20px; position: relative; }
.app-card li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 7px; height: 7px; border-radius: 50%; background: var(--app); opacity: .85; }
.app-card .arrow-link { margin-top: auto; color: var(--app); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: step; }
.step { background: var(--surface); border-radius: var(--r-lg); padding: 30px 28px; box-shadow: var(--shadow-1); counter-increment: step; }
.step::before { content: counter(step); display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  background: var(--ink); color: #fff; font: 600 17px/1 var(--display); margin-bottom: 20px; }
.step h3, .fact h3 { font-size: 22px; margin-bottom: 10px; }
.step p, .fact p { color: var(--ink-3); font-size: 16px; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; }
.fact { border-top: 1px solid var(--rule); padding-top: 22px; }

.cta-panel { background: var(--ink); color: #fff; border-radius: var(--r-xl); padding: 64px 32px; text-align: center; }
.cta-panel h2 { color: #fff; font-size: clamp(28px, 4vw, 44px); max-width: 18ch; margin: 0 auto; }
.cta-panel p { color: #a1a1a6; margin: 16px auto 0; max-width: 34em; }
.cta-panel .btn { margin-top: 30px; }

/* ---------- a feature page ---------- */
.f-hero { padding: 70px 0 30px; display: grid; grid-template-columns: 1.02fr 1fr; gap: 48px; align-items: center; }
.f-hero h1 { font-size: clamp(34px, 4.5vw, 54px); margin-top: 18px; text-wrap: balance; }
.section-head h2, .cta-panel h2 { text-wrap: balance; }
.f-hero .lede { font-size: 20px; line-height: 1.45; color: var(--ink-3); margin-top: 22px; max-width: 30em; }
.f-hero .cta-row { justify-content: flex-start; }
.f-art { background: color-mix(in srgb, var(--app) 10%, #fff); border-radius: var(--r-xl); padding: 34px; }
.f-art svg { filter: drop-shadow(0 16px 34px rgba(0, 0, 0, .13)); border-radius: 18px; }
.f-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.f-block { background: var(--surface); border-radius: var(--r-lg); padding: 30px 28px 32px; box-shadow: var(--shadow-1); }
.f-block > summary { list-style: none; pointer-events: none; }          /* a card, not a switch, on a big screen */
.f-block > summary::-webkit-details-marker { display: none; }
.f-block .n { font: 600 13px/1 var(--ui); color: var(--app); letter-spacing: .04em; }
.f-block h3 { font-size: 22px; margin: 14px 0 10px; }
.f-block p { color: var(--ink-3); font-size: 16px; }
.others { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.other { background: var(--surface); border-radius: var(--r-md); padding: 20px; color: var(--ink); box-shadow: var(--shadow-1); display: grid; gap: 6px;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.other:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow-2); }
.other strong { font: 600 18px/1.2 var(--display); display: flex; align-items: center; gap: 8px; }
.other strong::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--app); }
.other span { color: var(--ink-3); font-size: 14px; line-height: 1.4; }

/* ---------- the pictures ---------- */
svg .paper { fill: #fff; }
svg .ink { fill: #1d1d1f; }
svg .mute { fill: #b8b8bf; }
svg .faint { fill: #dcdce2; }
svg .chip { fill: #f2f2f5; }
svg .a { fill: var(--app); }
svg .a-soft { fill: var(--app); opacity: .14; }
svg .line { stroke: #e6e6eb; stroke-width: 1.5; fill: none; }
svg .arrow { stroke: #b8b8bf; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
svg .a-stroke { stroke: var(--app); stroke-width: 2.4; fill: none; stroke-linecap: round; stroke-linejoin: round; }
svg .a-stroke.thick { stroke-width: 3.2; }
svg .paper-stroke { stroke: #fff; stroke-width: 3; opacity: .85; stroke-linecap: round; }
svg .t text { font: 600 14px var(--ui); fill: #424245; letter-spacing: -.01em; }
svg .t text.on { fill: #fff; }

/* ---------- forms and cards ---------- */
.narrow { max-width: 440px; margin: 0 auto; padding: 64px 24px 88px; }
.narrow.wider { max-width: 620px; }
.card { background: var(--surface); border-radius: var(--r-lg); padding: 34px 32px; box-shadow: var(--shadow-1); }
.card h1 { font-size: 30px; }
.card .sub { color: var(--ink-3); font-size: 15px; margin-top: 8px; }
.field { display: block; margin-top: 18px; }
.field > span { display: block; font: 500 13px/1 var(--ui); color: var(--ink-2); margin-bottom: 8px; }
.field small { display: block; color: var(--ink-3); font-size: 12.5px; line-height: 1.4; margin-top: 6px; }
input[type=text], input[type=password], input[type=email], input[type=tel], input[type=date], input[type=number], textarea, select {
  width: 100%; font: 400 16px/1.3 var(--ui); color: var(--ink); background: var(--surface);
  border: 1px solid var(--rule); border-radius: var(--r-sm); padding: 12px 14px; transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 18%, transparent); }
.check { display: flex; align-items: center; gap: 10px; margin-top: 18px; font-size: 14.5px; color: var(--ink-2); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--blue); margin: 0; }
.checks { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 16px; margin-top: 8px; }
.checks .check { margin-top: 0; }
.form-foot { margin-top: 24px; display: grid; gap: 14px; }
.form-foot .btn { width: 100%; }
.err { color: var(--bad-ink); font-size: 14px; min-height: 1.2em; margin-top: 14px; }
.hint { color: var(--ink-3); font-size: 13.5px; line-height: 1.5; }
.center { text-align: center; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }   /* the field only robots fill in */

.notice { border-radius: var(--r-md); padding: 14px 18px; font-size: 15px; line-height: 1.5; margin-bottom: 18px; }
.notice.info { background: var(--info-bg); color: var(--info-ink); }
.notice.warn { background: var(--warn-bg); color: var(--warn-ink); }
.notice.bad { background: var(--bad-bg); color: var(--bad-ink); }
.notice.ok { background: var(--ok-bg); color: var(--ok-ink); }
.notice strong { font-weight: 600; }

.chip-s { display: inline-flex; align-items: center; gap: 6px; font: 500 12.5px/1 var(--ui); padding: 6px 10px; border-radius: var(--pill); white-space: nowrap;
  background: var(--idle-bg); color: var(--idle-ink); }
.chip-s::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.chip-s.ok { background: var(--ok-bg); color: var(--ok-ink); }
.chip-s.warn { background: var(--warn-bg); color: var(--warn-ink); }
.chip-s.bad { background: var(--bad-bg); color: var(--bad-ink); }
.chip-s.plain::before { display: none; }

/* ---------- my apps ---------- */
.page { padding-top: 44px; padding-bottom: 88px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.page-head h1 { font-size: clamp(30px, 4.4vw, 44px); }
.page-head .who { color: var(--ink-3); font-size: 15px; margin-top: 8px; }
.page-head .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.tile { background: var(--surface); border-radius: var(--r-lg); padding: 26px; box-shadow: var(--shadow-1); display: flex; flex-direction: column; gap: 12px; min-height: 210px;
  border-top: 4px solid var(--app); }
.tile.dim { border-top-color: var(--rule); }
.tile-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.tile h2 { font-size: 24px; }
.tile .line { color: var(--ink-3); font-size: 15px; }
.tile .plan { color: var(--ink-2); font-size: 14px; }
.tile-foot { margin-top: auto; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding-top: 8px; }
.tile .why { color: var(--ink-3); font-size: 13.5px; line-height: 1.45; }

.block { margin-top: 56px; }
.block > h2 { font-size: 28px; }
.block > .sub { color: var(--ink-3); font-size: 15.5px; margin: 10px 0 22px; max-width: 46em; }
.panel { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-1); overflow: hidden; }
.panel-pad { padding: 26px; }
.table-scroll { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; font-size: 15px; }
table.list th { text-align: left; font: 500 12.5px/1 var(--ui); color: var(--ink-3); letter-spacing: .02em; padding: 16px 18px; border-bottom: 1px solid var(--rule-2); white-space: nowrap; }
table.list td { padding: 14px 18px; border-bottom: 1px solid var(--rule-2); vertical-align: middle; }
table.list tr:last-child td { border-bottom: 0; }
table.list .name strong { font-weight: 600; display: block; }
table.list .name span { color: var(--ink-3); font-size: 13.5px; }
table.list .acts { text-align: right; white-space: nowrap; }
table.list .acts .btn + .btn { margin-left: 6px; }
table.list tr.off td { color: var(--ink-4); }
.row-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; align-items: end; }
.row-form .field { margin-top: 0; }
.row-form > .btn { justify-self: start; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 18px 26px; border-bottom: 1px solid var(--rule-2); }
.bar h3 { font-size: 19px; }
.muted { color: var(--ink-3); }
.small { font-size: 13.5px; }
.stack { display: grid; gap: 12px; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.mono { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: .92em; }

/* ---------- owner panel ---------- */
.co { border-bottom: 1px solid var(--rule-2); }
.co:last-child { border-bottom: 0; }
.co > summary { list-style: none; cursor: pointer; padding: 18px 26px; display: grid; grid-template-columns: minmax(180px, 1.1fr) 2.4fr auto; gap: 16px; align-items: center; }
.co > summary::-webkit-details-marker { display: none; }
.co > summary:hover { background: #fafafc; }
.co[open] > summary { background: #fafafc; }
.co .co-name strong { font: 600 18px/1.2 var(--display); display: block; }
.co .co-name span { color: var(--ink-3); font-size: 13.5px; }
.co-body { padding: 8px 26px 28px; display: grid; gap: 26px; }
.co-body h4 { font: 600 13px/1 var(--ui); letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 12px; }
.plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.plan-card { border: 1px solid var(--rule-2); border-radius: var(--r-md); padding: 18px; display: grid; gap: 12px; border-left: 4px solid var(--app); }
.plan-card.dim { border-left-color: var(--rule); background: #fafafc; }
.plan-card .spread strong { font: 600 17px/1.2 var(--display); }
.plan-card .two { display: grid; grid-template-columns: 1.3fr 1fr; gap: 10px; }
.plan-card .field { margin-top: 0; }
.plan-card .field > span { font-size: 12px; margin-bottom: 6px; }
.plan-card input { padding: 9px 11px; font-size: 14.5px; }
.status-row { display: flex; gap: 10px; flex-wrap: wrap; }
.req { padding: 18px 26px; border-bottom: 1px solid var(--rule-2); display: grid; gap: 6px; }
.req:last-child { border-bottom: 0; }
.req.done { opacity: .55; }

/* ---------- "are you sure?" ---------- */
dialog.ask { border: 0; border-radius: var(--r-lg); padding: 28px; max-width: 440px; width: calc(100% - 36px); box-shadow: var(--shadow-2); color: var(--ink); }
dialog.ask::backdrop { background: rgba(29, 29, 31, .38); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
dialog.ask h3 { font-size: 22px; }
dialog.ask p { color: var(--ink-3); font-size: 15.5px; margin-top: 12px; white-space: pre-line; }
.ask-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 26px; }
.btn.danger-fill { background: #c0272d; border-color: #c0272d; color: #fff; }
.btn.danger-fill:hover { background: #a61f25; border-color: #a61f25; }

/* ---------- the hand-over into an app ---------- */
body.handover { display: grid; place-items: center; min-height: 100vh; }
.handover-note { font: 500 19px/1.3 var(--display); color: var(--ink-3); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; } }

/* ---------- foot ---------- */
.foot { border-top: 1px solid var(--rule-2); padding: 40px 0 34px; margin-top: 40px; font-size: 14px; color: var(--ink-3); }
.foot-in { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
.foot-brand { display: grid; gap: 6px; align-content: start; }
.foot-brand strong { font: 600 17px/1 var(--display); color: var(--ink); }
.foot-links { display: grid; gap: 9px; align-content: start; }
.foot-links a { color: var(--ink-2); }
.foot-note { max-width: var(--wrap); margin: 30px auto 0; padding: 0 24px; font-size: 12.5px; color: var(--ink-4); }

/* ---------- arriving ---------- */
/* The words are visible by default and only START from invisible while the
   animation runs — so a browser that never runs it still shows the page. */
@media (prefers-reduced-motion: no-preference) {
  .rise > * { animation: rise .7s var(--ease) backwards; }
  .rise > *:nth-child(2) { animation-delay: .07s; }
  .rise > *:nth-child(3) { animation-delay: .14s; }
  .rise > *:nth-child(4) { animation-delay: .21s; }
  .rise > *:nth-child(5) { animation-delay: .28s; }
  .rise > *:nth-child(6) { animation-delay: .35s; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }

/* ---------- smaller screens ---------- */
@media (max-width: 980px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .app-card, .app-card.wide { grid-column: span 1; }
  .f-hero { grid-template-columns: 1fr; gap: 34px; padding-top: 48px; }
  .f-grid { grid-template-columns: repeat(2, 1fr); }
  .others { grid-template-columns: repeat(2, 1fr); }
  .co > summary { grid-template-columns: 1fr; gap: 10px; }
}
/* ---------- phones: only the important things in front ----------
   The top bar keeps the brand, the ONE main button and the menu. App cards
   become one-line rows, secondary sections fold behind a title, a person's
   actions and the owner's page buttons go behind "⋯". Nothing is removed:
   everything folded is one tap away. */
@media (max-width: 680px) {
  body { font-size: 16px; }
  .wrap, .nav-in, .foot-in, .foot-note { padding-left: 16px; padding-right: 16px; }
  .nav-in { height: 54px; }
  .nav-wide { display: none; }
  .nav-links { gap: 8px; }
  .nav-menu-btn { display: grid; }
  body.sheet-open { overflow: hidden; }

  /* front page */
  .hero { padding: 40px 0 22px; }
  .hero h1 { font-size: clamp(34px, 10vw, 44px); }
  .hero .lede { font-size: 17px; margin-top: 16px; }
  .cta-row { margin-top: 24px; }
  .section { padding: 26px 0; }
  .section-head { margin-bottom: 18px; }
  .section-head h2 { font-size: 26px; }
  .section-head p { font-size: 16px; }
  .bento { grid-template-columns: 1fr; gap: 10px; }
  .app-card, .app-card.wide { grid-column: auto; border-radius: var(--r-md); flex-direction: row; align-items: center; }
  .app-card .art, .app-card ul, .app-card .arrow-link { display: none; }
  .app-card .body { padding: 16px 16px 16px 18px; gap: 3px; border-left: 4px solid var(--app); }
  .app-card h3 { font-size: 19px; }
  .app-card .line { font-size: 14px; }
  .app-card::after { content: "›"; font: 400 26px/1 var(--ui); color: var(--ink-4); padding: 0 16px 0 4px; }
  .app-card:hover { transform: none; }

  /* folded sections: one tappable line until opened */
  .fold-btn { display: flex; width: 100%; align-items: center; justify-content: space-between; appearance: none; cursor: pointer;
    background: var(--surface); border: 0; border-radius: var(--r-md); padding: 16px 18px; box-shadow: var(--shadow-1);
    font: 600 17px/1.2 var(--display); color: var(--ink); text-align: left; }
  [data-fold]:not(.unfolded) > :not(.fold-btn) { display: none; }
  [data-fold].unfolded > .fold-btn { margin-bottom: 16px; }
  [data-fold] .section-head { display: none; }
  .steps { grid-template-columns: 1fr; gap: 10px; }
  .step { padding: 18px; display: grid; grid-template-columns: 34px 1fr; column-gap: 14px; }
  .step::before { width: 30px; height: 30px; font-size: 14px; margin: 0; grid-row: span 2; }
  .step h3 { font-size: 18px; margin-bottom: 4px; }
  .step p { font-size: 15px; }
  .facts { grid-template-columns: 1fr; gap: 18px; }
  .fact h3 { font-size: 19px; }
  .cta-panel { padding: 36px 20px; border-radius: var(--r-lg); }
  .cta-panel .btn { margin-top: 22px; }

  /* a feature page */
  .f-hero { padding-top: 28px; gap: 22px; }
  .f-hero .lede { font-size: 17px; margin-top: 14px; }
  .f-hero .cta-row { margin-top: 22px; }
  .f-art { padding: 16px; border-radius: var(--r-lg); }
  .f-grid { grid-template-columns: 1fr; gap: 8px; }
  .f-block { padding: 0; border-radius: var(--r-md); }
  .f-block > summary { pointer-events: auto; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 16px 18px; }
  .f-block > summary::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--ink-4);
    border-bottom: 2px solid var(--ink-4); transform: rotate(45deg); transition: transform .2s var(--ease); flex: none; }
  .f-block[open] > summary::after { transform: rotate(-135deg); }
  .f-block h3 { font-size: 17px; margin: 0; }
  .f-block p { padding: 0 18px 18px 50px; font-size: 15px; }
  .others { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 16px; gap: 10px; padding: 0 16px 6px; margin: 0 -16px; }
  .other { flex: 0 0 72%; scroll-snap-align: start; }

  /* forms */
  .card { padding: 26px 20px; }
  .narrow { padding: 24px 16px 56px; }
  .card h1 { font-size: 27px; }
  .checks { grid-template-columns: 1fr; }
  .foot { margin-top: 20px; padding-top: 28px; }
  .foot-in { grid-template-columns: 1fr 1fr; gap: 20px; }
  .foot-brand { grid-column: 1 / -1; }

  /* my apps */
  .page { padding-top: 24px; padding-bottom: 56px; }
  .page-head { margin-bottom: 18px; align-items: center; }
  .page-head h1 { font-size: 30px; }
  .page-head .who { font-size: 14px; margin-top: 4px; }
  .page-head .actions .phone-hide { display: none; }
  .page-head > details.menu { margin-left: auto; }
  .tiles { grid-template-columns: 1fr; gap: 10px; }
  .tile { min-height: 0; padding: 16px 18px; gap: 6px; border-top: 0; border-left: 4px solid var(--app); border-radius: var(--r-md); }
  .tile.dim { border-left-color: var(--rule); }
  .tile h2 { font-size: 20px; }
  .tile.mine .line { display: none; }
  .tile .line { font-size: 14px; }
  .tile .plan { font-size: 13.5px; }
  .tile-foot { padding-top: 4px; }
  .tile-foot .btn.pri { padding: 10px 22px; font-size: 15px; }
  .block { margin-top: 36px; }
  .block > h2 { font-size: 24px; }
  details.fold-block { margin-top: 32px; }
  details.fold-block > summary { font-size: 19px; }

  /* people: one card per person, actions behind ⋯ */
  table.list, table.list tbody, table.list tr, table.list td { display: block; width: 100%; }
  table.list tr.head { display: none; }
  table.list tr { position: relative; padding: 14px 16px; border-bottom: 1px solid var(--rule-2); }
  table.list tr:last-child { border-bottom: 0; }
  table.list td { padding: 3px 60px 3px 0; border: 0; }
  table.list td.acts { position: absolute; top: 12px; right: 12px; width: auto; padding: 0; }
  table.list tr.editor { padding-top: 0; }
  table.list tr.editor td { padding-right: 0; }
  .bar { padding: 14px 16px; }
  .panel-pad { padding: 18px 16px; }

  /* owner panel */
  .status-row#appStatus { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .co > summary { grid-template-columns: 1fr auto; gap: 8px; padding: 14px 16px; }
  .co > summary .co-apps { grid-column: 1 / -1; order: 3; }
  .co > summary .co-apps:empty, .co > summary .co-apps.all-calm { display: none; }
  .co .co-apps .calm { display: none; }
  .co-body { padding: 4px 16px 22px; gap: 22px; }
  .plans { grid-template-columns: 1fr; }
  .req { padding: 14px 16px; }
  .plan-card .two { grid-template-columns: 1fr 1fr; }
}

/* "⋯" menus: a person's actions, the owner's page buttons. On a big screen
   the buttons simply sit in a row and the ⋯ is not there. */
details.menu > summary { display: none; }
details.menu > .menu-list { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
@media (max-width: 680px) {
  details.menu { position: relative; }
  details.menu > summary { display: grid; place-items: center; list-style: none; cursor: pointer; width: 38px; height: 34px;
    border: 1px solid var(--rule); border-radius: var(--pill); background: var(--surface); font: 700 17px/1 var(--ui); color: var(--ink-2); }
  details.menu > summary::-webkit-details-marker { display: none; }
  details.menu[open] > summary { background: var(--ink); color: #fff; border-color: var(--ink); }
  details.menu > .menu-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 190px; display: grid; gap: 0;
    grid-template-columns: 1fr; justify-content: stretch;
    background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow-2); padding: 6px; border: 1px solid var(--rule-2); }
  details.menu > .menu-list .btn { border: 0; justify-content: flex-start; width: 100%; padding: 11px 12px; font-size: 15px; border-radius: 8px;
    background: none; margin: 0 !important; }
  details.menu > .menu-list .btn:hover { background: var(--bg); }
}
