:root {
  color-scheme: light;
  --background: #f8fafc;
  --foreground: #0f172a;
  --card: #fff;
  --primary: #1d4ed8;
  --primary-foreground: #fff;
  --accent: #eff6ff;
  --muted: #f1f5f9;
  --muted-foreground: #475569;
  --border: #dbe3ed;
  --input: #8291a6;
  --ring: #2563eb;
  --radius: .65rem;
  --destructive: #991b1b;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--background); color: var(--foreground); font: 1rem/1.55 system-ui, sans-serif; }
button, input, select { font: inherit; color: inherit; }
button, select, summary { cursor: pointer; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 3px; }
::selection { background: #dbeafe; color: #172554; }
p, h1, h2, h3, dl, dd { margin: 0; }
.workbench { width: min(100%, 51rem); margin: auto; padding: clamp(.875rem,4vw,2.5rem); }
.masthead { margin: 0 0 1.35rem; }
h1 { font-size: clamp(1.65rem, 4vw, 2.25rem); font-weight: 720; line-height: 1.15; letter-spacing: -.035em; max-width: 25ch; }
.masthead p, .help, .file-name { color: var(--muted-foreground); font-size: .9375rem; }
.masthead p { margin-top: .5rem; max-width: 58ch; }
.masthead[data-compact] p { display: none; }
.masthead[data-compact] h1 { font-size: 1.3rem; max-width: none; }
.progress { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .4rem; padding: 0; margin: 0 0 .875rem; list-style: none; }
.progress li { display: flex; align-items: center; gap: .4rem; min-height: 2.55rem; padding: .25rem .35rem; border-bottom: 2px solid var(--border); color: var(--muted-foreground); font-size: .9375rem; font-weight: 600; }
.progress li[aria-current] { border-color: var(--primary); color: var(--primary); }
.progress li span { display: grid; place-items: center; flex: none; border-radius: 50%; width: 1.4rem; height: 1.4rem; background: var(--muted); font-size: .8125rem; }
.progress li[aria-current] span { background: var(--primary); color: var(--primary-foreground); }
.card { min-width: 0; background: var(--card); border: 1px solid var(--border); border-radius: calc(var(--radius) + .2rem); padding: clamp(.875rem,4vw,1.5rem); box-shadow: 0 1px 2px #0f172a0a; }
.stage-head { margin-bottom: .7rem; }
.spread { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }
h2 { font-size: 1.43rem; font-weight: 680; line-height: 1.22; letter-spacing: -.025em; }
h3 { font-size: 1.13rem; font-weight: 650; margin-bottom: .55rem; }
.fields { display: grid; gap: .8rem; margin: 1rem 0 .7rem; }
.field { display: grid; gap: .35rem; min-width: 0; font-weight: 600; }
.field > select, .field > input, input[type='search'] { display: block; width: 100%; min-width: 0; min-height: 3rem; padding: .55rem .75rem; border: 1px solid var(--input); border-radius: var(--radius); background: var(--card); font-size: 1rem; font-weight: 400; }
input::placeholder { color: var(--muted-foreground); opacity: 1; }
select:disabled, input:disabled, .button:disabled { opacity: .57; cursor: default; }
.rule { border-top: 1px solid var(--border); margin: 1.15rem 0; }
.button { min-height: 2.85rem; padding: .52rem .85rem; border: 1px solid transparent; border-radius: var(--radius); background: var(--card); color: var(--foreground); font-weight: 620; line-height: 1.25; text-align: center; }
.button.outline { border-color: var(--input); }
.button.ghost { background: transparent; }
.button.primary { background: var(--primary); color: var(--primary-foreground); }
.button:not(:disabled):hover { background: var(--muted); }
.button.primary:not(:disabled):hover { background: #1e40af; }
.cluster, .meeting-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.meeting-actions { margin: .85rem 0 .6rem; }
.badge { white-space: nowrap; padding: .2rem .6rem; border-radius: 99px; background: var(--accent); color: #1e40af; font-size: .875rem; font-weight: 650; }
.badge-plain { background: var(--muted); color: var(--foreground); }
.upload { cursor: pointer; position: relative; display: flex; align-items: center; gap: .65rem; padding: .68rem .85rem; border: 1px dashed var(--input); border-radius: var(--radius); line-height: 1.4; }
.upload.compact { min-height: 2.85rem; }
.upload:hover, .upload.dragging { background: var(--accent); }
.upload:focus-within { outline: 2px solid var(--ring); outline-offset: 3px; }
.upload svg { flex: none; width: 1.25rem; height: 1.25rem; }
.upload strong { font-weight: 620; }
.upload small { display: block; color: var(--muted-foreground); font-size: .875rem; }
.upload input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.file-name { margin-top: .4rem; overflow-wrap: anywhere; }
.status { border: 1px solid var(--border); border-radius: var(--radius); padding: .58rem .75rem; background: var(--muted); color: var(--foreground); font-size: .9375rem; }
.status:empty { display: none; }
.status[data-type='error'] { border-color: #f1bcbc; background: #fef2f2; color: var(--destructive); }
.status[data-type='success'] { border-color: #b5e3ce; background: #ecfdf5; color: #065f46; }
.status[data-type='warning'] { border-color: #ebcf93; background: #fffbeb; color: #854d0e; }
.auth-panel .button { margin-top: .75rem; }
.source-field { max-width: 25rem; margin-bottom: .8rem; }
.meeting-tools { display: grid; gap: .55rem; }
.meetings-head { margin: .7rem 0; }
.meetings-list { border: 1px solid var(--border); border-radius: var(--radius); max-height: clamp(16rem,52vh,33rem); overflow-y: auto; overscroll-behavior-y: contain; }
.meeting-row { display: flex; min-height: 3rem; align-items: flex-start; gap: .75rem; padding: .7rem .75rem; cursor: pointer; }
.meeting-row + .meeting-row { border-top: 1px solid var(--border); }
.meeting-row:hover, .meeting-row:has(input:checked) { background: var(--accent); }
.meeting-row input { appearance: auto; accent-color: var(--primary); flex: none; width: 1.25rem; height: 1.25rem; margin: .18rem 0 0; }
.meeting-content { flex: 1; min-width: 0; display: grid; overflow-wrap: anywhere; }
.meeting-content small, .meeting-content .description { color: var(--muted-foreground); font-size: .9375rem; }
.meeting-content strong { font-weight: 620; }
.no-meetings, .empty { padding: .75rem; color: var(--muted-foreground); }
.summary { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .55rem 1rem; padding: .75rem; margin: .85rem 0; border-radius: var(--radius); background: var(--muted); }
.summary > div:first-child { grid-column: 1/-1; }
.summary dt { color: var(--muted-foreground); font-size: .875rem; }
.summary dd { font-weight: 650; font-variant-numeric: tabular-nums; }
.table-wrap { overflow: auto; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: .4rem; }
.preview-scroll-hint { margin: 0 0 .45rem; }
table { border-collapse: collapse; width: 100%; min-width: 36rem; text-align: left; font-size: .9375rem; }
th, td { vertical-align: top; padding: .55rem .65rem; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
th { background: var(--muted); }
tr:last-child td { border-bottom: 0; }
.date-cell, .index-cell { white-space: nowrap; font-variant-numeric: tabular-nums; }
.empty-day { color: var(--muted-foreground); }
.export-note { margin-top: .7rem; }
.step-footer { position: sticky; bottom: 0; z-index: 1; background: var(--background); padding: .65rem 0 max(.65rem,env(safe-area-inset-bottom)); }
.step-footer .status { margin-bottom: .45rem; }
.external-download { display: grid; place-items: center; margin-bottom: .45rem; text-decoration: none; }
.step-actions { display: flex; align-items: stretch; gap: .55rem; }
.step-actions .primary { flex: 1; }
.group-settings { margin-top: .85rem; }
.group-settings summary { font-weight: 650; min-height: 2.75rem; align-content: center; }
.group-settings .help, .group-settings .status, .group-settings .field { margin: .6rem 0; }
.group-settings input { max-width: 26rem; }
@media (min-width: 44rem) {
  .preview-scroll-hint { display: none; }
  .fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .fields > .field:first-child { grid-column: 1/-1; max-width: 18rem; }
  .summary { grid-template-columns: minmax(0,2fr) repeat(2,minmax(0,1fr)); }
  .summary > div:first-child { grid-column: auto; }
}
@media (max-width: 21rem) {
  .progress li { font-size: .875rem; gap: .25rem; padding-inline: .1rem; }
}
@media (max-width: 31rem) {
  .progress li { flex-direction: column; justify-content: center; padding-bottom: .45rem; }
  .meeting-actions > * { flex: 1 1 9rem; }
  .meeting-tools .cluster > * { flex: 1 1 8rem; }
}
