/* Clockwork: one stylesheet, no build step. Friendly and modern: cobalt accent, rounded surfaces, big headings, time first. */

@font-face { font-family: "Archivo"; src: url("fonts/archivo.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }

:root {
  --shell: #ffffff; --shell-2: #ebeff8; --shell-ink: #111a2e; --shell-muted: #364159;
  --bg: #f4f6fb; --surface: #ffffff; --surface-2: #ebeff8;
  --ink: #111a2e; --ink-2: #364159; --muted: #5b667e;
  --line: #e2e7f1; --line-strong: #c6cfe0;
  --accent: #2456e6; --accent-hover: #1a45c4; --accent-ink: #ffffff; --accent-soft: #e4ecff;
  --now: #ffe45c; --now-ink: #111a2e;
  --ok: #0c7f5a; --ok-soft: #d9f7ea; --fail: #d1274e; --fail-soft: #ffe4ea;
  --warn: #8c5a00; --warn-soft: #fff2c4; --info: #0a68b8; --info-soft: #e0f1ff;
  --neutral: #546078; --neutral-soft: #e9edf5;
  --shadow: 0 1px 2px rgb(20 40 90 / 0.05), 0 8px 24px rgb(20 40 90 / 0.06);
  --shadow-pop: 0 16px 40px rgb(20 40 90 / 0.18), 0 2px 8px rgb(20 40 90 / 0.08);
  --radius: 20px; --radius-sm: 12px;
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --shell: #151b29; --shell-2: #1f2738; --shell-ink: #f0f3fa; --shell-muted: #c8d0e0;
    --bg: #0c111c; --surface: #151b29; --surface-2: #1f2738;
    --ink: #f0f3fa; --ink-2: #c8d0e0; --muted: #98a3b8;
    --line: #29324a; --line-strong: #434e68;
    --accent: #7fa3ff; --accent-hover: #a0bcff; --accent-ink: #071433; --accent-soft: #17294f;
    --ok: #4fdcae; --ok-soft: #10352a; --fail: #ff7d99; --fail-soft: #3f1622;
    --warn: #ffd257; --warn-soft: #3a2e0c; --info: #6cc0ff; --info-soft: #0f2e47;
    --neutral: #b3bccf; --neutral-soft: #232c40;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4);
    --shadow-pop: 0 16px 40px rgb(0 0 0 / 0.6), 0 2px 8px rgb(0 0 0 / 0.4);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 1.03rem/1.5 var(--font); font-variant-numeric: tabular-nums; min-height: 100vh; display: flex; flex-direction: column; }
::selection { background: var(--accent); color: var(--accent-ink); }
html { scrollbar-color: var(--muted) transparent; }
a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; font-weight: 700; text-wrap: balance; }
h1 { font-size: 1.9rem; font-stretch: 92%; letter-spacing: -0.01em; }
h2 { font-size: 1.1rem; }
h3 { font-size: .97rem; margin-top: 1.1rem; color: var(--ink-2); }
p { margin: 0 0 .6rem; }
code, .mono, pre, kbd { font-family: var(--mono); font-size: .9em; }
code { background: var(--surface-2); padding: .05em .3em; border-radius: var(--radius-sm); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---- header & layout ---- */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 1.25rem; padding: 0 1.5rem; height: 56px; background: var(--shell); color: var(--shell-ink); }
.brand { display: flex; align-items: center; gap: .5rem; color: var(--shell-ink); font-weight: 800; font-size: 1.1rem; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand .logo { width: 24px; height: 24px; color: var(--shell-ink); }
.nav { display: flex; align-items: stretch; align-self: stretch; overflow-x: auto; scrollbar-width: none; }
.nav a, .nav-more > summary { display: flex; align-items: center; color: var(--shell-muted); padding: 0 .8rem; white-space: nowrap; font-size: .95rem; font-weight: 550; text-decoration: none; cursor: pointer; }
.nav a:hover, .nav-more > summary:hover { color: var(--shell-ink); background: var(--shell-2); }
.nav a.active, .nav-more > summary.active { color: var(--shell-ink); box-shadow: inset 0 -4px 0 var(--shell-ink); }
.nav-more { align-self: stretch; display: flex; }
.nav-more > summary { height: 100%; }
.nav-more .popover-body { top: 100%; }
.nav-more .popover-body a { text-decoration: none; }
.usermenu { position: relative; margin-left: auto; }
.usermenu summary { list-style: none; display: flex; align-items: center; gap: .5rem; cursor: pointer; padding: .25rem .5rem; color: var(--shell-ink); }
.usermenu summary::-webkit-details-marker { display: none; }
.usermenu summary:hover { background: var(--shell-2); }
.avatar { width: 28px; height: 28px; display: grid; place-items: center; background: var(--shell-ink); color: var(--accent); font-weight: 800; font-size: .92rem; }
.who { color: var(--shell-ink); font-size: .99rem; max-width: 14ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 240px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-pop); padding: .4rem; display: flex; flex-direction: column; }
.menu-head { display: flex; flex-direction: column; padding: .5rem .6rem .6rem; border-bottom: 1px solid var(--line); margin-bottom: .3rem; font-size: .95rem; }
.menu a, .menu .linkish { padding: .45rem .6rem; border-radius: var(--radius-sm); color: var(--ink); text-align: left; font-size: .99rem; }
.menu a:hover, .menu .linkish:hover { background: var(--surface-2); text-decoration: none; }

.main { width: 100%; max-width: 1280px; margin: 0 auto; padding: 1.75rem 1.5rem 3rem; flex: 1; }
.foot { display: flex; gap: .75rem; justify-content: center; align-items: center; padding: 1.25rem; color: var(--muted); font-size: .89rem; border-top: 1px solid var(--line); }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.page-head h1 { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin: 0; }
.sub { color: var(--ink-2); margin: .35rem 0 0; }
.crumbs { margin: 0 0 .25rem; font-size: .92rem; color: var(--muted); display: flex; gap: .35rem; align-items: center; flex-wrap: wrap; }
.actions, .row-actions { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.actions form, .row-actions form { margin: 0; }

.grid { display: grid; gap: 2rem; margin-bottom: 1.75rem; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.grid > .card { margin-bottom: 0; }
.stack { display: flex; flex-direction: column; gap: .85rem; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .85rem; }
.grow { flex: 1; margin: 0; }

.card { background: transparent; border-top: 2px solid var(--line-strong); padding: .9rem 0 0; margin-bottom: 1.75rem; }
.card.flush { padding: 0; border-top: 0; overflow: hidden; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: .5rem; }
.card-head h2 { margin: 0; }
.card.callout { border-top-color: var(--warn); background: var(--warn-soft); padding: 1rem 1.1rem; }
details.card > summary { cursor: pointer; }

/* ---- text helpers ---- */
.muted { color: var(--muted); }
.small { font-size: .92rem; }
.strong { font-weight: 600; }
.nowrap { white-space: nowrap; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.pre { white-space: pre-wrap; word-break: break-word; }
.center { text-align: center; }
.text-fail { color: var(--fail); }
.text-warn { color: var(--warn); }
.calm { color: var(--ok); font-weight: 500; }
.req { color: var(--fail); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- badges, chips, dots ---- */
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .05rem .45rem; border-radius: var(--radius-sm); font-size: .85rem; font-weight: 650; line-height: 1.5; white-space: nowrap; vertical-align: middle; background: var(--neutral-soft); color: var(--neutral); }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.fail { background: var(--fail-soft); color: var(--fail); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.info::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: pulse 1.2s ease-in-out infinite; }
h1 .badge { font-size: .87rem; }
h1.mono { font-size: 1.45rem; }
.chip { display: inline-flex; align-items: center; gap: .35rem; font-size: .92rem; white-space: nowrap; vertical-align: middle; color: var(--ink); }
.chip::before { content: ""; width: 9px; height: 9px; background: var(--c, var(--accent)); outline: 1px solid var(--muted); outline-offset: -1px; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; vertical-align: middle; }
.dot.warn { background: var(--warn); }
.count { font-size: .87rem; opacity: .85; margin-left: .2rem; }
@keyframes pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .badge.info::before, .spinner { animation: none !important; } }

.strip { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 3px; vertical-align: middle; }
.sq { width: 10px; height: 14px; background: var(--neutral-soft); display: block; }
.sq.ok { background: var(--ok); }
.sq.fail { background: var(--fail); }
.sq.warn { background: var(--warn); opacity: .75; }
.sq.info { background: var(--info); animation: pulse 1.2s ease-in-out infinite; }
.sq:hover { outline: 2px solid var(--ink); outline-offset: 1px; }

.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--info-soft); border-top-color: var(--info); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- buttons & forms ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .5rem .95rem; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font: inherit; font-size: .99rem; font-weight: 650; cursor: pointer; white-space: nowrap; line-height: 1.3; text-decoration: none; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.danger { background: var(--fail); border-color: var(--fail); color: #fff; }
.btn.danger:hover { filter: brightness(.92); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.small { padding: .25rem .6rem; font-size: .89rem; }
.btn.wide { width: 100%; }
.btn[disabled] { opacity: .55; cursor: progress; }
.linkish { background: none; border: 0; font: inherit; color: var(--accent); cursor: pointer; padding: 0; }
.chip-btn { font: inherit; font-size: .95rem; padding: .35rem .7rem; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); cursor: pointer; }
.chip-btn:hover { background: var(--accent-soft); color: var(--ink); }

.field { display: flex; flex-direction: column; gap: .3rem; min-width: 0; margin: 0; border: 0; padding: 0; }
.field.narrow { max-width: 320px; }
.field > label, .field > legend { font-size: .95rem; font-weight: 650; color: var(--ink); display: flex; flex-direction: column; gap: .3rem; padding: 0; }
.field > label > span { font-weight: 400; }
.field > label:has(> span) { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: .4rem; }
input, select, textarea { font: inherit; font-size: .95rem; color: var(--ink); background: var(--surface); border: 1px solid var(--muted); border-radius: var(--radius-sm); padding: .5rem .6rem; width: 100%; min-width: 0; }
textarea { resize: vertical; }
input[type="checkbox"], input[type="radio"] { width: auto; accent-color: var(--accent); margin: 0; }
input[type="color"] { padding: .1rem; height: 2.2rem; width: 4rem; }
input[type="file"] { padding: .35rem; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.help { color: var(--muted); font-size: .90rem; margin: 0; font-weight: 400; }
.check { display: inline-flex; align-items: center; gap: .45rem; font-size: .97rem; cursor: pointer; }
.checks { display: flex; flex-direction: column; gap: .4rem; }
.checks.inline { flex-direction: row; flex-wrap: wrap; gap: .4rem .9rem; }
.inline-form { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin: 0; }
.add-row { margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.add-row input, .add-row select { width: auto; flex: 1 1 200px; }
.add-row .help { flex-basis: 100%; }

/* People picker: the department "Add member" field searches the Workspace directory. */
.picker { position: relative; flex: 1 1 260px; }
.add-row .picker input { width: 100%; }
.picker-pop { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: var(--shadow-pop); overflow: hidden; }
.picker-pop[hidden] { display: none; }
.picker-list { list-style: none; margin: 0; padding: .25rem; max-height: 320px; overflow-y: auto; }
.picker-list:empty { display: none; }
.picker-opt { display: flex; align-items: center; gap: .6rem; padding: .4rem .5rem; border-radius: var(--radius-sm); cursor: pointer; }
.picker-opt[aria-selected="true"] { background: var(--accent-soft); }
.picker-opt[aria-disabled="true"] { cursor: default; opacity: .6; }
.picker-avatar { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; object-fit: cover; background: var(--surface-2); color: var(--ink-2); font-size: .79rem; font-weight: 700; }
.picker-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.picker-name, .picker-email { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.picker-name { font-weight: 600; }
.picker-email { color: var(--muted); font-size: .87rem; }
.picker-foot p { margin: 0; padding: .55rem .75rem; font-size: .87rem; color: var(--muted); border-top: 1px solid var(--line); }
.picker-list:empty + .picker-foot p:first-child { border-top: 0; }
.picker-foot p.error { color: var(--fail); }

.segmented { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); align-self: flex-start; }
.segmented label { display: flex; align-items: center; gap: .4rem; padding: .45rem .85rem; cursor: pointer; font-size: .99rem; color: var(--ink); }
.segmented label:has(input:checked) { background: var(--accent); color: var(--accent-ink); font-weight: 650; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label:has(input:focus-visible) { outline: 2px solid var(--accent); }

.filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: 1rem; }
.filters input[type="search"], .filters input[name="action"] { flex: 1 1 220px; width: auto; }
.filters select { width: auto; flex: 0 1 auto; }
.filters label.small { display: flex; align-items: center; gap: .35rem; }
.filters label.small input { width: auto; }
.narrow-input { max-width: 160px; }

/* popovers built on <details> */
.popover { position: relative; }
.popover > summary { list-style: none; }
.popover > summary::-webkit-details-marker { display: none; }
.popover-body { position: absolute; top: calc(100% + 6px); left: 0; z-index: 25; width: 300px; max-width: calc(100vw - 2rem); background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); box-shadow: var(--shadow-pop); padding: 1rem; }
.popover.align-right .popover-body { left: auto; right: 0; }
.popover-body.wide-pop { width: 400px; max-height: 70vh; overflow: auto; }
.menu-list { width: 190px; padding: .35rem; display: flex; flex-direction: column; }
.menu-list a, .menu-list .linkish { padding: .45rem .6rem; border-radius: var(--radius-sm); color: var(--ink); text-align: left; font-size: .97rem; }
.menu-list .linkish.text-fail { color: var(--fail); }
.menu-list a:hover, .menu-list .linkish:hover { background: var(--surface-2); text-decoration: none; }

/* ---- flash ---- */
.flash { padding: .7rem 1rem; margin-bottom: 1rem; font-size: .95rem; font-weight: 500; }
.flash.ok { background: var(--ok-soft); color: var(--ok); }
.flash.error { background: var(--fail-soft); color: var(--fail); }
.flash.info { background: var(--info-soft); color: var(--info); }
.flash.warn { background: var(--warn-soft); color: var(--warn); }
.flash a { color: inherit; text-decoration: underline; }

/* ---- tables ---- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 1.00rem; }
.table th { text-align: left; font-weight: 650; font-size: .92rem; color: var(--shell-ink); padding: .5rem .8rem; background: var(--shell); white-space: nowrap; }
.table td { padding: .6rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-2); }
.table tr.is-paused td { color: var(--muted); }
.table tr.is-tool-disabled td { color: var(--muted); }
.table tr.is-tool-disabled td > * { filter: grayscale(1); opacity: .6; }
.disabled-group { margin-top: 1.75rem; }
.disabled-group .group-head { display: flex; align-items: baseline; gap: .75rem; flex-wrap: wrap; margin: 0 0 .5rem; color: var(--muted); }
.disabled-group .group-head h2 { margin: 0; font-size: .95rem; color: var(--muted); }
.disabled-group .card { background: var(--surface-2); }
.disabled-group .table th { background: var(--neutral); color: var(--bg); }
.table tr.sub-row td { padding-top: 0; border-top: 0; }
.table td.schedule { min-width: 180px; }
.table td.summary { min-width: 200px; max-width: 420px; }
.table.retention input { width: 7rem; }
.table.diff tr.changed td { background: var(--warn-soft); }

.kv { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1rem; margin: 0; }
.kv dt { color: var(--muted); font-size: .95rem; }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.list, .plain { list-style: none; padding: 0; margin: 0; }
.list li { padding: .45rem 0; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.list li:last-child { border-bottom: 0; }
.plain li { padding: .15rem 0; }
.plain.cols { columns: 2; }
.rows { list-style: none; padding: 0; margin: 0; }
.rows li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .75rem 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.rows li:last-child { border-bottom: 0; }
.rows li p { margin: .15rem 0 0; }
.rows.compact li { padding: .3rem 0; }
.history { list-style: none; padding: 0; margin: 0; font-size: .97rem; }
.history li { padding: .35rem 0; border-bottom: 1px dashed var(--line); }
.history li:last-child { border-bottom: 0; }
.files { list-style: none; padding: 0; margin: 0; }
.files li { padding: .3rem 0; }


/* ---- tabs ---- */
.tabs { display: flex; gap: .25rem; border-bottom: 2px solid var(--line-strong); margin-bottom: 1.25rem; overflow-x: auto; }
.tabs a { padding: .55rem .85rem; color: var(--ink-2); white-space: nowrap; font-size: .95rem; text-decoration: none; }
.tabs a:hover { color: var(--ink); background: var(--surface-2); }
.tabs a.active { color: var(--accent-ink); background: var(--accent); font-weight: 650; }

/* ---- dashboard ---- */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 7.5rem 4.5rem 1fr; gap: .5rem; padding: .4rem 0; border-bottom: 1px solid var(--line); align-items: baseline; font-size: .97rem; }
.timeline li:last-child { border-bottom: 0; }
.timeline time { font-variant-numeric: tabular-nums; font-weight: 600; }
.bars { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; height: 110px; align-items: end; margin-top: .5rem; }
.bar { height: 100%; display: flex; flex-direction: column-reverse; gap: 1px; border-bottom: 2px solid var(--line); overflow: hidden; }
.bar span { display: block; min-height: 0; }
.b-ok { background: var(--ok); }
.b-fail { background: var(--fail); }
.bar-col { position: relative; height: 100%; outline: none; }
.bar-col:hover .bar, .bar-col:focus-visible .bar { box-shadow: 0 0 0 2px var(--line-strong); }
.bar-tip { display: none; position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); z-index: 25;
  min-width: 200px; max-width: 280px; padding: .5rem .65rem; background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-pop); font-size: .87rem; }
.bar-tip::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 7px; } /* keeps hover while moving into the tip */
.bar-col:hover .bar-tip, .bar-col:focus-within .bar-tip { display: block; }
.bar-col:nth-child(-n+5) .bar-tip { left: 0; transform: none; }
.bar-col:nth-last-child(-n+5) .bar-tip { left: auto; right: 0; transform: none; }
.bar-tip p { margin: 0; }
.bar-tip .tip-head { white-space: nowrap; }
.bar-tip ul { list-style: none; margin: .35rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .2rem; }
.bar-tip li { display: flex; justify-content: space-between; gap: .75rem; }
.bar-tip li a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-tip .counts { display: flex; gap: .4rem; white-space: nowrap; }
.bar-tip .ok { color: var(--ok); }
.bar-tip .fail { color: var(--fail); }
.bars-axis { display: flex; justify-content: space-between; color: var(--muted); font-size: .82rem; margin-top: .3rem; }
.legend { display: inline-flex; gap: .4rem; align-items: center; color: var(--muted); font-size: .87rem; flex-wrap: wrap; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: var(--radius-sm); margin-left: .4rem; }
.sw.ok { background: var(--ok); }
.sw.fail { background: var(--fail); }
.sw.bd { background: var(--surface); border: 1px solid var(--line-strong); }
.sw.hol { background: var(--accent-soft); border: 1px solid var(--accent); }
.sw.off { background: var(--surface-2); }

.empty { text-align: center; padding: 2rem 1rem; }
.empty-title { font-weight: 650; font-size: 1.05rem; margin-bottom: .25rem; }

/* ---- tool & department cards ---- */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.tool-card, .dept-card { display: flex; flex-direction: column; gap: .5rem; color: var(--ink); margin: 0; transition: border-color .15s, transform .15s; }
.tool-card:hover, .dept-card:hover { text-decoration: none; border-color: var(--accent); }
.tool-card-head { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.tool-desc { color: var(--ink-2); font-size: .97rem; flex: 1; margin: 0; }
.tool-card-foot { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.dept-card { border-top: 4px solid var(--c); }
.dept-card.is-archived { opacity: .65; }
.dept-dot { width: 14px; height: 14px; background: var(--c); display: inline-block; }

/* ---- job form ---- */
.job-form { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1rem; align-items: start; }
.form-aside { position: sticky; top: 72px; display: flex; flex-direction: column; gap: 1rem; }
.form-aside .card { margin: 0; }
.step { font-stretch: 85%; font-weight: 800; margin-right: .4rem; color: var(--accent); }
.args { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .85rem; }
.presets { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .35rem; }
.form-actions { display: flex; gap: .5rem; padding: .25rem 0 1rem; }
.preview h2 { margin-bottom: .35rem; }
.preview-next { list-style: none; padding: 0; margin: .5rem 0; font-size: .95rem; font-weight: 600; }
.preview-next li { padding: .35rem 0; border-bottom: 1px solid var(--line); }
.placeholders summary { cursor: pointer; font-weight: 600; }
.ph-list { margin: .5rem 0 0; display: grid; grid-template-columns: max-content 1fr; gap: .25rem .6rem; font-size: .87rem; align-items: baseline; }
.ph-list dd { margin: 0; color: var(--ink-2); }
.ph { font-family: var(--mono); font-size: .85rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .05rem .3rem; cursor: pointer; color: var(--ink); }
.ph:hover { border-color: var(--accent); }
.version-pin summary { cursor: pointer; font-size: .95rem; color: var(--ink-2); margin-bottom: .5rem; }

/* ---- code & logs ---- */
pre.code { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .75rem .9rem; overflow: auto; margin: 0 0 .75rem; font-size: .89rem; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
pre.log { max-height: 420px; }
pre.readme { white-space: pre-wrap; font-family: var(--font); font-size: .99rem; margin: 0; }
.log-card { padding-bottom: .6rem; }
.log-controls { margin-bottom: .5rem; }
.log-view { height: 60vh; max-height: none; font-size: .85rem; line-height: 1.45; white-space: pre; tab-size: 4; }
.log-view > span { display: block; padding-left: 2ch; text-indent: -2ch; }
.log-view .l-err { color: var(--fail); }
.log-view .l-new { animation: flashin 1.5s ease-out; }
@keyframes flashin { from { background: var(--accent-soft); } }
.log-status { margin: 0 0 .4rem; }
.summary-big { font-size: 1.05rem; font-weight: 500; }

/* ---- calendars ---- */
.months { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem; }
.month { margin: 0; }
.month table { width: 100%; border-collapse: separate; border-spacing: 3px; font-size: .89rem; text-align: center; font-variant-numeric: tabular-nums; }
.month th { color: var(--muted); font-weight: 500; font-size: .79rem; }
.month td { padding: .3rem 0; }
.month td.bd { background: var(--surface); border: 1px solid var(--line); }
.month td.off { background: var(--surface-2); color: var(--muted); }
.month td.hol { background: var(--accent-soft); color: var(--accent); font-weight: 600; border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.month td.today span { display: inline-block; min-width: 1.6em; border-radius: var(--radius-sm); background: var(--ink); color: var(--bg); }
.months + .legend { margin: .5rem 0 1rem; }

/* ---- system ---- */
.checklist { list-style: none; padding: 0; margin: 0 0 .5rem; }
.checklist li { display: flex; gap: .5rem; align-items: baseline; padding: .35rem 0; font-size: .97rem; flex-wrap: wrap; }
.ck { font-size: .85rem; font-weight: 700; flex: none; min-width: 2.2rem; padding: 0 .35rem; text-align: center; }
.checklist .ok .ck { background: var(--ok-soft); color: var(--ok); }
.checklist .fail .ck { background: var(--fail-soft); color: var(--fail); }
.usage { list-style: none; padding: 0; margin: 0; }
.usage li { display: grid; grid-template-columns: 9rem 1fr 5rem; gap: .6rem; align-items: center; padding: .2rem 0; }
.meter { display: block; height: 6px; background: var(--surface-2); border-radius: var(--radius-sm); overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--accent); border-radius: var(--radius-sm); }

/* ---- sign-in & error ---- */
body.bare { background: var(--shell); }
.bare-main { display: grid; place-items: center; }
.login { width: 100%; max-width: 400px; margin: 6vh auto; text-align: center; display: flex; flex-direction: column; gap: .75rem; color: var(--shell-ink); }
.login .muted, .login .help:not(.card .help) { color: var(--shell-muted); }
.login .btn.primary { background: #ffffff; border-color: #ffffff; color: var(--accent); }
.login .btn.primary:hover { background: #dcebe4; }
.login h1 { font-size: 2rem; margin: 0; }
.login .card { text-align: left; margin: .5rem 0 0; background: var(--surface); color: var(--ink); border-top: 0; padding: 1.1rem; }
.login .card .muted, .login .card .help { color: var(--muted); }
.login-mark { color: var(--shell-ink); }
.login-mark .logo { width: 56px; height: 56px; }
.tagline { font-size: 1.15rem; font-weight: 600; margin: 0; }
.breakglass { text-align: left; margin-top: 1rem; font-size: .97rem; }
.breakglass summary { cursor: pointer; color: var(--shell-muted); text-align: center; }
.breakglass form { margin-top: .75rem; }
.error-page { text-align: center; margin: 8vh auto; max-width: 520px; }
.error-code { font-size: 4rem; font-weight: 800; color: var(--accent); margin: 0; letter-spacing: -0.04em; }

/* ---- assistant ---- */
.chat-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 1rem; height: calc(100vh - 56px - 3rem - 60px); min-height: 480px; }
.chat-side { display: flex; flex-direction: column; gap: .75rem; min-height: 0; }
.chat-list { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; flex: 1; }
.chat-list a { display: flex; flex-direction: column; padding: .45rem .6rem; color: var(--ink); font-size: .97rem; text-decoration: none; }
.chat-list a:hover { background: var(--surface-2); }
.chat-list a.active { background: var(--accent-soft); font-weight: 650; }
.usage-box { display: flex; flex-direction: column; gap: .3rem; }
.chat-main { display: flex; flex-direction: column; min-height: 0; background: var(--surface); border: 1px solid var(--line); }
.messages { flex: 1; overflow-y: auto; padding: 1.25rem; display: flex; flex-direction: column; gap: 1rem; }
.chat-intro { margin: auto; text-align: center; max-width: 520px; display: flex; flex-direction: column; align-items: center; gap: .5rem; }
.chat-intro h1 { font-size: 1.4rem; }
.suggestions { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; }
.msg { max-width: 78%; padding: .6rem .9rem; font-size: .95rem; line-height: 1.55; overflow-wrap: anywhere; }
.msg.user { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: var(--radius-sm); white-space: pre-wrap; }
.msg.assistant { align-self: flex-start; background: var(--surface-2); border-bottom-left-radius: var(--radius-sm); }
.msg.assistant p:last-child, .msg.assistant ul:last-child { margin-bottom: 0; }
.msg.assistant ul, .msg.assistant ol { margin: .3rem 0 .6rem; padding-left: 1.2rem; }
.msg.status { align-self: flex-start; background: none; color: var(--muted); font-size: .92rem; padding: 0 .2rem; display: flex; gap: .4rem; align-items: center; }
.msg.error { align-self: flex-start; background: var(--fail-soft); color: var(--fail); }
.proposal { align-self: flex-start; width: min(560px, 100%); border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.proposal-head { display: flex; justify-content: space-between; gap: .5rem; align-items: center; padding: .7rem .9rem; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.proposal-head strong { font-size: .98rem; }
.proposal-body { padding: .75rem .9rem; font-size: .95rem; }
.proposal-body .kv { grid-template-columns: 6.5rem 1fr; gap: .3rem .75rem; }
.proposal-body ol { margin: 0; padding-left: 1.1rem; }
.proposal-foot { display: flex; gap: .5rem; padding: .7rem .9rem; border-top: 1px solid var(--line); align-items: center; flex-wrap: wrap; }
.proposal.is-accepted { border-color: color-mix(in srgb, var(--ok) 50%, var(--line)); }
.proposal.is-cancelled { opacity: .65; }
.composer { display: flex; gap: .5rem; padding: .75rem; border-top: 1px solid var(--line); align-items: flex-end; }
.composer textarea { flex: 1; resize: none; max-height: 200px; }
.composer-note { margin: 0; padding: 0 .9rem .6rem; }
.typing { display: inline-flex; gap: 3px; }
.typing i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; animation: pulse 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }

/* ---- responsive ---- */
@media (max-width: 960px) {
  .job-form { grid-template-columns: 1fr; }
  .form-aside { position: static; }
  .chat-layout { grid-template-columns: 1fr; height: auto; }
  .chat-side { flex-direction: row; flex-wrap: wrap; }
  .chat-list { flex-direction: row; overflow-x: auto; flex-basis: 100%; }
  .chat-main { height: 75vh; }
}
@media (max-width: 720px) {
  .top { height: auto; flex-wrap: wrap; padding: .5rem 1rem; gap: .5rem; }
  .nav { order: 3; flex-basis: 100%; }
  .usermenu { margin-left: auto; }
  .who { display: none; }
  .main { padding: 1rem 1rem 2rem; }
  h1 { font-size: 1.35rem; }
  .timeline li { grid-template-columns: 6.5rem 1fr; }
  .timeline .since { display: none; }
  .msg { max-width: 92%; }
  .usage li { grid-template-columns: 7rem 1fr 4.5rem; }
  .plain.cols { columns: 1; }
}

/* ---- confirm dialog ---- */
dialog.confirm { max-width: 420px; width: calc(100% - 2rem); color: var(--ink); background: var(--surface); padding: 1.25rem; margin: auto; border: 0; border-top: 4px solid var(--fail); }
dialog.confirm::backdrop { background: rgb(17 19 22 / 0.45); }
dialog.confirm .row-actions { justify-content: flex-end; margin-top: 1rem; }

/* ---- job form: assistant side panel ---- */
.ai-drawer { position: fixed; top: 56px; right: 0; bottom: 0; width: 380px; z-index: 12; display: flex; flex-direction: column;
  background: var(--surface); border-left: 1px solid var(--line); box-shadow: -8px 0 24px rgb(0 0 0 / 0.06); }
.ai-drawer-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .5rem; padding: .9rem 1rem .6rem; border-bottom: 1px solid var(--line); }
.ai-drawer-head p { margin: .2rem 0 0; }
.ai-drawer .messages { padding: 1rem; gap: .75rem; }
.ai-drawer .chat-intro { margin: 0; text-align: left; align-items: flex-start; }
.ai-drawer .suggestions { justify-content: flex-start; }
.ai-drawer .chip-btn { text-align: left; border-radius: var(--radius-sm); }
.ai-drawer .msg { max-width: 92%; font-size: .97rem; }
.ai-drawer .composer textarea { font-size: .97rem; }
.msg.filled { align-self: stretch; max-width: none; background: var(--ok-soft); color: var(--ink); border: 1px solid color-mix(in srgb, var(--ok) 35%, transparent); border-radius: var(--radius-sm); }
.msg.filled strong { color: var(--ok); }
.ai-toggle, .ai-close { display: none; }
body:has(.ai-drawer) .main, body:has(.ai-drawer) .foot { margin-right: 380px; }
body:has(.ai-drawer) .main { max-width: none; margin-left: 0; width: auto; }
body:has(.ai-drawer) .job-form, body:has(.ai-drawer) .main > .page-head, body:has(.ai-drawer) .main > .flash { max-width: 1160px; margin-left: auto; margin-right: auto; }
.just-filled { animation: filled 2.4s ease-out; border-radius: var(--radius-sm); }
@keyframes filled { 0%, 40% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 45%, transparent); } 100% { box-shadow: 0 0 0 3px transparent; } }
@media (max-width: 1180px) {
  body:has(.ai-drawer) .main, body:has(.ai-drawer) .foot { margin-right: auto; }
  body:has(.ai-drawer) .main { margin-left: auto; max-width: 1200px; }
  .ai-toggle, .ai-close { display: inline-flex; }
  .ai-drawer { width: min(420px, 100vw); transform: translateX(105%); transition: transform .2s ease; box-shadow: var(--shadow-pop); }
  .ai-drawer.open { transform: none; }
}
@media (max-width: 720px) { .ai-drawer { top: 0; z-index: 30; } }
@media (prefers-reduced-motion: reduce) { .ai-drawer { transition: none; } .just-filled { animation: none; } }

/* ---- the timetable ---- */
.attention { background: var(--fail-soft); color: var(--fail); padding: .9rem 1.1rem; margin-bottom: 1.5rem; }
.attention h2 { color: inherit; margin-bottom: .35rem; }
.attention ul { list-style: none; margin: 0; padding: 0; }
.attention li { padding: .2rem 0; color: var(--ink); }
.attention a { color: inherit; font-weight: 650; }
.notice { margin-bottom: 1.5rem; }
.notice h2 { margin-bottom: .35rem; }
.timetable td { padding: .5rem .8rem; border-bottom: 1px solid var(--line); vertical-align: baseline; }
.timetable .tt-time { width: 8rem; font-size: 1.55rem; line-height: 1.2; font-weight: 750; font-stretch: 80%; white-space: nowrap; }
.timetable .tt-repeat { color: var(--muted); font-weight: 500; }
.timetable tr.tt-hour td { border-top: 2px solid var(--line-strong); }
.timetable tbody tr:first-child td { border-top: 0; }
.timetable tr.tt-now td { background: var(--accent); color: var(--accent-ink); font-weight: 700; padding: .25rem .8rem; border: 0; }
.timetable tr.tt-now:hover td { background: var(--accent); }
.timetable tr.is-failed .tt-time { color: var(--fail); }
.timetable tr.is-due .tt-result { color: var(--ink-2); }
.timetable .tt-job a { font-weight: 650; color: var(--ink); }
.timetable .tt-note { display: block; color: var(--muted); font-size: .92rem; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: .5rem; }
.section-head h2 { font-size: 1.25rem; margin: 0; }
.schedule-custom { margin-top: .5rem; }
.preview { background: var(--surface-2); padding: 1rem; border-top: 4px solid var(--accent); }
.tool-card, .dept-card { text-decoration: none; }
.tool-card:hover .tool-name, .dept-card:hover .tool-name { text-decoration: underline; }
.nav-more { margin-left: -1.25rem; }
.row > .field:has(#notify_on) { grid-column: span 2; }
.tt-section { margin-top: .5rem; }
@media (max-width: 720px) {
  .top { padding: .5rem 1rem 0; }
  .nav a { padding: .5rem .7rem; }
  .nav-more { margin-left: 0; }
  .nav-more > summary { padding: .25rem .5rem; }
  .row > .field:has(#notify_on) { grid-column: auto; }
  .timetable thead, .timetable .tt-dept { display: none; }
  .timetable tr { display: grid; grid-template-columns: 1fr auto; padding: .5rem .25rem; border-bottom: 1px solid var(--line); }
  .timetable tr.tt-hour { border-top: 2px solid var(--line-strong); }
  .timetable tr.tt-now { padding: .25rem .5rem; background: var(--accent); border: 0; }
  .timetable td, .timetable tr.tt-hour td { padding: 0; border: 0; }
  .timetable tr.tt-now td { padding: 0; }
  .timetable .tt-time { width: auto; grid-column: 1; grid-row: 1; font-size: 1.05rem; }
  .timetable .tt-result { grid-column: 2; grid-row: 1; text-align: right; }
  .timetable .tt-job { grid-column: 1 / -1; grid-row: 2; margin-top: .15rem; }
}
.timetable tr.tt-day td { background: var(--surface-2); font-weight: 700; padding: .35rem .8rem; border-top: 2px solid var(--line-strong); }
.timetable tr.is-failed .tt-result .badge { background: var(--fail); color: var(--bg); font-size: .97rem; padding: .15rem .6rem; }
.fail-why { display: block; color: var(--ink-2); font-size: .97rem; margin-bottom: .35rem; }
.fail-why a { font-weight: 500; }
::placeholder { color: var(--muted); opacity: 1; }
.has-caret::after { content: ""; width: 0; height: 0; margin-left: .4rem; border: 4px solid transparent; border-top-color: currentColor; border-bottom-width: 0; }
.popover[open] > .has-caret::after { transform: rotate(180deg); }
.stat-line span + span::before { content: " · "; }
.chip-btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.more-options > summary, .schedule-custom > summary { cursor: pointer; font-weight: 650; }
.more-options[open] > summary { margin-bottom: .75rem; }
.more-options .check { margin-top: .75rem; }
.schedule-custom .field { margin-top: .5rem; }
.day-picker legend { margin-bottom: .35rem; }
.day-time { margin-left: .5rem; }
.day-time input { width: auto; }
details.card > summary { padding-bottom: .6rem; }
.chart-section { margin-top: 2rem; }
@media (max-width: 960px) {
  .form-main { display: contents; }
  .job-form > *, .form-main > * { min-width: 0; }
  .form-aside { order: 2; }
  .form-actions { order: 3; }
}
@media (max-width: 720px) {
  .row, .args { grid-template-columns: minmax(0, 1fr); }
  .nav { flex-basis: 100%; justify-content: space-between; }
  .nav a { padding: .5rem .3rem; font-size: .97rem; }
  .runs .run-trigger { display: none; }
  .timetable .tt-time { font-size: 1.3rem; }
  .timetable tr.tt-day { padding: 0; }
  .timetable tr.tt-day td { grid-column: 1 / -1; padding: .35rem .5rem; }
  .runs thead { display: none; }
  .runs tr { display: flex; flex-wrap: wrap; gap: .1rem .6rem; padding: .5rem 0; border-bottom: 1px solid var(--line); }
  .runs td { padding: 0; border: 0; }
  .runs td.summary { flex-basis: 100%; min-width: 0; max-width: none; }
}

/* ---- modern surfaces ---- */
h1 { font-size: clamp(2.1rem, 3.4vw, 2.75rem); font-weight: 800; font-stretch: 100%; letter-spacing: -0.025em; line-height: 1.08; }
h1.mono { font-size: clamp(1.9rem, 3.2vw, 2.6rem); }
h2 { font-size: 1.4rem; font-weight: 750; letter-spacing: -0.012em; }
h3 { font-size: 1rem; }
.page-head { margin-bottom: 1.75rem; }
.sub { font-size: 1.08rem; color: var(--muted); margin-top: .6rem; }
.intro { color: var(--muted); margin: -.2rem 0 .9rem; font-size: 1.02rem; max-width: 70ch; }
.card-head { margin-bottom: .35rem; }
.top { height: 58px; box-shadow: 0 1px 0 var(--line); }
.brand { color: var(--ink); }
.brand .logo { color: var(--accent); }
.nav { gap: .2rem; align-self: center; }
.nav a, .nav-more > summary { padding: .5rem .9rem; border-radius: 999px; color: var(--ink-2); }
.nav a:hover, .nav-more > summary:hover { background: var(--surface-2); color: var(--ink); }
.nav a.active, .nav-more > summary.active { background: var(--accent-soft); color: var(--accent); box-shadow: none; font-weight: 700; }
.nav-more { margin-left: -1rem; align-self: center; display: block; }
.nav-more > summary { height: auto; }
.nav-more .popover-body { top: calc(100% + 8px); }
.usermenu summary { border-radius: 999px; color: var(--ink); }
.who { color: var(--ink); }
.avatar { border-radius: 50%; background: var(--accent); color: var(--accent-ink); }
.card { background: var(--surface); border-top: 0; border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1.25rem; box-shadow: var(--shadow); }
.card.flush { padding: .5rem; }
.card.callout { background: var(--warn-soft); }
.grid { gap: 1.25rem; margin-bottom: 1.25rem; }
.badge { border-radius: 999px; padding: .1rem .6rem; }
.chip { background: var(--surface-2); padding: .1rem .6rem .1rem .5rem; border-radius: 999px; }
.chip::before { border-radius: 50%; }
.btn { border-radius: 999px; padding: .6rem 1.2rem; font-weight: 650; border-color: var(--line-strong); transition: transform .12s ease-out, background-color .12s; }
.btn:active { transform: scale(.97); }
.btn.primary { box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 30%, transparent); }
.btn.small { padding: .3rem .8rem; }
.chip-btn { border-radius: 999px; padding: .4rem .9rem; border-color: var(--line-strong); }
.segmented { background: var(--surface-2); border: 0; border-radius: 999px; padding: 4px; gap: 2px; }
.segmented label { border-radius: 999px; padding: .4rem .95rem; }
input, select, textarea { border-color: var(--line-strong); border-radius: var(--radius-sm); padding: .6rem .8rem; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
input[type="checkbox"] { border-radius: 4px; }
/* One control height, so fields, dropdowns and buttons line up in any row. */
input:not([type="checkbox"], [type="radio"], [type="file"], [type="color"]), select { height: 2.75rem; }
.btn { min-height: 2.75rem; }
.btn.small { min-height: 2.1rem; }
select { appearance: none; padding-right: 2.25rem; text-overflow: ellipsis; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-size: 5px 5px; background-position: right 1.1rem center, right calc(1.1rem - 5px) center; background-repeat: no-repeat; }
.tabs { border-bottom: 0; gap: .35rem; margin-bottom: 1.25rem; }
.tabs a { border-radius: 999px; padding: .5rem 1rem; background: var(--surface); }
.flash { border-radius: 14px; }
.table th { background: transparent; color: var(--muted); font-size: .89rem; padding: .4rem .8rem; border-bottom: 1px solid var(--line); }
.disabled-group .table th { background: transparent; color: var(--muted); }
.table tbody tr:hover { background: var(--surface-2); }
.table tbody tr:hover td:first-child { border-radius: 10px 0 0 10px; }
.table tbody tr:hover td:last-child { border-radius: 0 10px 10px 0; }
.popover-body { border-color: var(--line); border-radius: 16px; }
dialog.confirm { border-top: 0; border-radius: var(--radius); box-shadow: var(--shadow-pop); }
.tool-card, .dept-card { transition: transform .15s ease-out, box-shadow .15s ease-out; }
.tool-card:hover, .dept-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-pop); }
.dept-card { border-top: 0; }
.dept-dot { border-radius: 50%; }
.step { display: inline-grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: .97rem; font-stretch: 100%; margin-right: .55rem; }
.bar { border-bottom: 0; border-radius: 6px; background: var(--surface-2); }
.b-ok { background: var(--ok); }
.meter { border-radius: 999px; }
.meter span { border-radius: 999px; }
.sq { border-radius: 3px; }
.ck { border-radius: 999px; }
pre.code { border: 0; }
code, .ph { border-radius: 6px; }
.msg { border-radius: 18px; }
.msg.user { border-bottom-right-radius: 6px; }
.msg.assistant { border-bottom-left-radius: 6px; }
.chat-main, .proposal { border-radius: var(--radius); }
.chat-list a { border-radius: 12px; }
.ai-drawer .chip-btn { border-radius: 14px; }
.attention { background: var(--fail-soft); border-radius: var(--radius); padding: 1.25rem 1.5rem; margin-bottom: 1.25rem; }
.attention h2 { margin-bottom: .1rem; }
.attention .intro { color: var(--ink-2); margin: 0 0 .6rem; }
.notice { margin-bottom: 1.25rem; }
.tt-section { margin-top: 0; }
.section-head { margin-bottom: .1rem; }
.section-head h2 { font-size: 1.4rem; }
.timetable .tt-time { width: 8rem; font-size: 1.5rem; font-weight: 750; font-stretch: 100%; letter-spacing: -0.02em; }
.timetable td { border-bottom: 1px solid var(--line); }
.timetable tr.tt-hour td { border-top: 1px solid var(--line-strong); }
.timetable tr.tt-now td { background: var(--now); color: var(--now-ink); padding: .3rem .8rem; }
.timetable tr.tt-now:hover td { background: var(--now); }
.timetable tr.tt-now td:first-child { border-radius: 999px 0 0 999px; padding-left: 1.1rem; }
.timetable tr.tt-now td:last-child { border-radius: 0 999px 999px 0; }
.timetable tr.tt-day td { border-top: 0; background: transparent; color: var(--accent); font-size: 1rem; padding-top: 1rem; }
.timetable tr.is-failed .tt-result .badge { background: var(--fail); color: var(--surface); }
.preview { border-top: 0; background: var(--accent-soft); }
.form-aside { top: 74px; }
.ai-drawer { top: 58px; }
body.bare { background: var(--accent); }
@media (prefers-color-scheme: dark) { body.bare { background: #14296b; } }
.login { color: #ffffff; }
.login h1 { font-size: 3rem; }
.login .muted, .login .help:not(.card .help) { color: #dbe5ff; }
.login-mark { color: #ffffff; }
.login .btn.primary { background: #ffffff; border-color: #ffffff; color: #1a45c4; box-shadow: none; }
.login .btn.primary:hover { background: #e4ecff; }
.login .card { border-radius: var(--radius); }
.login .card .btn.wide { color: var(--ink); }
.breakglass summary { color: #dbe5ff; }
.error-code { font-size: 6rem; }
@media (max-width: 720px) {
  h1 { font-size: 2.1rem; }
  .top { height: auto; padding: .6rem 1rem .5rem; }
  .nav a { padding: .4rem .55rem; font-size: .97rem; }
  .nav-more { margin-left: 0; }
  .card { padding: 1.1rem; }
  .timetable tr.tt-now { background: var(--now); border-radius: 999px; padding: .25rem 1rem; }
  .timetable tr.tt-now td, .timetable tr.tt-now td:first-child, .timetable tr.tt-now td:last-child { padding: 0; background: transparent; border-radius: 0; }
  .timetable tr.tt-now td:last-child { grid-column: 2; grid-row: 1; align-self: center; }
  .timetable .tt-time { font-size: 1.4rem; }
  .timetable td, .timetable tr.tt-hour td { border: 0; }
  .timetable tr.tt-hour { border-top: 1px solid var(--line-strong); }
}
.btn.danger { color: var(--surface); }
@media (max-width: 720px) {
  .nav { gap: 0; }
  .nav a { padding: .4rem .45rem; font-size: .88rem; }
}
/* Sub-headings and navigation, one step larger. */
h2, .section-head h2 { font-size: 1.65rem; }
h3 { font-size: 1.2rem; }
.sub { font-size: 1.15rem; }
@media (min-width: 721px) {
  .nav a, .nav-more > summary { font-size: 1.08rem; }
  .brand { font-size: 1.25rem; }
}
@media (max-width: 720px) {
  h2, .section-head h2 { font-size: 1.45rem; }
  .nav a { padding: .4rem .4rem; }
}
.tool-name { font-size: 1.45rem; font-weight: 750; letter-spacing: -0.012em; line-height: 1.2; color: var(--ink); overflow-wrap: anywhere; }
/* Tool cards: the same four rows line up across every card in a row. */
.tool-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.25rem; align-items: stretch; }
.tool-card { display: grid; grid-row: span 4; grid-template-rows: subgrid; row-gap: .5rem; align-content: start; }
.tool-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .75rem; }
.tool-card .tool-desc { margin: .25rem 0; }
.tool-card-foot { align-self: end; padding-top: .35rem; }
.dept-card .tool-card-foot { align-self: stretch; margin-top: auto; }
.dept-card { background: color-mix(in srgb, var(--c) 9%, var(--surface)); }
.dept-card .tool-card-head { flex-wrap: nowrap; gap: .75rem; }
.dept-mark { flex: none; width: 2.75rem; height: 2.75rem; display: grid; place-items: center; border-radius: 14px; background: color-mix(in srgb, var(--c) 88%, black); color: #ffffff; font-size: 1.3rem; font-weight: 800; }
.chat-layout { height: calc(100vh - 58px - 3rem - 60px - 7.5rem); min-height: 460px; }
@media (max-width: 960px) { .chat-layout { height: auto; } }
.status-line { font-size: 1.65rem; font-weight: 750; letter-spacing: -0.012em; line-height: 1.2; margin: .6rem 0 0; }
.status-line.is-bad { color: var(--fail); }
.status-line + .sub { margin-top: .3rem; }
@media (max-width: 720px) { .status-line { font-size: 1.45rem; } }
/* Everything is sized in rem, so the root sets the overall scale. Phones keep the full size. */
html { font-size: 85%; }
@media (max-width: 720px) { html { font-size: 100%; } }
