/* The owner's desk: sign-in, the table of artifacts, the details dialog and the connect guide. Compact. */

.top { display: flex; align-items: center; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap;
  width: min(1080px, 100% - 32px); margin: 0 auto; padding: 12px 0; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 8px; font: 600 var(--t2)/1 var(--serif); letter-spacing: -0.01em; }
.brand img { width: 22px; height: 22px; border-radius: 5px; }
nav { display: flex; gap: 2px; flex-wrap: wrap; margin-inline: -8px; }
nav button { border-color: transparent; color: var(--muted); padding: 0 8px; border-radius: 0; border-bottom: 2px solid transparent; min-height: 30px; font-weight: 500; }
nav button:hover { color: var(--ink); border-color: transparent; border-bottom-color: var(--line); }
nav button[aria-current='page'] { color: var(--ink); border-bottom-color: var(--pen); }

main { width: min(1080px, 100% - 32px); margin: 0 auto; padding: 24px 0 72px; display: grid; gap: 24px; align-content: start; }

.page-head { display: flex; align-items: end; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; }
.page-title { font: 500 var(--t5)/1.1 var(--serif); letter-spacing: -0.015em; font-variation-settings: 'opsz' 36; text-wrap: balance; }
.lede { font: 400 var(--t1)/1.5 var(--serif); color: var(--muted); max-width: 60ch; margin-top: 4px; }
.section-title { font: 500 var(--t3)/1.2 var(--serif); letter-spacing: -0.01em; margin-bottom: 2px; }
.error { color: var(--danger); font-weight: 500; }

/* Sign in */
.stack { display: grid; gap: 12px; max-width: 320px; }
.field { display: grid; gap: 4px; }
.field > span { font-size: var(--t-1); color: var(--muted); font-weight: 560; }
.hint { font-size: var(--t-1); color: var(--muted); max-width: 60ch; }

/* Artifacts shared with everyone, on the sign-in page */
.public-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }

/* The table of artifacts */
.tools { display: flex; gap: 8px; align-items: center; }
.tools input { width: min(260px, 100%); }
.grid { width: 100%; border-collapse: collapse; }
.grid th { text-align: left; font-weight: 560; font-size: var(--t-1); color: var(--muted); padding: 6px 16px 6px 0; border-bottom: 1px solid var(--ink); white-space: nowrap; }
.grid td { padding: 11px 16px 11px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.grid tr:hover td { background: color-mix(in srgb, var(--ink) 4%, transparent); }
.grid .activity { width: 190px; }
.grid .actions { text-align: right; white-space: nowrap; padding-right: 0; }
.grid .actions > * + * { margin-left: 12px; }
.row-title { font: 600 17px/22px var(--serif); letter-spacing: -0.005em; color: var(--ink); text-decoration: none; font-variation-settings: 'opsz' 20; }
.row-title:hover { color: var(--pen); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
.sub { display: block; color: var(--muted); font-size: 12px; line-height: 16px; }
.mode-select { min-height: 30px; padding: 2px 24px 2px 8px; font-size: var(--t0); font-weight: 500; }
.grid .actions button, .grid .actions .button { min-height: 32px; font-size: var(--t0); }
.grid .actions button.quiet { padding: 0; min-height: 32px; border: 0; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.grid .actions button.quiet:hover { color: var(--ink); }

/* Activity: what needs you above what has happened. The yellow badge is the only yellow in the table. */
.activity-cell { display: grid; gap: 2px; justify-items: start; line-height: 16px; font-size: 12px; }
.badge { padding: 1px 8px; border-radius: 3px; background: var(--mark); color: var(--ink); font-weight: 560; white-space: nowrap; }

/* Active and archived */
.tabs { display: flex; gap: 2px; margin-inline: -8px; }
.tabs button { border-color: transparent; color: var(--muted); padding: 0 8px; border-radius: 0; border-bottom: 2px solid transparent; min-height: 30px; font-weight: 500; }
.tabs button:hover { color: var(--ink); border-bottom-color: var(--line); }
.tabs button[aria-current='true'] { color: var(--ink); border-bottom-color: var(--pen); }
.archived-note { color: var(--muted); font-size: var(--t-1); }

.status { display: inline-flex; align-items: center; gap: 6px; }
.status svg { width: 14px; height: 14px; flex: none; }

/* Details dialog */
dialog.dlg { width: min(600px, 100% - 24px); max-height: min(86dvh, 760px); padding: 0; border: 1px solid var(--ink); border-radius: var(--radius);
  background: var(--paper); color: var(--ink); box-shadow: 6px 6px 0 var(--edge); overflow: hidden; }
dialog.dlg[open] { display: flex; flex-direction: column; animation: pop 0.14s ease-out; }
dialog.dlg::backdrop { background: rgb(10 9 30 / 55%); }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(0.99); } to { opacity: 1; transform: none; } }
.dlg-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; padding: 14px 16px 10px; border-bottom: 1px solid var(--line); }
.dlg-head h2 { font: 560 var(--t3)/1.2 var(--serif); letter-spacing: -0.01em; font-variation-settings: 'opsz' 28; }
.dlg-body { padding: 16px 16px 20px; overflow: auto; display: grid; gap: 24px; }
.dlg-body h3 { font: 560 var(--t1)/1.3 var(--sans); margin-bottom: 6px; }
.modes { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--field-line); border-radius: var(--radius); overflow: hidden; }
.modes button { border: 0; border-radius: 0; justify-content: center; font-weight: 500; color: var(--muted); }
.modes button + button { border-left: 1px solid var(--field-line); }
.modes button[aria-checked='true'] { background: var(--ink); color: var(--paper); }
.mode-help { color: var(--muted); margin-top: 6px; max-width: 60ch; }
.linkrow { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.linkrow input { flex: 1 1 220px; min-width: 0; font-family: var(--mono); font-size: var(--t-1); }
.answers { display: grid; gap: 10px; }
.answer { border-left: 2px solid var(--ink); padding: 0 0 0 10px; }
.answer dl { margin: 4px 0 0; display: grid; grid-template-columns: max-content 1fr; gap: 1px 12px; }
.answer dt { color: var(--muted); } .answer dd { margin: 0; overflow-wrap: anywhere; }
.dlg-foot { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 0; padding-top: 24px; border-top: 1px solid var(--line); }
.dlg-foot button.quiet { padding: 0 8px; margin-left: -8px; }
.dlg-foot button.quiet + button.quiet { margin-left: 0; }
.note-line { font: 400 var(--t1)/1.5 var(--serif); }
.note-line.done { color: var(--muted); }

/* Empty state */
.empty { display: grid; gap: 12px; justify-items: start; padding: 4px 0; }
.empty p { font: 400 var(--t2)/1.4 var(--serif); max-width: 36ch; }

/* Connect guide: a real sequence, so the steps are numbered */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 24px; counter-reset: step; max-width: 760px; }
.step { display: grid; grid-template-columns: 40px 1fr; gap: 0 8px; }
.step::before { counter-increment: step; content: counter(step); font: italic 400 var(--t5)/0.95 var(--serif); color: var(--muted); }
.step > div { display: grid; gap: 10px; justify-items: start; min-width: 0; }
.step .section-title { margin: 0; }
.step p { max-width: 680px; }
.code { margin: 0; width: 100%; padding: 10px 12px; background: var(--surface); color: var(--ink); border: 1px solid var(--field-line); border-radius: var(--radius); font: 400 var(--t-1)/1.55 var(--mono); overflow-x: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.token-new { width: 100%; display: grid; gap: 8px; padding: 12px; background: var(--surface); color: var(--ink); border: 1px solid var(--ink); border-radius: var(--radius); box-shadow: 4px 4px 0 var(--edge); }
.token-new .code { border: 0; padding: 0; background: transparent; }
.tokens { width: 100%; border-collapse: collapse; }
.tokens th { text-align: left; font-weight: 560; color: var(--muted); font-size: var(--t-1); padding: 6px 12px 6px 0; border-bottom: 1px solid var(--ink); }
.tokens td { padding: 6px 12px 6px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tokens code { font-family: var(--mono); font-size: var(--t-1); }
.inline { display: flex; gap: 6px; flex-wrap: wrap; width: 100%; }
.inline input { flex: 1 1 200px; min-width: 0; }

/* Narrow screens: each table row becomes a small block. */
@media (max-width: 760px) {
  .grid thead { display: none; }
  .grid, .grid tbody { display: block; }
  .grid tr { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .grid td { display: block; padding: 0; border: 0; }
  .grid td.title { flex: 1 1 100%; }
  .grid .actions { margin-left: auto; }
  .grid td.optional { display: none; }
  .step { grid-template-columns: 28px 1fr; }
}
