:root {
  --ink: #172321;
  --muted: #64716e;
  --paper: #f6f4ed;
  --surface: #fffdf8;
  --line: #dcded6;
  --moss: #244f43;
  --moss-bright: #377964;
  --mint: #dcebe3;
  --coral: #d96a4c;
  --coral-soft: #f8e1d8;
  --amber: #a86d1e;
  --amber-soft: #f6e9c9;
  --shadow: 0 18px 55px rgba(29, 51, 45, 0.11);
  --radius: 18px;
  --workspace-max: 1440px;
  --form-max: 640px;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { background: var(--paper); }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 82% 0%, rgba(209, 231, 218, 0.75), transparent 28rem),
    var(--paper);
}

main,
.workspace,
.sidebar,
.work-surface,
#queue-workspace,
.tab-panel,
.todo-layout,
.todo-layout > *,
.queue-header > div { min-width: 0; }

p,
h1,
h2,
h3,
strong,
small,
summary,
dt,
dd,
td,
th { overflow-wrap: anywhere; }

button, input, textarea, select { font: inherit; }
button { color: inherit; }

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(217, 106, 76, 0.45);
  outline-offset: 2px;
}

[hidden] { display: none !important; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  background: var(--ink);
  color: white;
  transform: translateY(-180%);
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  min-height: 76px;
  border-bottom: 1px solid rgba(23, 35, 33, 0.09);
  background: rgba(246, 244, 237, 0.86);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-header-inner {
  width: 100%;
  max-width: var(--workspace-max);
  min-height: 75px;
  margin-inline: auto;
  padding: 0.7rem 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px 13px 13px 4px;
  background: var(--moss);
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.4rem;
  box-shadow: 0 8px 22px rgba(36, 79, 67, 0.2);
}

.brand strong,
.brand small { display: block; }
.brand strong { letter-spacing: -0.02em; }
.brand small { color: var(--muted); font-size: 0.72rem; margin-top: 0.1rem; }

.header-actions { min-width: 0; display: flex; align-items: center; gap: 0.7rem; }

.environment-badge {
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--muted);
  font: 700 0.7rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.button {
  border: 1px solid transparent;
  border-radius: 999px;
  min-height: 44px;
  padding: 0.65rem 1rem;
  cursor: pointer;
  font-weight: 720;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease;
}

.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:disabled { cursor: not-allowed; opacity: 0.56; }
.button-primary { background: var(--moss); color: #fff; box-shadow: 0 8px 22px rgba(36, 79, 67, 0.17); }
.button-primary:hover:not(:disabled) { background: var(--moss-bright); }
.button-quiet { background: var(--surface); border-color: var(--line); }
.button-danger { background: var(--coral-soft); color: #8d321c; border-color: #efb6a6; }

.live-region {
  position: fixed;
  z-index: 50;
  top: 88px;
  right: clamp(1rem, 4vw, 4rem);
  max-width: min(440px, calc(100vw - 2rem));
}

.notice {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 0.9rem 0.8rem 1rem;
  border-radius: 14px;
  box-shadow: var(--shadow);
  background: var(--surface);
  border: 1px solid var(--line);
}

.notice-error { border-color: #e7aa99; background: #fff7f3; }
.notice-success { border-color: #9fc7b8; background: #f3fbf7; }

.welcome {
  min-height: calc(100vh - 76px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 8vw, 8rem);
  width: min(1180px, calc(100% - 1.5rem));
  margin: 0 auto;
  padding: 2.3rem 0 4rem;
}

.eyebrow {
  margin: 0 0 0.7rem;
  color: var(--moss-bright);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.welcome h1 {
  margin: 0;
  max-width: 780px;
  font: 500 clamp(3rem, 7vw, 6.8rem)/0.94 Georgia, "Times New Roman", serif;
  letter-spacing: -0.055em;
}

.welcome-intro {
  max-width: 620px;
  margin: 1.8rem 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.65;
}

.setup-note { color: var(--muted); font-size: 0.84rem; }

.welcome-art {
  min-width: 0;
  min-height: 370px;
  position: relative;
  display: grid;
  place-items: center;
  overflow: clip;
}

.welcome-art::before {
  content: "";
  position: absolute;
  width: min(470px, 86vw);
  aspect-ratio: 1;
  border: 1px solid rgba(36, 79, 67, 0.13);
  border-radius: 50%;
  box-shadow: inset 0 0 0 54px rgba(255, 255, 255, 0.19);
}

.sample-card {
  position: absolute;
  width: min(360px, 78vw);
  padding: 1.5rem;
  border: 1px solid rgba(23, 35, 33, 0.1);
  border-radius: 26px 26px 26px 8px;
  background: rgba(255, 253, 248, 0.94);
  box-shadow: var(--shadow);
}

.sample-card strong { display: block; margin: 1.1rem 0 0.45rem; font: 500 1.55rem/1.15 Georgia, serif; }
.sample-card p, .sample-card small { color: var(--muted); line-height: 1.5; }
.sample-card-back { transform: translate(16%, -43%) rotate(7deg); opacity: 0.67; }
.sample-card-front { transform: translate(-8%, 13%) rotate(-3deg); }
.sample-line { display: block; width: 82%; height: 7px; margin-top: 1.4rem; border-radius: 99px; background: var(--mint); }
.sample-line-short { width: 56%; margin-top: 0.6rem; }

.status-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: #e9ece8;
  color: #53605d;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: capitalize;
}

.status-open { background: var(--amber-soft); color: #75501c; }
.status-answered, .status-active { background: var(--mint); color: var(--moss); }
.status-cancelled, .status-archived { background: #ece9e4; color: #6e6a63; }

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  max-width: var(--workspace-max);
  min-height: calc(100vh - 76px);
  margin-inline: auto;
  border-inline: 1px solid var(--line);
}

.sidebar {
  padding: 1rem;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.56);
}

.tenant-card {
  padding: 1rem;
  border-radius: 15px;
  background: var(--moss);
  color: #fff;
}

.tenant-card .eyebrow { color: #afd5c6; margin-bottom: 0.4rem; }
.tenant-card strong, .tenant-card small { display: block; }
.tenant-card small { color: #c6d9d2; margin-top: 0.2rem; }
.tenant-edit { margin-top: 0.8rem; font-size: 0.78rem; }
.tenant-edit summary { cursor: pointer; color: #d8ebe4; }
.tenant-edit form { display: grid; gap: 0.6rem; margin-top: 0.7rem; }
.tenant-edit label { color: #fff; }

.sidebar-heading { display: flex; align-items: center; justify-content: space-between; margin: 1.7rem 0 0.7rem; }
.sidebar-heading h2 { margin: 0; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.1em; }
.sidebar-heading span { color: var(--muted); font-size: 0.78rem; }

.queue-list { display: flex; gap: 0.35rem; overflow-x: auto; padding-bottom: 0.4rem; }
.queue-link {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  padding: 0.75rem;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  min-width: 210px;
  min-height: 44px;
}
.queue-link span { min-width: 0; overflow-wrap: anywhere; }
.queue-link::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #9aa39f; }
.queue-link[data-state="active"]::before { background: var(--moss-bright); }
.queue-link[aria-current="true"] { background: var(--surface); border-color: var(--line); box-shadow: 0 7px 20px rgba(29, 51, 45, 0.06); }
.queue-link small { color: var(--muted); }

.create-panel { margin-top: 1rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.create-panel summary { cursor: pointer; color: var(--moss); font-weight: 750; }
.create-panel form { display: grid; gap: 0.7rem; margin-top: 0.9rem; }

label { display: grid; gap: 0.36rem; color: #41504c; font-size: 0.78rem; font-weight: 720; }
label small { color: var(--muted); font-weight: 500; }
input, textarea, select {
  min-width: 0;
  width: 100%;
  border: 1px solid #cfd3cc;
  border-radius: 10px;
  padding: 0.68rem 0.75rem;
  background: #fff;
  color: var(--ink);
}
textarea { resize: vertical; }

fieldset { min-width: 0; }
.checkbox-control { display: flex; align-items: center; align-self: center; gap: 0.5rem; min-height: 44px; }
.checkbox-control input { width: auto; }
.markdown-editor { display: grid; gap: 0.65rem; margin: 0; padding: 0.8rem; border: 1px solid var(--line); border-radius: 12px; }
.markdown-editor legend { color: #41504c; font-size: 0.78rem; font-weight: 720; }
.write-preview-tabs { display: flex; width: fit-content; border: 1px solid var(--line); border-radius: 999px; overflow: clip; }
.write-preview-tabs button { min-height: 40px; padding: 0.45rem 0.85rem; border: 0; background: transparent; cursor: pointer; font-weight: 720; }
.write-preview-tabs button[aria-selected="true"] { background: var(--moss); color: white; }
.markdown-body { min-width: 0; overflow-wrap: anywhere; line-height: 1.6; }
.markdown-body > :first-child { margin-top: 0; }
.markdown-body > :last-child { margin-bottom: 0; }
.markdown-body pre, .markdown-body table { max-width: 100%; overflow-x: auto; }
.markdown-body pre { padding: 0.8rem; border-radius: 10px; background: #edf0ec; white-space: pre; }
.markdown-body code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.markdown-body table { display: block; border-collapse: collapse; }
.markdown-body th, .markdown-body td { min-width: 8rem; }
.markdown-body blockquote { margin-inline: 0; padding-left: 1rem; border-left: 4px solid var(--mint); color: var(--muted); }
.label-strip, .todo-card-labels { display: flex; flex-wrap: wrap; gap: 0.35rem; min-width: 0; }
.todo-card-labels { grid-column: 1 / -1; }
.label-chip { display: inline-flex; align-items: center; gap: 0.35rem; max-width: 100%; padding: 0.22rem 0.55rem; border: 1px solid #94b3a7; border-radius: 999px; background: var(--mint); color: var(--moss); font-size: 0.7rem; font-weight: 760; overflow-wrap: anywhere; }
.label-chip[data-archived="true"] { border-style: dashed; background: #ece9e4; color: #6e6a63; }
.label-color-swatch { flex: 0 0 auto; width: 0.85rem; height: 0.85rem; min-height: 0; padding: 0; border: 1px solid currentColor; border-radius: 50%; opacity: 1; }

.work-surface { min-width: 0; padding: 1rem; }
.blank-state { min-height: 68vh; display: grid; place-content: center; justify-items: center; text-align: center; color: var(--muted); }
.blank-state h2, .blank-state h3 { color: var(--ink); font-family: Georgia, serif; font-weight: 500; margin: 1rem 0 0; }
.blank-state p { max-width: 440px; line-height: 1.55; }
.blank-state-small { min-height: 280px; }
.blank-orbit { width: 68px; aspect-ratio: 1; border: 1px solid var(--moss-bright); border-radius: 50%; position: relative; }
.blank-orbit::after { content: ""; position: absolute; width: 14px; aspect-ratio: 1; border-radius: 50%; background: var(--coral); top: -7px; left: 27px; }

.queue-header { display: grid; align-items: flex-start; justify-content: stretch; gap: 1rem; }
.queue-header h1 { margin: 0; font: 500 clamp(2.2rem, 5vw, 4.6rem)/1 Georgia, serif; letter-spacing: -0.04em; }
.queue-header > div > p:last-child { color: var(--muted); max-width: 650px; }

.tabs { display: flex; gap: 0.2rem; margin: 2rem 0 1.3rem; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button { min-height: 44px; border: 0; border-bottom: 3px solid transparent; background: transparent; padding: 0.8rem 1rem; cursor: pointer; color: var(--muted); font-weight: 720; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--coral); }

.toolbar { display: grid; align-items: end; gap: 0.8rem; margin-bottom: 1rem; }
.filter-control { min-width: 145px; }
.toolbar .button { width: 100%; }

.editor-card {
  display: grid;
  gap: 1rem;
  padding: 1.2rem;
  margin-bottom: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 12px 32px rgba(29, 51, 45, 0.07);
  max-width: var(--form-max);
}
.editor-card h3 { margin: 0; font: 500 1.4rem Georgia, serif; }
.editor-heading { display: flex; justify-content: space-between; align-items: center; }
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.8rem; }
.full-width { grid-column: auto; }
.editor-card > .button { justify-self: start; }

.icon-button { width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; background: #fff; cursor: pointer; font-size: 1.25rem; }
.todo-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; align-items: start; }
.todo-list { display: grid; gap: 0.6rem; }
.todo-card {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 253, 248, 0.76);
  text-align: left;
  cursor: pointer;
}
.todo-card:hover, .todo-card[aria-current="true"] { border-color: #9eb9ad; background: var(--surface); box-shadow: 0 10px 24px rgba(29, 51, 45, 0.07); }
.todo-card strong { font-size: 1rem; }
.todo-card p { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 0.82rem; }
.todo-card small { color: var(--muted); }

.todo-detail { position: static; max-height: none; overflow-y: visible; padding: 1.35rem; border: 1px solid var(--line); border-radius: 22px 22px 22px 8px; background: var(--surface); box-shadow: var(--shadow); }
.detail-close { float: right; }
.outcome-marker { display: inline-flex; align-items: center; gap: 0.45rem; margin: 0 0 0.8rem; padding: 0.38rem 0.65rem; border: 1px solid currentColor; border-radius: 999px; font-size: 0.75rem; font-weight: 780; }
.outcome-marker::before { content: ""; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: currentColor; }
.outcome-pending, [data-state="loading"] { color: #6a5717; background: #fff9dc; }
.outcome-approved { color: #1d644f; background: #e6f5ed; }
.outcome-rejected, [data-state="permission-denied"], [data-state="retry-error"] { color: #8b362b; background: #fff0eb; }
.outcome-cancelled, .outcome-already-completed { color: #5e6671; background: #f1f3f5; }
.outcome-stale, [data-state="stale"], [data-state="conflict"] { color: #875115; background: #fff2dc; }
.todo-detail h2 { margin: 0 0 0.8rem; font: 500 2rem/1.1 Georgia, serif; }
.todo-detail > p:not(.eyebrow) { color: var(--muted); white-space: pre-wrap; line-height: 1.55; }
.metadata { display: grid; grid-template-columns: max-content 1fr; gap: 0.4rem 0.9rem; padding: 1rem 0; border-block: 1px solid var(--line); font-size: 0.8rem; }
.metadata dt { color: var(--muted); }
.metadata dd { margin: 0; overflow-wrap: anywhere; }
.response-form { display: grid; gap: 0.8rem; margin-top: 1rem; }
.response-form h3 { margin-bottom: 0; font: 500 1.3rem Georgia, serif; }
.response-history { margin-top: 1rem; }
.response-item { padding: 0.8rem 0; border-bottom: 1px solid var(--line); }
.response-item pre { max-width: 100%; overflow-x: auto; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.76rem; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1rem; }
.discussion { margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.discussion > h3 { font: 500 1.3rem Georgia, serif; }
.discussion form { display: grid; gap: 0.7rem; margin-top: 0.8rem; }
.comment-card { display: grid; gap: 0.7rem; padding: 0.85rem 0; border-bottom: 1px solid var(--line); }
.comment-card header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem; }
.comment-card small { color: var(--muted); }
.comment-card[data-state="archived"] .markdown-body { color: var(--muted); opacity: 0.72; }
.card-actions { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.card-actions .button { min-height: 38px; padding-block: 0.42rem; font-size: 0.76rem; }
.product-history { margin-top: 1rem; }
.product-history summary { cursor: pointer; color: var(--moss); font-weight: 750; }
.history-row { display: block; width: 100%; min-height: 40px; padding: 0.55rem; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; }
.timeline-list { display: grid; gap: 0.5rem; padding-left: 1.2rem; }
.timeline-list strong, .timeline-list small { display: block; }
.timeline-list small { color: var(--muted); }
.detail-editor { margin-top: 1rem; }
.detail-editor summary { cursor: pointer; color: var(--moss); font-weight: 750; }
.detail-editor form { display: grid; gap: 0.7rem; margin-top: 0.8rem; }

.inline-form { display: grid; grid-template-columns: minmax(0, 1fr); align-items: end; gap: 0.8rem; max-width: var(--form-max); margin-bottom: 1rem; }
.table-wrap { max-width: 100%; overflow-x: auto; contain: paint; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; min-width: 640px; border-collapse: collapse; }
th, td { padding: 0.8rem 1rem; border-bottom: 1px solid var(--line); text-align: left; font-size: 0.84rem; }
th { color: var(--muted); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; }
tr:last-child td { border-bottom: 0; }

.audit-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.65rem; }
.audit-list li { display: grid; grid-template-columns: 12px minmax(0, 1fr); gap: 0.8rem; align-items: start; padding: 0.85rem 1rem; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.audit-list li::before { content: ""; width: 9px; height: 9px; margin-top: 0.35rem; border-radius: 50%; background: var(--moss-bright); }
.audit-list strong, .audit-list small { display: block; }
.audit-list small, .audit-list time { color: var(--muted); font-size: 0.76rem; }

.danger-zone { margin-top: 1rem; display: flex; justify-content: space-between; align-items: stretch; flex-direction: column; gap: 1rem; padding: 1rem; border: 1px solid #e6b4a6; border-radius: var(--radius); background: #fff8f5; }
.danger-zone .button { width: 100%; }
.danger-zone p { margin: 0.25rem 0 0; color: var(--muted); }
.catalog-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.4rem; }
.section-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.7rem; }
.section-heading h2 { font: 500 1.6rem Georgia, serif; }
.catalog-list { display: grid; gap: 0.65rem; }
.catalog-card { display: grid; gap: 0.45rem; padding: 1rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.catalog-card p { margin: 0; color: var(--muted); }
.catalog-card small { color: var(--muted); }
.empty-note { color: var(--muted); font-size: 0.84rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

body[data-busy="true"] .work-surface { cursor: progress; }
body[data-busy="true"] .work-surface::after { content: ""; position: fixed; inset: 76px 0 auto; height: 3px; background: linear-gradient(90deg, transparent, var(--coral), transparent); animation: loading 1.1s linear infinite; }
@keyframes loading { from { transform: translateX(-55%); } to { transform: translateX(55%); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } }

.brand small,
.environment-badge { display: none; }
.welcome h1 { font-size: clamp(2.7rem, 14vw, 4.4rem); }
.sample-card { padding: 1.1rem; }

@media (min-width: 640px) {
  .site-header-inner { padding-inline: 1rem; }
  .brand small { display: block; }
  .environment-badge { display: inline-flex; }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .full-width { grid-column: 1 / -1; }
  .toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toolbar .button { grid-column: 1 / -1; }
  .inline-form { grid-template-columns: minmax(0, 1fr) 180px; }
  .inline-form .button { grid-column: 1 / -1; justify-self: start; }
  .danger-zone { align-items: center; flex-direction: row; }
  .danger-zone .button { width: auto; flex: 0 0 auto; }
  .audit-list li { grid-template-columns: 12px minmax(0, 1fr) auto; }
}

@media (min-width: 768px) {
  .workspace { grid-template-columns: 240px minmax(0, 1fr); }
  .sidebar { border-right: 1px solid var(--line); border-bottom: 0; }
  .queue-list { display: grid; overflow-x: visible; padding-bottom: 0; }
  .queue-link { min-width: 0; }
  .work-surface { padding: 1.25rem; }
}

@media (min-width: 1024px) {
  .site-header-inner { padding-inline: 1.5rem; }
  .welcome { grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr); padding: 4rem 0 6rem; }
  .welcome-art { min-height: 520px; overflow: visible; }
  .workspace { grid-template-columns: 270px minmax(0, 1fr); }
  .sidebar { padding: 1.4rem; }
  .work-surface { padding: clamp(2rem, 3vw, 2.5rem); }
  .queue-header { display: flex; justify-content: space-between; }
  .toolbar { display: flex; flex-wrap: wrap; }
  .toolbar .button { width: auto; margin-left: auto; }
  .inline-form { grid-template-columns: minmax(0, 1fr) 180px auto; }
  .inline-form .button { grid-column: auto; }
}

@media (min-width: 1280px) {
  .todo-layout { grid-template-columns: minmax(18rem, 0.9fr) minmax(22rem, 1.1fr); }
  .todo-detail { position: sticky; top: 94px; max-height: calc(100vh - 115px); overflow-y: auto; }
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
