/* pages/app.css — the one look every page under "Sign in with email and password" wears.
   Design_AccountsAndPages.md §3.5 "Visual language" (Joe, 2026-09-14: entry boxes and
   instruction text must not look alike).

   It is the stylesheet of today's page, `public/admin.html`, in a file of its own so the
   landing page, the project page, Settings, the sign-in page and the change-your-password
   page cannot drift apart from one another. `public/admin.html` keeps its own copy inline
   and is untouched: with the switch off the app is byte for byte the one it was.

   Served at /app.css by server/index.js, and 404 while the switch is off, like every other
   page this build brings with it. */

:root {
  --primary: #1E3A5F; --on-primary: #FFFFFF; --secondary: #2563EB; --success: #059669;
  --bg: #F8FAFC; --fg: #0F172A; --muted-bg: #F1F5F9; --muted-fg: #5A6878;
  /* Two greys, and the difference is the whole point of the page's look:
     --border draws a box you may TYPE IN (and the outlined buttons you may press);
     --hairline draws the quiet lines that only group things — cards, table rules,
     dividers, and the edge of a folded "How this works". A LINE of instruction text
     gets neither: no border, no background of its own, grey, and smaller.
     --muted-fg was #64748B; darkened so grey text clears 4.5:1 on the muted
     background as well as on white. */
  --border: #8593A6; --hairline: #E2E8F0;
  --destructive: #DC2626; --ring: #2563EB; --amber: #B45309;
  --radius: 10px; --shadow: 0 1px 2px rgba(15,23,42,0.05);
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
}
* { box-sizing: border-box; }
body { font-family: 'Inter', system-ui, sans-serif; background: var(--bg); color: var(--fg); margin: 0; font-size: 16px; line-height: 1.5; }
.wrap { max-width: 56rem; margin: 0 auto; padding: var(--s5) var(--s4) 7rem; }
h1 { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.01em; margin: 0; }
h2 { font-size: 1.02rem; font-weight: 600; margin: 0; }
p { margin: 0; }

/* Anything you can click: a hand, and something visibly changes under the mouse. */
button, summary, [role="button"] { cursor: pointer; }
button { font: inherit; border: 0; border-radius: 8px; transition: background 150ms ease, color 150ms ease, border-color 150ms ease, box-shadow 150ms ease, opacity 150ms ease; }
button:focus-visible, summary:focus-visible, a:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
/* Every button you press to DO something is at least a finger tall. .btn-ghost is left
   out on purpose: it is a quiet text button — Sign out, Remove, and one that sits inside
   a sentence — and a 44-pixel box in the middle of a line of prose would push the line
   apart. It reads as a link, and it is sized like one. */
.btn, .btn-outline, .btn-icon, .voicebtn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem; }
.btn { background: var(--primary); color: var(--on-primary); padding: 0.55rem 1.1rem; font-weight: 600; }
.btn:hover { background: #16304F; }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn.saved { background: var(--success); }
.btn-outline { background: #fff; color: var(--fg); border: 1px solid var(--border); padding: 0.5rem 0.9rem; font-weight: 500; }
.btn-outline:hover { background: var(--muted-bg); border-color: var(--fg); }
.btn-ghost { background: none; color: var(--muted-fg); padding: 0.3rem 0.6rem; font-size: 0.85rem; }
.btn-ghost:hover { color: var(--fg); background: var(--muted-bg); }
.btn-icon { background: #fff; color: var(--fg); border: 1px solid var(--border); padding: 0.35rem 0.7rem; font-size: 0.85rem; font-weight: 500; }
.btn-icon:hover { background: var(--muted-bg); border-color: var(--fg); }
.btn-icon:disabled { opacity: 0.4; cursor: default; }
.btn-icon svg { width: 14px; height: 14px; }
/* Something that destroys: outlined in red, and set well apart from the button beside
   it, so it is never the one hit by mistake. The gap is put on buttons only — a plain
   piece of text marked .danger must not be shoved sideways — and it is repeated for the
   table-cell case, whose own rule is the more specific of the two. */
.danger { color: var(--destructive); border-color: var(--destructive); }
.danger:hover { background: #FEF2F2; color: var(--destructive); border-color: var(--destructive); }
button.danger, td.actions button + button.danger { margin-left: var(--s5); }

/* ---- Entry boxes: this is where you type ----------------------------------------
   One clear box, white inside, the same in every card here and on the live-call and
   cadence pages. No line of text to read ever gets this look. */
/* A tick box, a radio and a slider are controls of another kind, not boxes you type in,
   so they are kept OUT of this rule rather than styled and then reset — a reset leaves
   the padding, the border and the background behind, which is what made them render
   oddly before. They keep the look the browser gives them. */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), textarea, select {
  width: 100%; min-height: 44px; padding: 0.6rem 0.7rem;
  border: 1px solid var(--border); border-radius: 8px; font: inherit;
  background: #fff; color: var(--fg);
  transition: border-color 150ms ease;
}
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):hover:enabled,
textarea:hover:enabled, select:hover:enabled { border-color: var(--fg); }
input:focus, textarea:focus, select:focus { border-color: var(--ring); outline: 2px solid var(--ring); outline-offset: 1px; }
select { cursor: pointer; }
/* Tick boxes and sliders are controls, not boxes to type in. */
input[type="checkbox"], input[type="radio"], input[type="range"] { cursor: pointer; }
textarea { min-height: 11rem; resize: vertical; line-height: 1.55; }
label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--fg); margin-bottom: var(--s1); }

/* ---- Instruction text: this is only for reading -----------------------------------
   No box, no border, grey, one step smaller than what you type, and always the same
   distance under the heading or the box it explains. */
.sub, .help { color: var(--muted-fg); font-size: 0.9rem; border: 0; background: none; }
.help { display: block; margin-top: var(--s2); }
.card-head + .sub, #peopleBody > .sub:first-child { display: block; margin-bottom: var(--s4); }

.card { background: #fff; border: 1px solid var(--hairline); border-radius: var(--radius); box-shadow: var(--shadow); padding: var(--s5); margin-top: var(--s5); }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s3); }

details.how { margin-top: var(--s3); border: 1px solid var(--hairline); border-radius: 8px; background: var(--muted-bg); font-size: 0.85rem; color: #334155; }
details.how summary { cursor: pointer; padding: 0.75rem 0.85rem; font-weight: 600; color: var(--primary); list-style-position: inside; }
details.how summary:hover { color: var(--fg); }
details.how .body { padding: 0 1rem 0.8rem; line-height: 1.55; }
details.how ol { margin: 0.3rem 0 0; padding-left: 1.2rem; }
details.how li { margin-top: 0.25rem; }

.topbar { display: flex; align-items: center; justify-content: space-between; }
.brand { font-weight: 700; color: var(--primary); font-size: 1.1rem; letter-spacing: -0.01em; }

.proj-head { display: flex; align-items: center; gap: var(--s3); margin-top: var(--s5); flex-wrap: wrap; }
.proj-head h1 { font-size: 1.6rem; }
.proj-head .spacer { flex: 1; }

.grid { display: flex; gap: var(--s3); align-items: flex-end; flex-wrap: wrap; }
.grid > div { flex: 1; min-width: 10rem; }
/* A column that should be only as wide as what is in it. `flex: 0` means `0 1 0%`,
   which collapsed the file box to nothing and pushed it off the card; `0 0 auto` lets
   it be its own width, so the box you choose a file in is a box you can see. */
.grid > .fit { flex: 0 0 auto; min-width: 0; }

table { width: 100%; border-collapse: collapse; font-size: 0.9rem; margin-top: var(--s4); }
th { text-align: left; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted-fg); font-weight: 600; padding: 0.45rem 0.6rem; border-bottom: 1px solid var(--hairline); }
td { text-align: left; padding: 0.55rem 0.6rem; border-bottom: 1px solid var(--hairline); vertical-align: middle; }
td.actions { white-space: nowrap; text-align: right; }
td.actions button + button { margin-left: var(--s2); }

.statusline { display: flex; align-items: center; gap: var(--s3); margin-top: var(--s3); min-height: 1.4rem; flex-wrap: wrap; }
.ok { color: var(--success); font-weight: 600; font-size: 0.88rem; }
.err { color: var(--destructive); font-weight: 600; font-size: 0.88rem; }
.warn { color: var(--amber); font-weight: 600; font-size: 0.88rem; }
.meta { color: var(--muted-fg); font-size: 0.82rem; }

.linkbox { background: var(--muted-bg); border: 1px solid var(--hairline); border-radius: 8px; padding: var(--s3) var(--s4); font-size: 0.85rem; word-break: break-all; margin-top: var(--s3); }
.linkbox b { display: block; margin-bottom: var(--s1); }
.linkbox .acts { margin-top: var(--s2); }
.linkbox .acts button + button { margin-left: var(--s2); }

.section h3 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; margin: var(--s4) 0 var(--s2); color: var(--primary); }
.item { border: 1px solid var(--hairline); border-radius: 8px; padding: var(--s3) var(--s4); margin-bottom: var(--s2); font-size: 0.88rem; display: flex; gap: var(--s3); align-items: flex-start; background: #fff; }
.item.wrong { opacity: 0.5; text-decoration: line-through; }
.item pre { margin: 0; white-space: pre-wrap; flex: 1; font: inherit; }
.item .right { text-align: right; }
#raw { display: none; white-space: pre-wrap; background: var(--muted-bg); padding: var(--s4); border-radius: 8px; font-size: 0.75rem; overflow-x: auto; margin-top: var(--s3); }

.empty { color: var(--muted-fg); font-size: 0.9rem; padding: var(--s4) 0; }

/* feature switches */
.feat { display: flex; align-items: flex-start; gap: var(--s4); padding: var(--s4) 0; border-top: 1px solid var(--hairline); }
.feat:first-child { border-top: 0; padding-top: var(--s2); }
.feat .t { flex: 1; min-width: 0; }
.feat .t b { font-size: 0.95rem; }
.feat .t p { margin-top: var(--s1); }
.feat .c { display: flex; align-items: center; gap: var(--s3); }
.feat .st { font-size: 0.82rem; font-weight: 600; color: var(--muted-fg); width: 5.2rem; text-align: right; }
.feat .st.on { color: var(--success); }
.feat .st.bad { color: var(--destructive); }
.switch { width: 44px; height: 26px; border-radius: 13px; background: #CBD5E1; position: relative; padding: 0; flex: none; }
.switch[aria-checked="true"] { background: var(--success); }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(15,23,42,0.3); transition: transform 150ms ease; }
.switch[aria-checked="true"]::after { transform: translateX(18px); }
.switch:disabled { opacity: 0.5; cursor: default; }

/* sign-in */
#login { max-width: 24rem; margin: 16vh auto 0; padding: 0 var(--s4); }
#login .brand { font-size: 1.9rem; display: block; margin-bottom: var(--s1); }
#login .sub { margin-bottom: var(--s5); }
#login button.btn { width: 100%; margin-top: var(--s3); padding: 0.7rem; }
#login details { margin-top: var(--s5); font-size: 0.85rem; color: var(--muted-fg); }
#login summary { cursor: pointer; color: var(--secondary); }
#login ol { padding-left: 1.2rem; }

/* first-run project creation */
#firstRun { max-width: 30rem; margin: 10vh auto 0; padding: 0 var(--s4); display: none; }
#firstRun .card { padding: var(--s6); }
#firstRun h1 { font-size: 1.4rem; margin-bottom: var(--s2); }

#main { display: none; }

/* toasts */
#toasts { position: fixed; top: var(--s4); right: var(--s4); display: flex; flex-direction: column; gap: var(--s2); z-index: 50; }
.toast { background: var(--fg); color: #fff; border-radius: 8px; padding: 0.6rem 1rem; font-size: 0.88rem; box-shadow: 0 4px 12px rgba(15,23,42,0.25); opacity: 0; transform: translateY(-6px); transition: opacity 200ms ease, transform 200ms ease; }
.toast.show { opacity: 1; transform: none; }
.toast.success { background: var(--success); }
.toast.error { background: var(--destructive); }

.corner { position: fixed; bottom: var(--s3); right: var(--s3); }
.lockbar { background: #FFFBEB; border: 1px solid #FDE68A; color: #92400E; border-radius: 8px; padding: var(--s3) var(--s4); font-size: 0.88rem; margin-top: var(--s4); }
.lockbar a { color: #92400E; }
.lockedbody { opacity: 0.45; pointer-events: none; }
.voicebtn { background: #fff; color: var(--fg); border: 1px solid var(--border); padding: 0.5rem 1.1rem; font-weight: 600; }
.voicebtn:hover { background: var(--muted-bg); border-color: var(--fg); }
.voicebtn.on { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.btn.start { background: var(--success); }
.btn.start:hover { background: #047857; }
.btn.start:disabled { background: var(--success); }
footer { margin-top: var(--s7); color: var(--muted-fg); font-size: 0.78rem; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---- the landing page and the project page ------------------------------------------
   Only what those two need on top of the look above. */

/* The breadcrumb, under the top bar: where you are, and the way back. */
.crumbs { margin-top: var(--s3); font-size: 0.9rem; color: var(--muted-fg); }
.crumbs a { color: var(--secondary); }

/* The project list. A whole row is a link to that project. */
.rowlink { color: inherit; text-decoration: none; font-weight: 600; }
.rowlink:hover { color: var(--secondary); text-decoration: underline; }
.pill { display: inline-block; font-size: 0.75rem; font-weight: 600; padding: 0.15rem 0.5rem; border-radius: 999px; background: var(--muted-bg); color: var(--muted-fg); }
.pill.setting-up { background: #FFFBEB; color: #92400E; }
.pill.archived { background: var(--muted-bg); color: var(--muted-fg); }

/* The guided New project card: three numbered steps, one shown at a time. */
.step { border-top: 1px solid var(--hairline); padding-top: var(--s4); margin-top: var(--s4); }
.step:first-of-type { border-top: 0; }
.stepno { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--primary); font-weight: 700; }
.step h3 { font-size: 1rem; margin: var(--s1) 0 var(--s2); }
.step[hidden] { display: none; }

/* The foot of the project page: the two things that close a project, well away from
   everything else and outlined in red. */
.footactions { display: flex; justify-content: flex-end; gap: var(--s5); margin-top: var(--s6); flex-wrap: wrap; }

/* An archived project reads as a record: it can be seen and exported, never changed. */
.frozen { background: var(--muted-bg); border: 1px solid var(--hairline); color: var(--fg); border-radius: 8px; padding: var(--s3) var(--s4); font-size: 0.9rem; margin-top: var(--s4); }
