:root {
  --bg: #f6f7f9; --card: #fff; --text: #1a1d23; --muted: #667085; --line: #e4e7ec;
  --accent: #2f5bea; --accent-text: #fff; --ok: #12805c; --ok-bg: #e6f4ee; --warn: #9a6200; --warn-bg: #fdf3e1;
  --bad: #c02d2d; --bad-bg: #fbeaea; --run: #2f5bea; --run-bg: #e9eefd; --code: #f2f4f7;
  color-scheme: light;
}
/* Dark: chosen (data-theme="dark", theme.js), or the device's setting when nothing else was chosen (PL-143). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111317; --card: #1a1d23; --text: #e7e9ee; --muted: #98a2b3; --line: #2b3039;
    --accent: #6d8cff; --accent-text: #0d1020; --ok: #4cc79a; --ok-bg: #16322a; --warn: #f0b95a; --warn-bg: #3a2d14;
    --bad: #ff7a7a; --bad-bg: #3b1b1b; --run: #8ea6ff; --run-bg: #1f2744; --code: #111317;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
    --bg: #111317; --card: #1a1d23; --text: #e7e9ee; --muted: #98a2b3; --line: #2b3039;
    --accent: #6d8cff; --accent-text: #0d1020; --ok: #4cc79a; --ok-bg: #16322a; --warn: #f0b95a; --warn-bg: #3a2d14;
    --bad: #ff7a7a; --bad-bg: #3b1b1b; --run: #8ea6ff; --run-bg: #1f2744; --code: #111317;
    color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); }
.top { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--line); background: var(--card); }
.brand { font-weight: 700; text-decoration: none; color: var(--text); font-size: 17px; }
.brand span { color: var(--accent); }
main { max-width: 920px; margin: 24px auto; padding: 0 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 22px; margin-bottom: 20px; }
h1 { font-size: 22px; margin: 0 0 6px; }
h2 { font-size: 17px; margin: 0 0 12px; }
.muted { color: var(--muted); }
.field { display: block; margin: 16px 0 0; }
.field > span { display: block; font-weight: 600; margin-bottom: 6px; }
input[type=text], input[type=number], select { width: 100%; min-height: 44px; padding: 10px 12px; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; }
input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.row { display: flex; gap: 20px; align-items: flex-end; flex-wrap: wrap; }
.field.small { width: 130px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; cursor: pointer; }
.check input { margin-top: 4px; }
/* A tick box keeps its own size beside its words, inside any row (the domain form's box was stretched away from them). */
.check input[type=checkbox] { flex: none; width: auto; min-width: 0; }
a.button[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.row .check { flex: 1; min-width: 240px; margin-bottom: 8px; }
.stack { display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
.stack .field { width: 100%; }
.stack .check { margin-top: 0; }
.stack .actions { margin-top: 0; }
.check.terms-tick { align-items: center; }
.check.terms-tick input { margin-top: 0; flex: none; width: 18px; height: 18px; }
.permission { padding: 12px; border-radius: 8px; background: var(--bg); }
.actions { display: flex; gap: 14px; align-items: center; margin-top: 18px; flex-wrap: wrap; }
button, .button { font: inherit; font-weight: 600; padding: 10px 18px; min-height: 44px; border-radius: 8px; border: 1px solid transparent; background: var(--accent); color: var(--accent-text); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; text-align: center; }
.button.secondary { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
button:disabled { opacity: .55; cursor: default; }
button:focus-visible, .button:focus-visible, a:focus-visible, summary:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.error { color: var(--bad); }
.secondary-btn { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.share { margin: 16px 0 4px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.share .field { margin: 0; flex: 1; }
.share .help { margin: 0; flex: 1; min-width: 200px; }
.row.nowrap { flex-wrap: nowrap; gap: 8px; align-items: stretch; }
.row.nowrap input { min-width: 0; font-size: 13px; }
.jobs table, table.report { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 13px; color: var(--muted); font-weight: 600; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.jobs tr.link { cursor: pointer; }
.jobs tr.link:hover td { background: var(--bg); }
.chip { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 99px; white-space: nowrap; }
.chip.done { color: var(--ok); background: var(--ok-bg); }
.chip.running, .chip.queued { color: var(--run); background: var(--run-bg); }
.chip.failed { color: var(--bad); background: var(--bad-bg); }
.chip.warn { color: var(--warn); background: var(--warn-bg); }
.steps { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 6px; }
.steps li { display: flex; gap: 10px; align-items: center; }
.steps .dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); flex: none; display: grid; place-items: center; font-size: 11px; }
.steps li.done .dot { background: var(--ok); border-color: var(--ok); color: var(--card); }
.steps li.now .dot { border-color: var(--run); border-top-color: transparent; animation: spin 1s linear infinite; }
.steps li.now { font-weight: 600; }
.steps li.todo { color: var(--muted); }
@keyframes spin { to { transform: rotate(360deg); } }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 16px 0; }
.tile { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.tile b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; }
.tile small { color: var(--muted); }
pre { background: var(--code); border: 1px solid var(--line); border-radius: 8px; padding: 12px; overflow: auto; max-height: 360px; font-size: 12.5px; white-space: pre-wrap; word-break: break-word; }
details summary { cursor: pointer; font-weight: 600; margin: 10px 0; }
.back { display: inline-block; margin-bottom: 14px; }
.help { font-size: 13.5px; color: var(--muted); margin: 6px 0 12px; }
.version-line { font-size: 17px; font-weight: 700; line-height: 1.4; color: var(--text); margin: 10px 0 8px; }
@media (max-width: 600px) {
  .top { padding: 12px 16px; }
  .card { padding: 16px; }
  .hide-sm { display: none; }
}
.row.nowrap button { white-space: nowrap; padding: 10px 14px; }

/* ---------- the customer's app ---------- */
body { min-height: 100vh; display: flex; flex-direction: column; overflow-wrap: break-word; }
main { width: 100%; flex: 1; }
main:focus { outline: none; }
h3 { font-size: 15px; margin: 18px 0 6px; }
.top { gap: 10px 16px; flex-wrap: wrap; }
.who { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; min-width: 0; font-size: 14px; }
.who-account { font-weight: 600; }
.who-email { overflow-wrap: anywhere; }
.who select { width: auto; max-width: 220px; padding: 6px 10px; }
.small-btn { padding: 6px 12px; font-size: 14px; }
.danger-btn { background: transparent; color: var(--bad); border-color: var(--bad); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px; }
.foot { max-width: 920px; width: 100%; margin: 0 auto; padding: 4px 16px 28px; color: var(--muted); font-size: 12.5px; }
.foot p { margin: 0 0 6px; }
.noscript { max-width: 920px; margin: 0 auto; padding: 0 16px; }
.error:empty { display: none; }
.error { margin: 10px 0 0; }
.price { margin: 16px 0 0; }
.meta { overflow-wrap: anywhere; }
.welcome p { max-width: 60ch; }

/* your copies */
.copies { list-style: none; margin: 0; padding: 0; }
.copy { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.4fr) auto; gap: 4px 14px; align-items: center; padding: 12px 8px; min-height: 44px; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; border-radius: 6px; }
.copies li:last-child .copy { border-bottom: 0; }
.copy:hover { background: var(--bg); }
.copy-host { font-weight: 600; color: var(--accent); overflow-wrap: anywhere; }
.copy-state { display: flex; gap: 6px; flex-wrap: wrap; }
.copy-date { font-size: 13px; text-align: right; }
.copy-step { grid-column: 1 / 3; font-size: 13px; }
.copy .bar.mini { grid-column: 1 / -1; }

/* progress */
.progress { margin: 16px 0 6px; }
.bar { display: block; height: 14px; border-radius: 99px; background: var(--run-bg); overflow: hidden; position: relative; }
.bar > span { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--run); transition: width .6s ease; }
.bar.mini { height: 6px; }
.bar.indeterminate > span { width: 35%; position: absolute; left: 0; top: 0; transition: none; animation: slide 1.4s ease-in-out infinite; }
@keyframes slide { 0% { left: -35%; } 100% { left: 100%; } }
@media (prefers-reduced-motion: reduce) {
  .bar.indeterminate > span { width: 100%; animation: pulse 2s ease-in-out infinite; }
  .bar > span { transition: none; }
  @keyframes pulse { 0%, 100% { opacity: .35; } 50% { opacity: .9; } }
}
.progress-line { display: flex; gap: 6px 12px; align-items: baseline; flex-wrap: wrap; margin: 10px 0 0; }
.progress-line .pct { font-size: 22px; font-variant-numeric: tabular-nums; }
.progress-line .pct:empty { display: none; }
.progress-line .step { flex: 1; min-width: 180px; font-weight: 600; }
.progress-line .elapsed { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* two choices side by side */
.choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; margin-bottom: 20px; }
.choices .choice { margin: 0; min-width: 0; }
.card .choices { margin: 16px 0 0; gap: 14px; }
.card .choices .choice { border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.choice > p { margin: 0 0 4px; }
.choice .tiles { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }

/* things to copy */
.copy-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 10px; align-items: center; margin: 8px 0; }
.copy-label { font-weight: 600; font-size: 13px; color: var(--muted); }
code { font: 13px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--code); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; overflow-wrap: anywhere; min-width: 0; }
.where { padding-left: 18px; }
.where li { margin: 4px 0; }
.notice { margin: 16px 0 0; padding: 12px 14px; border-radius: 10px; background: var(--warn-bg); color: var(--warn); }
.notice p { margin: 0; }
.notice ul { margin: 6px 0 0; padding-left: 18px; }
.verified { display: flex; gap: 10px; align-items: center; font-weight: 600; }
.tick { width: 26px; height: 26px; border-radius: 50%; background: var(--ok); color: var(--card); display: grid; place-items: center; flex: none; }
.linkrow { margin: 14px 0 6px; }
.linkrow label { display: block; font-weight: 600; margin-bottom: 6px; }
.row.nowrap input { flex: 1; }

/* staff */
details.staff { border: 1px dashed var(--line); border-radius: 10px; padding: 2px 14px; margin: 14px 0; }
details.staff.card { border: 1px dashed var(--muted); padding: 6px 22px; margin-bottom: 20px; }
details.staff > summary { color: var(--muted); min-height: 32px; display: list-item; }
details summary { min-height: 28px; }

@media (max-width: 720px) {
  .choices { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .actions { gap: 10px; }
  .actions > button, .actions > .button { width: 100%; }
  .row.nowrap.wrap-sm { flex-wrap: wrap; }
  .row.nowrap.wrap-sm input { flex: 1 1 100%; }
  .row.nowrap.wrap-sm button { flex: 1; }
  .copy { grid-template-columns: minmax(0, 1fr); }
  .copy-step, .copy .bar.mini { grid-column: auto; }
  .copy-date { text-align: left; }
  .copy-row { grid-template-columns: minmax(0, 1fr) auto; }
  .copy-row .copy-label { grid-column: 1 / -1; margin-bottom: -6px; }
  .copy-row .small-btn { min-height: 44px; }
  .who .small-btn { min-height: 44px; }
  details.staff.card { padding: 4px 16px; }
  /* tables that don't fit become stacked rows */
  table.stack, table.stack tbody, table.stack tr, table.stack td { display: block; width: 100%; }
  table.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.stack tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  table.stack td { border: 0; padding: 3px 0; text-align: left; }
  table.stack td[data-label] { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; text-align: right; }
  table.stack td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: 13px; font-weight: 600; text-align: left; }
  table.stack td:first-child { font-weight: 600; }
}
.choice .actions + p { margin-top: 12px; }

/* Staff: the small "make it again" option under an existing App-ready version */
.again { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line, #2a2f3a); display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.again .help { margin: 0; flex: 1 1 220px; }
.again .error { flex-basis: 100%; margin: 0; }

/* Staff only: which view they are in, always visible in the header */
.viewtag { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.viewtag.staff { background: #3b2f12; color: #ffcf66; }
.viewtag.customer { background: #12331f; color: #7be0a1; }
.viewnote { border: 1px solid #6b5416; background: rgba(255, 207, 102, 0.08); border-radius: 8px; padding: 10px 12px; }

/* Staff only: accounts and their limits */
.who-link { font-size: 14px; white-space: nowrap; }
input.num { width: 6.5em; min-height: 40px; }
.small { font-size: 12px; }
form.row { display: flex; gap: 10px; flex-wrap: wrap; }
form.row input:not([type=checkbox]) { flex: 1 1 16em; }

/* Staff only: the Site engine's test console */
textarea { width: 100%; min-height: 88px; padding: 10px 12px; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; resize: vertical; }
textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
/* The chat window (PL-133): fixed height, the thread scrolls inside, the typing box stays at the bottom. */
.chat-window { display: flex; flex-direction: column; gap: 10px; height: clamp(420px, 70vh, 640px); height: clamp(420px, 70dvh, 640px); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.chat { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: auto; list-style: none; margin: 0; padding: 0 4px 0 0; display: flex; flex-direction: column; gap: 10px; }
.chat > * { flex: none; }
.chat-window form { flex: none; }
.chat-window .progress-line { flex: none; margin: 0; }
.chat-input { display: flex; gap: 8px; align-items: flex-end; }
.chat-input textarea { flex: 1 1 auto; min-width: 0; margin: 0; resize: none; overflow-y: auto; min-height: 44px; max-height: 150px; max-height: calc(5lh + 22px); }
.chat-input button { flex: none; min-height: 44px; }
.chat-input textarea:placeholder-shown { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-window .attach-row { margin-top: 8px; flex-wrap: wrap; }
.chat-wait { margin: 8px 0 0; }
.chat-window #chatError:empty { display: none; }
@media (hover: none) and (pointer: coarse) { .enter-hint, .chat-window .attach-row .help { display: none; } }
/* The chat is always shorter than the screen, and a swipe at its top or bottom moves the page (owner, November 12). */
.chat-window { max-height: calc(100vh - 140px); max-height: calc(100dvh - 140px); }
/* Shortcuts to each section, kept in view. */
.jump-bar { position: sticky; top: 0; z-index: 20; display: flex; gap: 6px; overflow-x: auto; padding: 8px 0; margin: 0 0 12px; background: var(--bg); scrollbar-width: none; }
.jump-bar::-webkit-scrollbar { display: none; }
.jump { flex: none; font: inherit; font-size: 14px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; min-height: 36px; }
section[id^="sec-"] { scroll-margin-top: 60px; }
.chat-top, .chat-peek { display: none; }
@media (max-width: 600px) {
  /* On a phone: a compact card; the chat itself opens full-screen with a back button. */
  .chat-card:not(.open) .chat-window, .chat-card:not(.open) > .help { display: none; }
  .chat-card:not(.open) .chat-peek { display: block; }
  .chat-peek-text { margin: 4px 0 10px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .chat-card.open { position: fixed; inset: 0; z-index: 60; margin: 0; border-radius: 0; border: 0; padding: 10px 12px; display: flex; flex-direction: column; overflow: hidden; }
  .chat-card.open .chat-top { display: block; flex: none; margin-bottom: 6px; }
  .chat-card.open h2 { margin: 4px 0 8px; font-size: 18px; flex: none; }
  .chat-card.open .chat-window { flex: 1 1 auto; height: auto; max-height: none; min-height: 0; padding: 8px; }
  .chat-card.open .chat { overscroll-behavior: contain; }
  .chat-card.open > .help { flex: none; margin: 6px 0 0; }
  body.chat-full { overflow: hidden; }
}
.msg { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; max-width: 46em; min-width: 0; }
.msg.from-you { background: var(--run-bg); align-self: flex-end; }
.msg.from-engine { background: var(--bg); align-self: flex-start; }
.msg p { margin: 0 0 4px; }
.msg-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg .actions { margin-top: 10px; }
.msg .notice { margin: 8px 0; }
.checks { margin: 8px 0 4px; padding-left: 18px; font-size: 13.5px; overflow-wrap: anywhere; }
.checks ul { padding-left: 16px; margin: 2px 0 6px; }
.checks .plus { color: var(--ok); }
.checks .minus { color: var(--bad); }
.progress-line.working { align-items: center; margin: 0 0 14px; }
.progress-line.working .bar { flex: 0 0 80px; }

/* Who is signed in: name over email, always visible (PL-82) */
.who-person { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.who-name { font-weight: 600; }
.who-person .who-email { font-size: 12.5px; }

/* Brand: the TaskMule logo goes to taskmule.ai, the app's name to its home (PL-89) */
.brand a { text-decoration: none; }
.brand .brand-co { color: var(--text); }
.brand .brand-app { color: var(--accent); }
.brand-logo { height: 28px; width: auto; vertical-align: middle; }

/* The TaskMule account menu (PL-86): the same look in every app */
.menu { position: relative; margin-left: auto; } /* always at the right, so the panel opens on screen */
.menu-btn { font: inherit; font-size: 14px; font-weight: 500; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: 8px; min-height: 36px; padding: 6px 12px; cursor: pointer; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-panel { position: absolute; right: 0; top: calc(100% + 6px); width: 280px; max-width: calc(100vw - 32px); padding: 14px; background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12); z-index: 20; }
.menu-panel p { margin: 0; overflow-wrap: anywhere; }
.menu-name { font-weight: 700; }
.menu-sub { font-size: 13px; color: var(--muted); margin-top: 2px !important; }
.menu-panel hr { border: 0; border-top: 1px solid var(--line); margin: 12px 0; }
.menu-apps { display: flex; flex-direction: column; gap: 2px; }
.menu-app { display: block; padding: 6px 0; font-size: 14px; color: var(--accent); text-decoration: none; }
.menu-app:hover { text-decoration: underline; }
.menu-note { font-size: 12px; color: var(--muted); }
.menu-signout { width: 100%; font: inherit; font-size: 14px; min-height: 36px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; }
.menu-small { font-size: 12px; color: var(--muted); margin-top: 8px !important; }
/* On a phone the button can sit anywhere in the wrapped header: the open panel spans the screen instead. */
@media (max-width: 600px) { .menu-panel { position: fixed; left: 16px; right: 16px; width: auto; max-width: none; top: auto; margin-top: 6px; } }

/* Screenshots with a chat message (PL-90) */
.attach-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 8px 0; }
.attach-btn { cursor: pointer; }
.thumbs, .shots { display: flex; gap: 8px; flex-wrap: wrap; }
.thumb { position: relative; }
.thumbs img, .shots img { width: 96px; height: 72px; object-fit: cover; border: 1px solid var(--line); border-radius: 6px; display: block; }
.file-thumb { display: flex; align-items: center; width: 96px; height: 72px; padding: 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); color: var(--text); text-decoration: none; font-size: 12px; box-sizing: border-box; }
.file-thumb .file-name { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; word-break: break-all; }
.thumb-x { position: absolute; top: -8px; right: -8px; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; line-height: 1; padding: 0; }

/* Problems reported with a copy (PL-91) */
.reports, .report-list { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 12px; }
.reports li { border-top: 1px solid var(--line); padding-top: 10px; }
.report-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.who-link + .who-link { margin-left: 4px; }
.menu-head { margin-top: 0 !important; margin-bottom: 4px !important; }

/* This app's own tools (account switching; staff tools), on the page under the top bar (PL-98) */
.tools { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; justify-content: flex-end; padding: 8px 20px; border-bottom: 1px solid var(--line); font-size: 14px; }
.tools select { width: auto; max-width: 220px; padding: 6px 10px; min-height: 36px; }
@media (max-width: 600px) { .tools { justify-content: flex-start; padding: 8px 16px; } }
/* Sites step 2: the private preview of the refined site, on the review page */
.preview-frame { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; margin: 12px 0; }
.preview-frame iframe { display: block; width: 100%; height: 70vh; min-height: 420px; border: 0; }
.preview-sizes { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.preview-sizes [aria-pressed="true"] { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
@media (max-width: 600px) { .preview-frame iframe { height: 60vh; min-height: 320px; } }
.howto { margin: 8px 0 0; padding-left: 22px; }
.tools-notice { flex-basis: 100%; margin: 0; text-align: left; }

/* Support access (spec 5c): always visible while staff are in a customer's account */
.support-banner { position: sticky; top: 0; z-index: 30; background: #b45309; color: #fff; text-align: center; font-weight: 700; padding: 8px 16px; }

/* Import code: the automatic check's report (PL-107) */
.import-report { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin-top: 10px; }
.import-report.not-a-website { border-color: #b45309; }
.import-report h3 { font-size: 15px; margin: 10px 0 4px; }
.import-report ul { margin: 0; padding-left: 20px; }

/* Your own domain (custom domains, step 5) */
.domains .domain { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 14px; }
.domains h3 { margin: 0 0 4px; overflow-wrap: anywhere; }
.domains h4, .card h4 { font-size: 15px; margin: 16px 0 6px; }
/* Type and Name never break inside a word (CNAME stays whole); only the long Value may break anywhere. */
.records code { display: inline-block; max-width: 100%; padding: 4px 8px; }
.records td:first-child code { white-space: nowrap; overflow-wrap: normal; }
.records td:nth-child(2) code { overflow-wrap: break-word; }
@media (min-width: 601px) {
  table.records { table-layout: fixed; }
  table.records th:nth-child(1) { width: 96px; }
  table.records th:nth-child(2) { width: 34%; }
}
@media (max-width: 600px) {
  table.stack.records td[data-label] { display: block; text-align: left; }
  table.stack.records td[data-label]::before { display: block; margin-bottom: 4px; }
  .records td:nth-child(2) code, .records td:nth-child(3) code { overflow-wrap: anywhere; }
}
.keep-together { white-space: nowrap; }
.records .small-btn { margin-left: 6px; }
.guide-steps { margin: 4px 0 8px; padding-left: 22px; }
.guide-steps li { margin: 4px 0; }
.email-warning { margin: 12px 0; }
.scope { border-left: 3px solid var(--line); padding-left: 10px; }
.domains textarea { width: 100%; }
.domain-foot { margin-top: 16px; }
.share-link { margin-top: 6px; }

/* The copy page's two versions (PL-127): name, status bar, then that version's buttons. */
.versions .version h2 { margin-bottom: 8px; }
.vstatus { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 8px 12px; border-radius: 8px; font-weight: 650; }
.vstatus.ready { background: var(--ok-bg); color: var(--ok); }
.vstatus.making { background: var(--run-bg); color: var(--run); }
.vstatus.failed { background: var(--bad-bg); color: var(--bad); }
.vstatus.none { background: var(--code); color: var(--muted); }
.vstatus.ready::before { content: "✓"; }

/* Messages from the site's forms */
.inbox { list-style: none; margin: 0; padding: 0; }
.inbox-item { border-top: 1px solid var(--line); padding: 10px 0; }
.inbox-item dl { margin: 4px 0 0; display: grid; grid-template-columns: minmax(90px, max-content) 1fr; gap: 4px 12px; }
.inbox-item dt { color: var(--muted); }
.inbox-item dd { margin: 0; overflow-wrap: anywhere; }
.file-list { margin: 6px 0 12px; padding-left: 18px; overflow-wrap: anywhere; }
.file-list li { margin: 2px 0; }
.staff-reply { margin: .5rem 0 0 .75rem; padding-left: .75rem; border-left: 3px solid var(--line, #d7dbe0); }
.staff-answer { margin-top: .5rem; display: grid; gap: .25rem; }
.staff-answer textarea { width: 100%; box-sizing: border-box; }

/* The site page's steps (CP-34): an arrow, the title, and a one-line status; open shows the step. */
.card.step > details > summary { list-style: none; display: grid; grid-template-columns: 18px 1fr; column-gap: 8px; align-items: baseline; margin: 0; min-height: 44px; padding: 2px 0; }
.card.step > details > summary::-webkit-details-marker { display: none; }
.card.step > details > summary::before { content: '▸'; color: var(--text); font-size: 20px; line-height: 1; transition: transform .15s ease; grid-row: 1 / span 2; }
.card.step > details[open] > summary::before { transform: rotate(90deg); }
.card.step > details > summary h2 { margin: 0; display: inline; }
.card.step > details > summary .chip { margin-left: 6px; }
.step-status { grid-column: 2; font-weight: 400; font-size: 14px; color: var(--muted); margin-top: 2px; }
.card.step > details[open] > summary .step-status { margin-bottom: 8px; }
.step-body > :first-child { margin-top: 4px; }
details.more { margin: 4px 0 10px; }
details.more > summary { display: inline-block; font-weight: 500; font-size: 13.5px; color: var(--accent); margin: 0; min-height: 0; }
details.more > summary::-webkit-details-marker { display: none; }
details.more[open] > summary { margin-bottom: 4px; }
.more-body > :first-child { margin-top: 0; }
td.made { white-space: nowrap; }
@media (max-width: 600px) { td.made { white-space: normal; } }
/* CP-37: the home page's title, and the smaller "Add a website" box under "Your sites". */
.page-title { font-size: 26px; margin: 8px 0 16px; }
.card.small-card { padding-top: 14px; padding-bottom: 14px; }
.card.small-card h2 { font-size: 18px; }
ul.plan { margin: 4px 0 8px 18px; padding: 0; }

/* Inventory (CP-41) */
/* Inventory (owner, November 12): one grid; headings above their columns on a computer, a compact card on a phone. */
.inv-grid { display: flex; flex-direction: column; }
.inv-row { display: grid; grid-template-columns: minmax(170px, 2fr) 92px 92px minmax(96px, 1fr) minmax(150px, 1.6fr) auto; gap: 8px 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.inv-head { font-size: 13px; font-weight: 600; color: var(--muted); padding: 4px 0 8px; }
.inv-name .help { display: block; margin: 2px 0 0; font-size: 12.5px; }
.inv-name input[type=text] { width: 100%; min-height: 40px; }
input.num-input { width: 5.5em; min-height: 40px; }
.inv-lab, .inv-when-short { display: none; }
.inv-acts { display: flex; align-items: center; gap: 12px; justify-content: flex-end; }
.link-btn { background: none; border: 0; padding: 4px 2px; font: inherit; font-size: 13.5px; cursor: pointer; text-decoration: underline; min-height: 0; }
.danger-link { color: var(--bad); }
@media (max-width: 900px) {
  .inv-head { display: none; }
  .inv-row { grid-template-columns: auto auto 1fr; grid-template-areas: "name name name" "q low ." "state state state" "acts acts acts"; gap: 8px 16px; padding: 14px 0; }
  .inv-name { grid-area: name; } .inv-q { grid-area: q; } .inv-low { grid-area: low; } .inv-state { grid-area: state; } .inv-acts { grid-area: acts; justify-content: flex-start; } .inv-when { display: none; }
  .inv-q label, .inv-low label { display: block; white-space: nowrap; }
  .inv-lab { display: inline; font-size: 13px; font-weight: 600; color: var(--muted); }
  .inv-state { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
  .inv-when-short { display: inline; margin: 0; }
  .inv-acts .secondary-btn { width: auto; }
  .inv-add input.num-input { width: 6em; }
  .inv-add .row .field:not(.inv-add-name) { width: auto; flex: 0 0 auto; }
}
.inv-add .row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.menu-theme { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0; }
.menu-theme .menu-small { width: 100%; margin: 0; }
.theme-btn { font: inherit; font-size: 13px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; }
.theme-btn[aria-pressed="true"] { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }

/* The copy's label (TEST on the test copy; PL-143 item 18): also styled here for pages whose policy blocks inline styles. */
.copy-label { background: #b45309; color: #fff; text-align: center; font: 600 14px/1.4 system-ui, sans-serif; padding: 6px 16px; letter-spacing: .02em; }
