/* The kit: one look for every page.

   High fives, Coming up, Time off and Expenses set the standard (the rounded
   gradient header, soft cards, pill buttons, chips). The older pages were
   written against the plain base in hub.css: a bare h1, grey fine print, black
   buttons, tight tables. This file lifts that base, so a page that is only
   "crumbs, an h1, some cards and a table" comes out in the house look with no
   styling of its own. base.html loads it after hub.css and before
   time_off.css, whose to- pieces (cards with a tone stripe, chips, the answer
   buttons, the sticky bar) are the shared set for anything richer; the
   macros in templates/_kit.html draw the header, faces and empty states.

   Colour comes from the tokens in hub.css, and from --accent / --tint rather
   than --purple, so the day the hub's accent is repointed this file follows. */
:root { --accent-700:var(--purple-700); --r:14px; }

body { font-size:15px; }
a { text-underline-offset:2px; text-decoration-thickness:1px; }
.muted { color:var(--ink-600); font-size:.9rem; }
.why { color:var(--ink-600); font-size:.84rem; line-height:1.5; }
@media (max-width:600px) { .wrap { margin-top:18px; padding:0 14px; } }

/* The top bar and its phone layout live in topbar.css. */

/* ═══ the page header ═══
   A page's own h1 is its header band. `hero()` in _kit.html draws the fuller
   one (eyebrow, a line of explanation, numbers, links); this is the same band
   for a page that only has a title, so no page is left with a bare heading. */
.wrap > h1, .k-hero { position:relative; overflow:hidden; border-radius:18px; color:#fff;
  background:linear-gradient(120deg, var(--accent-700) 0%, var(--accent) 42%, var(--orbit-blue) 100%); }
.wrap > h1 { margin:6px 0 16px; padding:22px 26px; font-size:1.6rem; line-height:1.2; }
.wrap > h1 a { color:inherit; }
.k-hero { padding:22px 26px 18px; margin:6px 0 16px; }
.k-hero h1 { color:#fff; font-size:1.6rem; margin:.1rem 0 .4rem; }
.k-hero.big { padding:28px 30px 22px; } .k-hero.big h1 { font-size:2rem; }
.k-hero .to-sub { max-width:640px; margin:0; }
.k-hero .to-sub + .to-stats, .k-hero .to-sub + .to-nav, .k-hero .to-stats + .to-nav { margin-top:14px; }
.k-hero .to-sub b { font-weight:600; }
.k-hero .to-sub code { background:rgba(255,255,255,.18); color:inherit; }
.k-hero .to-sky { font-size:2.8rem; top:14px; right:26px; }
.k-hero.big .to-sky { font-size:3.6rem; top:18px; right:34px; }
.k-hero .to-sky span { display:inline-block; animation:to-sun 6s ease-in-out infinite; }
.k-hero:has(.to-sky) h1, .k-hero:has(.to-sky) .to-sub { padding-right:84px; }
.k-hero .to-stats a, .k-hero .to-nav a, .k-hero .to-sub a { color:inherit; }
.k-hero .to-stats .hot { background:var(--yellow); color:#241a00; font-weight:600; }
.k-hero .pill { background:rgba(255,255,255,.22); color:#fff; }
.k-face { flex:none; width:64px; height:64px; border-radius:50%; object-fit:cover; border:3px solid rgba(255,255,255,.55);
  display:grid; place-items:center; background:rgba(255,255,255,.2); color:#fff; font-family:var(--font-display); font-weight:600; font-size:1.4rem; }
.k-hero.who { display:flex; align-items:center; gap:18px; flex-wrap:wrap; }
.k-hero.who > div { flex:1; min-width:220px; }
@media (max-width:600px) {
  .wrap > h1 { padding:18px; font-size:1.4rem; border-radius:16px; }
  .k-hero, .k-hero.big { padding:20px 18px 18px; border-radius:16px; } .k-hero h1, .k-hero.big h1 { font-size:1.45rem; }
  .k-hero .to-sky, .k-hero.big .to-sky { font-size:2rem; right:10px; top:10px; opacity:.55; }
  .k-hero:has(.to-sky) h1 { padding-right:44px; } .k-hero:has(.to-sky) .to-sub { padding-right:0; }
  .k-face { width:52px; height:52px; font-size:1.1rem; }
}
/* An intro line written straight under the heading reads as part of it. */
.wrap > h1 + p.muted, .wrap > h1 + p.why { margin:-4px 2px 16px; font-size:.92rem; }

/* ═══ surfaces ═══ */
.card { border-radius:16px; }
/* A wide table scrolls inside its card instead of pushing the page sideways. */
.card:has(> table) { overflow-x:auto; }
.card h2 { font-size:1.05rem; margin:0 0 10px; }
.card h3 { font-size:.95rem; margin:14px 0 6px; }
.card > p:first-child, .card > h2:first-child { margin-top:0; }
.card > p:last-child, .card > table:last-child, .card > form:last-child { margin-bottom:0; }
.flash { border-radius:14px; border:1px solid var(--yellow); border-left:5px solid var(--yellow);
  background:linear-gradient(120deg, var(--yellow-100), var(--card) 80%); padding:12px 16px; color:var(--ink-900); }
.tile { border-radius:16px; padding:16px 18px 16px 22px; position:relative; overflow:hidden; box-shadow:var(--shadow); }
.tile::before { content:""; position:absolute; inset:0 auto 0 0; width:5px; background:var(--accent); opacity:.85; }
.tile:nth-child(4n+2)::before { background:var(--orbit-blue); } .tile:nth-child(4n+3)::before { background:var(--orbit-green); }
.tile:nth-child(4n+4)::before { background:var(--orbit-orange); }
.tile:hover { transform:translateY(-2px); box-shadow:0 10px 28px rgba(0,0,0,.08); }
.chip, .step { border-radius:14px; }
.chip b, .step b { font-size:1.35rem; }
.stepper { gap:8px; flex-wrap:wrap; } .stepper .step, .stepper .step:first-child, .stepper .step:last-child { border-radius:14px; }
.stepper .step + .step { border-left:1px solid var(--line); }
.stepper .step.now { border-top:1px solid var(--accent); border-color:var(--accent); background:var(--tint); }
.setup { border-radius:16px; border-left-width:5px; }

/* The old black banner on Today joins the family. */
.hero { border-radius:18px; padding:22px 26px;
  background:linear-gradient(120deg, var(--accent-700) 0%, var(--accent) 42%, var(--orbit-blue) 100%); }
.hero p { color:rgba(255,255,255,.9); } .hero .kpis span { color:rgba(255,255,255,.8); }
.hero .bolt { background:rgba(255,255,255,.2); }

/* ═══ buttons ═══
   One solid accent pill for the thing to do, a quiet outlined pill for the
   rest. `button.ghost` and `.btn` are the same quiet pill. */
button { background:var(--accent); color:#fff; padding:9px 20px; line-height:1.3; transition:transform .1s, background .12s, border-color .12s; }
button:where(:hover) { background:var(--accent-700); opacity:1; }
button:where(:active), .btn:active { transform:scale(.97); }
button:where([disabled]) { opacity:.45; cursor:not-allowed; }
button.ghost, .btn { background:var(--card); color:var(--ink-700); border:1px solid var(--line); border-radius:99px;
  padding:8px 18px; font-weight:600; font-size:.88rem; line-height:1.3; }
button.ghost:hover, .btn:hover { background:var(--card); border-color:var(--ink-400); }
button.link, button.link:hover { background:none; color:var(--accent); }
.btn.go, a.btn.go { background:var(--accent); border-color:var(--accent); color:#fff; }
.btn.go:hover { background:var(--accent-700); border-color:var(--accent-700); }

/* ═══ forms ═══ */
label { font-size:.86rem; color:var(--ink-600); margin:14px 0 5px; }
input, select, textarea { border-radius:10px; padding:10px 12px; }
textarea { line-height:1.45; }
/* The house rule makes every input full width: right for a text box, wrong
   for a tick, which it used to stretch across the card. */
input:where([type=checkbox], [type=radio]) { width:18px; height:18px; margin:0 8px 0 0; padding:0; flex:none; vertical-align:-4px;
  accent-color:var(--accent); cursor:pointer; }
input:where([type=file]) { padding:9px 10px; border-style:dashed; background:var(--paper-50); cursor:pointer; }
input[type=file]::file-selector-button { font:inherit; font-weight:600; font-size:.84rem; margin-right:10px; padding:6px 14px;
  border-radius:99px; border:1px solid var(--line); background:var(--card); color:var(--ink-700); cursor:pointer; }
fieldset { border:1px solid var(--line); border-radius:14px; padding:6px 16px 14px; margin:14px 0 0; }
legend { font-size:.82rem; color:var(--ink-600); padding:0 6px; }
details > summary { cursor:pointer; }
code { font-size:.86em; background:var(--paper-100); border-radius:6px; padding:1px 5px; }
pre code { background:none; padding:0; }

/* ═══ tables ═══ */
table { font-size:.92rem; }
th, td { padding:11px 10px; vertical-align:middle; }
th { padding-top:6px; padding-bottom:8px; }
td a { font-weight:600; text-decoration:none; }
td a:hover { text-decoration:underline; }
.card table tr:last-child td { border-bottom:0; }
td .av { margin-right:6px; }
@media (max-width:640px) {
  table.stack tr { border-radius:14px; padding:10px 14px; background:var(--card); }
  table.stack td { padding:5px 0; }
}

/* ═══ pills ═══ */
.pill { font-size:.74rem; padding:3px 10px; white-space:nowrap; }

/* ═══ nothing here yet ═══ */
.k-none { color:var(--muted); background:var(--card); border:1px dashed var(--line); border-radius:16px; padding:30px 22px;
  text-align:center; margin:0 0 16px; }
.k-none span { display:block; font-size:2.1rem; margin-bottom:6px; }
.k-none b { display:block; font-family:var(--font-display); font-size:1.08rem; color:var(--ink-900); }
.k-none p { margin:4px auto 0; max-width:460px; font-size:.9rem; }
.card .k-none { border:0; padding:18px 10px; margin:0; }

/* Small helpers pages kept reinventing inline. */
.k-row { display:flex; align-items:center; gap:10px 14px; flex-wrap:wrap; }
.k-row > button, .k-row > .btn { margin:0; }
.k-end { margin-left:auto; }
.k-links { display:flex; flex-wrap:wrap; gap:8px; margin:0 0 16px; }
.k-links a { border-radius:99px; padding:6px 14px; font-size:.86rem; font-weight:600; text-decoration:none;
  background:var(--card); border:1px solid var(--line); color:var(--ink-700); }
.k-links a:hover { border-color:var(--accent); color:var(--accent); }
.k-links a.on { background:var(--accent); border-color:var(--accent); color:#fff; }

@media (prefers-reduced-motion: reduce) { .k-hero .to-sky span { animation:none; } .tile:hover { transform:none; } }

/* ═══ signed out ═══
   Sign-in, the code step and the phone help have no menu, only the brand line
   base.html draws. They sit as one narrow column in the middle of the page,
   so the first thing anybody sees of the hub is not a form pinned to a corner. */
.wrap:has(> .brand) { max-width:460px; margin-top:7vh; }
.wrap:has(> .brand) > .brand { text-align:center; margin-bottom:14px; font-size:.8rem; }
.wrap:has(> .brand) > .brand .mk { height:30px; vertical-align:-8px; }
.wrap:has(> .brand) > h1 { text-align:center; padding:26px 22px; }
.wrap:has(> .brand) .card { padding:24px; }
.wrap:has(> .brand) .card button[type=submit] { width:100%; padding:12px 22px; font-size:.98rem; }
.wrap:has(> .brand) .card input:where(:not([type=checkbox], [type=radio], [type=hidden])) { padding:12px 14px; font-size:1rem; }
@media (max-width:600px) { .wrap:has(> .brand) { margin-top:22px; } }

/* ── a list of people is a grid of cards (Directory, Check-ins, Onboarding…) ──
   Built on time_off.css's .to-card. The name's link is stretched over the
   whole card so pressing anywhere opens the person; ticks and buttons sit
   above it. */
.k-people { display:grid; gap:14px; grid-template-columns:repeat(auto-fill, minmax(300px, 1fr)); }
.k-person { --tone:var(--orbit-green); }
.k-person.quiet { --tone:var(--ink-400); }
.k-person.nobank, .k-person.due { --tone:var(--orbit-orange); }
.k-person .to-top { align-items:flex-start; }
.k-person .to-name { flex-direction:column; align-items:flex-start; gap:1px; min-width:0; }
.k-person .k-open::after { content:""; position:absolute; inset:0; }
.k-person .pick, .k-person .to-acts, .k-person a:not(.k-open), .k-person form, .k-person details { position:relative; z-index:1; }
.k-person .pick { margin-top:16px; }
.k-person .to-acts { margin-top:auto; }
.k-person .to-acts .btn { margin:0; }
.k-role { font-size:.86rem; color:var(--muted); overflow-wrap:anywhere; }
.to-av.k-big { width:52px; height:52px; font-size:1rem; }
.k-person .to-name .k-role a { font:inherit; font-weight:600; color:var(--accent-700); }
