:root {
  color-scheme: light;
  --paper: #fff;
  --canvas: #edf1f2;
  --ink: #222b30;
  --muted: #516167;
  --line: #cbd6d9;
  --tint: #edf6f7;
  --accent: #146171;
  --strong-accent: #0d4d5b;
  font: 100%/1.47 Inter, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, h4, p, dl, dd, fieldset { margin: 0; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid #088095; outline-offset: 3px; }
button:disabled { cursor: default; }
.shell { width: min(88rem, calc(100% - 4rem)); margin-inline: auto; }
.masthead { background: var(--paper); border-bottom: 1px solid var(--line); }
.masthead-inner { display: flex; align-items: center; gap: .85rem; min-height: 4.15rem; font-weight: 700; }
.masthead img { width: 1.75rem; height: auto; }
main { padding-block: clamp(1.75rem, 3.5vw, 3.1rem) 3rem; }
h1 { font-size: clamp(2rem, 4.15vw, 3.45rem); line-height: 1.02; letter-spacing: -.055em; font-weight: 730; }
.intro { color: var(--muted); margin-top: .7rem; max-width: 54ch; }
.workspace { display: grid; grid-template-columns: minmax(17rem, 20rem) minmax(0, 1fr); gap: 1.4rem; align-items: start; margin-top: 1.8rem; }
.settings, .viewer { border: 1px solid var(--line); background: var(--paper); border-radius: .65rem; min-width: 0; }
.step { padding: 1rem 1.15rem; }
.step + .step { border-top: 1px solid var(--line); }
.step h2, legend { display: flex; align-items: center; gap: .52rem; font-size: 1rem; font-weight: 700; padding: 0; }
.step h2 span, legend span {
  display: inline-grid; place-items: center; width: 1.48rem; height: 1.48rem;
  border: 1px solid #bcd6da; background: var(--tint); color: var(--strong-accent);
  border-radius: 50%; font-size: .78rem;
}
.dropzone {
  display: grid; justify-items: center; gap: .25rem; width: 100%; padding: .9rem .6rem;
  margin-top: .75rem; border: 1px dashed #83a3aa; border-radius: .42rem; background: #f6fafb;
  text-align: center; min-height: 7.15rem;
}
.dropzone:hover, .dropzone.is-dragging { background: #e5f4f6; border-color: var(--accent); }
.dropzone small, .choice small, .download-status, .file-message, .format-hint { font-size: .8rem; color: var(--muted); }
.upload-symbol { display: grid; place-items: center; width: 1.85rem; height: 1.85rem; line-height: 1; font-size: 1.3rem; color: var(--accent); background: #e5eff1; border-radius: .25rem; }
.file-message, .file-error { margin-top: .55rem; overflow-wrap: anywhere; }
.file-error { font-size: .83rem; color: #8d231a; }
.summary { display: grid; gap: .32rem; padding-top: .68rem; font-size: .83rem; font-variant-numeric: tabular-nums; }
.summary div { display: flex; justify-content: space-between; gap: .5rem; }
.summary dt { color: var(--muted); }
.summary dd { font-weight: 700; }
fieldset { border: 0; padding: 0; min-width: 0; }
legend { margin-bottom: .65rem; }
.choice { display: flex; align-items: flex-start; gap: .55rem; padding: .52rem .55rem; border: 1px solid var(--line); border-radius: .33rem; cursor: pointer; }
.choice + .choice { margin-top: .42rem; }
.choice:has(:checked) { border-color: var(--accent); background: var(--tint); }
.choice input { margin: .28rem 0 0; accent-color: var(--accent); }
.choice strong, .choice small { display: block; }
.choice strong { font-size: .88rem; }
.choice small { line-height: 1.3; margin-top: .1rem; }
.format-hint { margin-top: .6rem; }
.download {
  min-height: 2.85rem; width: 100%; border: 1px solid var(--accent); border-radius: .35rem;
  font-weight: 700; color: var(--paper); background: var(--accent);
}
.download:enabled:hover { background: var(--strong-accent); }
.download:disabled { color: #465e63; background: #e0eaec; border-color: #d3dfe1; }
.download-status { margin-top: .48rem; }
.download-status[data-error="true"] { color: #8d231a; }
.preview-heading { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; flex-wrap: wrap; padding: .85rem 1.1rem 0; }
.preview-heading h2 { font-size: 1.05rem; }
.preview-heading p { color: var(--muted); font-size: .83rem; }
.preview-tools { display: flex; align-items: center; justify-content: end; flex-wrap: wrap; gap: .55rem; }
#present {
  min-height: 2.5rem; border: 1px solid var(--line); border-radius: .3rem; background: var(--paper);
  padding: .3rem .65rem; font-size: .83rem; font-weight: 650;
}
#present:disabled { color: var(--muted); opacity: .67; }
#present:enabled:hover { border-color: var(--accent); }
.preview-controls { display: flex; flex-wrap: wrap; gap: .35rem; padding: .65rem 1.1rem .85rem; }
.preview-controls button {
  min-height: 2.55rem; border: 1px solid var(--line); border-radius: .3rem;
  padding: .3rem .68rem; background: var(--paper); font-size: .83rem; font-weight: 650;
}
.preview-controls button:hover { border-color: var(--accent); }
.preview-controls button[aria-pressed="true"] { background: var(--tint); border-color: var(--accent); color: var(--strong-accent); }
.slide-stage { background: #dbe4e6; padding: .8rem; border-top: 1px solid var(--line); border-radius: 0 0 .65rem .65rem; }
.paper { background: var(--paper); position: relative; aspect-ratio: 16 / 9; container-type: inline-size; box-shadow: 0 1px 5px #1d3c4325; font-family: Arial, sans-serif; color: #292c30; }
.picture-view, .follow-view { position: absolute; inset: 0; }
.picture-view img { display: block; width: 100%; height: 100%; }
#cover-date { position: absolute; left: 1.7%; top: 64.6%; color: #fff; font-size: 1.35cqw; font-weight: 700; }
.slide-heading {
  position: absolute; left: 2.5%; right: .8%; top: .8%; height: 11.6%;
  display: grid; grid-template-columns: 1fr auto; grid-template-rows: 1fr auto; column-gap: 1.1cqw;
  align-items: center;
}
.slide-heading h3 { font-size: 3.05cqw; line-height: 1.1; }
.slide-heading img { width: 4.3cqw; height: auto; grid-column: 2; grid-row: 1 / 3; }
.brand-rule { height: .41cqw; background: linear-gradient(90deg,#2b2b2b 20%,#1badca 20% 40%,#589d34 40% 60%,#eda82a 60% 80%,#e84f3f 80%); }
.empty-preview {
  position: absolute; inset: 16.5% 2.5% 5%; display: grid; align-content: center; justify-items: center;
  padding: 1rem; border: 1px dashed var(--line); border-radius: .25rem;
  background: #f6f8f8; text-align: center; color: var(--muted);
}
.empty-preview strong { color: var(--ink); font-size: clamp(.92rem, 2cqw, 1.23rem); }
.empty-preview p { font-size: clamp(.77rem, 1.4cqw, .89rem); }
.group-controls, .organizations, .detail-heading, #preview-table, .row-controls { position: absolute; left: 2.5%; right: 2.5%; }
.group-controls, .detail-heading, .row-controls { display: flex; align-items: center; justify-content: space-between; gap: .45rem; }
.group-controls { top: 13.88%; height: 4.45%; }
.group-controls p, .detail-heading p, .row-controls p { color: var(--muted); font-size: 1.33cqw; white-space: nowrap; }
.arrows { display: flex; align-items: center; gap: .45cqw; }
.arrows button, .organizations button {
  border: 1px solid var(--line); border-radius: .29rem; background: var(--canvas);
}
.arrows button:enabled:hover, .organizations button:hover { border-color: var(--accent); }
.arrows button:disabled { opacity: .5; }
.group-controls button { min-width: 3.08cqw; min-height: 2.5cqw; padding: 0; line-height: 1; font-size: 1.85cqw; }
.organizations { top: var(--menu-top); display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .63cqw; }
.organizations button {
  min-height: 3.36cqw; color: var(--ink); text-align: left; padding: .2cqw .7cqw;
  font-size: 1.33cqw; font-weight: 690; line-height: 1.2; overflow-wrap: anywhere;
}
.organizations button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: white; }
.detail-heading { top: var(--detail-top); min-height: 3.65cqw; border-top: 1px solid var(--line); padding-top: .25cqw; }
.detail-heading h4 { font-size: 2.1cqw; line-height: 1.12; overflow-wrap: anywhere; }
#preview-table { top: var(--table-top); width: 95%; border-collapse: collapse; table-layout: fixed; font-size: 1.41cqw; line-height: 1.32; }
col:nth-child(1) { width: 51.32%; }
col:nth-child(2) { width: 15.63%; }
col:nth-child(3) { width: 13.57%; }
col:nth-child(4) { width: 19.48%; }
th, td { text-align: left; vertical-align: middle; padding: .37cqw .92cqw; overflow-wrap: anywhere; }
th { color: white; background: #292c30; font-weight: 700; height: 2.97cqw; }
td { border-bottom: 1px solid #dbe4e6; }
tr[data-stripe="true"] { background: var(--canvas); }
td.empty-table { color: var(--muted); text-align: center; background: var(--canvas); height: 4.5cqw; }
.row-controls { top: 92.36%; height: 5.13%; }
.row-controls button { min-height: 2.89cqw; font-size: 1.3cqw; font-weight: 640; padding-inline: .54cqw; }
body:has(.viewer.is-presenting) { overflow: hidden; }
.viewer.is-presenting {
  position: fixed; inset: 0; z-index: 2; width: 100%; height: 100%;
  display: grid; grid-template-rows: auto auto minmax(0, 1fr); border: 0; border-radius: 0;
}
.viewer.is-presenting .slide-stage {
  display: grid; place-items: center; overflow: auto; border-radius: 0; background: #172327;
}
.viewer.is-presenting .paper { width: min(100%, calc((100dvh - 8rem) * 16 / 9)); }
@media (max-width: 67rem) {
  .workspace { grid-template-columns: minmax(14.5rem, 17rem) minmax(0, 1fr); gap: .9rem; }
  .shell { width: calc(100% - 2.25rem); }
}
@media (max-width: 58rem) {
  .workspace { grid-template-columns: 1fr; }
  .settings { display: grid; grid-template-columns: 1fr 1fr; }
  .settings .step:nth-child(2) { border-top: 0; border-left: 1px solid var(--line); }
  .settings .actions { grid-column: 1 / -1; }
  .download { max-width: 17rem; }
}
@media (max-width: 35rem) {
  .shell { width: calc(100% - 1.25rem); }
  .settings { display: block; }
  .settings .step:nth-child(2) { border-left: 0; border-top: 1px solid var(--line); }
  .download { max-width: none; }
  .slide-stage { padding: .45rem; }
  .viewer.is-presenting .slide-stage { align-items: start; }
  .viewer.is-presenting .paper { width: 100%; }
  .paper:has(.follow-view:not([hidden])) { aspect-ratio: auto; }
  .follow-view { position: relative; padding: .55rem; }
  .slide-heading, .empty-preview, .group-controls, .organizations, .detail-heading, #preview-table, .row-controls { position: static; }
  .slide-heading { margin: 0 0 .6rem; }
  .slide-heading h3 { font-size: 1.13rem; }
  .slide-heading img { width: 1.65rem; }
  .brand-rule { height: .19rem; margin-top: .35rem; }
  .empty-preview { min-height: 8rem; }
  .group-controls { margin: .15rem 0 .5rem; }
  .group-controls p, .detail-heading p, .row-controls p { font-size: .75rem; }
  .arrows { gap: .35rem; }
  .group-controls button, .row-controls button { min-height: 2.75rem; min-width: 2.75rem; font-size: .78rem; padding-inline: .3rem; }
  .organizations { grid-template-columns: repeat(2,minmax(0,1fr)); gap: .3rem; }
  .organizations button { min-height: 2.75rem; padding: .28rem .38rem; font-size: .77rem; }
  .detail-heading { margin-top: .65rem; padding-block: .3rem; }
  .detail-heading h4 { font-size: 1rem; }
  #preview-table { width: 100%; font-size: .75rem; line-height: 1.3; }
  col:nth-child(1) { width: 30%; }
  col:nth-child(2) { width: 30%; }
  col:nth-child(3) { width: 17%; }
  col:nth-child(4) { width: 23%; }
  th, td { padding: .31rem .25rem; }
  .row-controls { margin-top: .35rem; }
}
