:root {
  color-scheme: light;
  --ink: #26314f;
  --ink-deep: #1c2540;
  --muted: #4f5a73;
  --paper: #faf7f2;
  --sand: #f1ece3;
  --surface: #fffdf9;
  --line: #dcd5c8;
  --green: #6bae45;
  --light-green: #e1edda;
  --orange: #9a471e;
  --error: #9d2d36;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
input, select, textarea { min-width: 0; }
img { display: block; max-width: 100%; }
h1, h2, p { margin: 0; }
h1, h2 { line-height: 1.17; }
h1 { font-size: clamp(1.45rem, 2.4vw, 2rem); letter-spacing: -.035em; }
h2 { font-size: 1rem; }
label { display: grid; gap: .4rem; font-size: .86rem; font-weight: 600; }
form { display: grid; gap: .9rem; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: .45rem;
  padding: .63rem .72rem;
  color: var(--ink-deep);
  background: var(--surface);
  line-height: 1.35;
  font-weight: 400;
}
textarea { resize: vertical; }
input[type="file"] { padding: .4rem; font-size: .78rem; }
input[type="file"]::file-selector-button {
  border: 0;
  color: var(--ink-deep);
  background: var(--sand);
  padding: .36rem .45rem;
  border-radius: .25rem;
  margin-right: .35rem;
  font: inherit;
  cursor: pointer;
}
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #477729; outline-offset: 3px; }
.start, .empty { padding: 2rem; }
.subtle { color: var(--muted); font-size: .86rem; }
.reading-note { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--muted); line-height: 1.55; }

.btn {
  border: 1px solid var(--line);
  border-radius: .45rem;
  background: var(--surface);
  padding: .55rem .8rem;
  font-size: .86rem;
  font-weight: 650;
  line-height: 1.25;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { background: var(--sand); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.primary, .tab[aria-current="page"] {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.btn.primary:not(:disabled):hover { background: var(--ink-deep); }
.btn.quiet, .btn.tab:not([aria-current="page"]) { border-color: transparent; background: transparent; }
.btn.quiet:hover, .btn.tab:not([aria-current="page"]):hover { background: var(--sand); }
.btn.block { width: 100%; }
.btn.destructive { color: var(--error); }
.btn.danger { background: var(--error); color: white; border-color: var(--error); }
.btn.danger:not(:disabled):hover { background: #7f2028; }

.toolbar {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  padding: .85rem 1.5rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.brand { width: 174px; flex: 0 0 auto; }
.toolbar nav, .toolbar-actions, .contextbar div {
  display: flex;
  align-items: center;
  gap: .35rem;
}
.toolbar nav { padding-left: 1rem; border-left: 1px solid var(--line); }
.toolbar-actions { margin-left: auto; }
.contextbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .3rem 1.5rem;
  font-size: .8rem;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.contextbar .btn { padding: .32rem .55rem; }

.workspace {
  display: grid;
  width: min(100%, 1580px);
  margin-inline: auto;
  padding: 1rem 1.5rem 1.5rem;
  gap: .85rem;
  align-items: start;
}
.slides-layout { grid-template-columns: minmax(148px, .8fr) minmax(320px, 3.2fr) minmax(215px, 1.1fr); }
.slides-layout.has-live-preview { grid-template-columns: minmax(145px, .72fr) minmax(0, 4.28fr); }
.has-live-preview .inspector { grid-column: 2; }
.has-live-preview .inspector form { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.has-live-preview :is(.editor-heading, .element-settings, #slide-images) { grid-column: 1 / -1; }
.points-layout { grid-template-columns: minmax(177px, .95fr) minmax(300px, 2.4fr) minmax(210px, 1.35fr); }
.rail, .inspector, .comments, .point-detail, .stage, .team {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: .7rem;
}
.rail, .inspector, .comments, .point-detail, .stage { padding: .9rem; }
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  min-height: 2.2rem;
  gap: .25rem;
  margin-bottom: .7rem;
}
.panel-heading > span { color: var(--muted); font-size: .8rem; }
.panel-heading .btn { padding: .36rem .48rem; }
.slide-list, .comment-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .34rem; }
.rail-item {
  display: flex;
  width: 100%;
  min-height: 2.75rem;
  align-items: center;
  gap: .6rem;
  padding: .5rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: .45rem;
  text-align: left;
  font-size: .85rem;
  line-height: 1.25;
  cursor: pointer;
  overflow-wrap: anywhere;
}
.rail-item:hover { background: var(--sand); }
.rail-item[aria-current="true"] { background: var(--light-green); border-color: #b3cba7; color: #284620; font-weight: 700; }
.thumbnail {
  flex: 0 0 2.6rem;
  width: 2.6rem;
  aspect-ratio: 16 / 10;
  padding: .32rem;
  display: grid;
  align-content: center;
  gap: .19rem;
  background: var(--sand);
  border: 1px solid var(--line);
  border-radius: .18rem;
}
.thumbnail i { display: block; width: 80%; height: 2px; background: #79839c; }
.thumbnail i + i { width: 58%; }
.thumbnail-cover { background: var(--ink); }
.thumbnail-cover i { background: #a9d48d; }
.thumbnail-compare { grid-template-columns: 1fr 1fr; }
.thumbnail-compare i { background: #9bb593; height: .65rem; width: 100%; }
.thumbnail-compare i + i { background: #4c5a75; width: 100%; }
.point-item { flex-direction: column; align-items: flex-start; gap: .2rem; }
.point-item small { color: var(--muted); font-weight: 500; }

.slide {
  container-type: inline-size;
  position: relative;
  display: grid;
  align-content: start;
  gap: .65em;
  min-height: min(48vw, 380px);
  min-width: 0;
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  border-radius: .45rem;
  background: var(--paper);
  padding: clamp(.8rem, 2.3vw, 1.9rem);
  font-size: clamp(.8rem, 1.2vw, 1.02rem);
}
.slide h1 { font-size: clamp(1.25rem, 6cqi, 2.8rem); font-weight: 800; }
.slide p, .slide li { line-height: 1.44; font-size: clamp(.84rem, 3.3cqi, 1.38rem); }
.slide-text:is(.is-wordy, .is-dense) li { font-size: clamp(.78rem, 2.7cqi, 1.2rem); }
.slide p { color: var(--muted); }
.slide ul { margin: .4rem 0 0; padding-inline-start: 1.25em; display: grid; gap: .48em; }
.slide li::marker { color: #49772e; }
.slide-cover {
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
  align-content: stretch;
  overflow: hidden;
}
.slide-cover::after {
  content: "";
  position: absolute;
  width: 27%;
  height: 40%;
  right: 0;
  bottom: 0;
  clip-path: polygon(100% 5%, 100% 100%, 4% 100%);
  background: #6bae45;
  opacity: .64;
  pointer-events: none;
}
.cover-layout { display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 1.5rem; position: relative; z-index: 1; }
.cover-logo { width: clamp(100px, 31%, 195px); background: var(--surface); border-radius: .3rem; padding: .36rem; }
.cover-layout > div { max-width: 88%; padding-bottom: .55rem; }
.cover-layout h1 { font-size: clamp(1.6rem, 7cqi, 4.3rem); }
.cover-layout p { color: #d9edcb; margin-top: .42rem; }
.cover-layout .cover-eyebrow { font-size: .78em; text-transform: uppercase; letter-spacing: .11em; font-weight: 750; margin-bottom: .55rem; }
.slide-illustration { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: contain; border-radius: .35rem; background: var(--sand); }
.has-illustration .slide-text-content { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; gap: .8rem; }
.slide-text.has-illustration li { font-size: clamp(.74rem, 2.3cqi, 1.12rem); }
.has-illustration .cover-layout > div { max-width: 59%; }
.cover-layout .slide-illustration { position: absolute; inset-inline-end: 0; top: 50%; width: 37%; transform: translateY(-50%); }
.comparison { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.comparison-photo {
  position: relative;
  margin: 0;
  min-width: 0;
  border-radius: .32rem;
  overflow: hidden;
  display: grid;
  grid-template-areas: "image";
  aspect-ratio: 4 / 3;
  background: var(--sand);
}
.comparison-photo img { grid-area: image; width: 100%; height: 100%; object-fit: contain; background: var(--ink-deep); }
.comparison-photo figcaption {
  grid-area: image;
  align-self: end;
  justify-self: start;
  margin: .35rem;
  background: var(--ink);
  color: white;
  padding: .2rem .45rem;
  border-radius: .25rem;
  font-size: .76rem;
  font-weight: 700;
  text-transform: uppercase;
}
.photo-empty { grid-area: image; place-self: center; padding: .4em; color: var(--muted); text-align: center; font-size: .8rem; }
.slide-compare .comparison-table { table-layout: fixed; font-size: clamp(.66rem, 2.2cqi, 1.03rem); }
.comparison-table th, .comparison-table td { padding: .38em .42em; border-bottom: 1px solid var(--line); }
.comparison-table th { font-weight: 700; }
.comparison-table thead { background: var(--sand); }
.slide .compare-caption { font-size: clamp(.7rem, 1.7cqi, .9rem); }
.slide-text.is-dense:not(.has-illustration) ul { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1.8em; }
.effect-controls { display: grid; gap: .5rem; }
.effect-controls .btn { justify-self: start; }
.decision-fragment { color: #335929; font-weight: 700; }
.decision-fragment[aria-hidden="true"] { visibility: hidden; }
#slide-images { display: grid; gap: .75rem; }

.point-title { display: flex; align-items: flex-start; gap: .65rem; flex-wrap: wrap; margin-bottom: .7rem; }
.point-title h1 { font-size: clamp(1.28rem, 2vw, 1.7rem); overflow-wrap: anywhere; }
.status { font-size: .75rem; font-weight: 700; background: var(--sand); padding: .25rem .55rem; border-radius: 1rem; white-space: nowrap; }
.status-open { background: #fae6d5; color: var(--orange); }
.status-testing { background: #e5e9f3; color: var(--ink); }
.status-decided { background: var(--light-green); color: #2c5622; }
.point-detail > h2 { margin: 1.25rem 0 .6rem; }
.point-meta, .attach-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .65rem; padding-top: .9rem; }
.point-meta .wide { grid-column: 1 / -1; }
.point-meta .btn, .attach-form .btn { justify-self: start; }
.attachments { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.attachments figure { margin: 0; min-width: 0; }
.attachments img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: var(--sand); border-radius: .35rem; }
.attachments figcaption { color: var(--muted); font-size: .79rem; margin-top: .3rem; overflow-wrap: anywhere; }
.comments form { margin-top: 1rem; }
.comments form .btn { justify-self: end; }
.comment-list { gap: .65rem; }
.comment-list li { background: var(--paper); padding: .64rem; border-radius: .42rem; overflow-wrap: anywhere; }
.comment-list strong { font-size: .85rem; }
.comment-list time { display: block; color: var(--muted); font-size: .74rem; margin: .18rem 0 .42rem; }
.comment-list p { white-space: pre-wrap; font-size: .88rem; }

.team { margin-block: 1rem; width: min(calc(100% - 3rem), 1020px); padding: 1.2rem; }
.team .panel-heading { margin: 0; }
table { border-collapse: collapse; width: 100%; font-size: .88rem; }
th, td { padding: .7rem .45rem; border-bottom: 1px solid var(--line); text-align: left; overflow-wrap: anywhere; }
.import-deck { display: grid; gap: .65rem; padding-top: .5rem; line-height: 1.45; }
.import-deck form { max-width: 430px; }
.import-deck .btn { justify-self: start; }
.check { display: flex; align-items: center; gap: .5rem; font-weight: 400; }
.check input { width: auto; }

.login-layout {
  margin: clamp(1rem, 8vh, 5rem) auto;
  width: min(calc(100% - 2rem), 780px);
  min-height: 350px;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  border: 1px solid var(--line);
  border-radius: .8rem;
  overflow: hidden;
  background: var(--surface);
}
.login-intro { display: grid; align-content: space-between; gap: 1.5rem; padding: clamp(1.4rem, 5vw, 3rem); background: var(--ink); color: white; }
.login-intro img { width: min(100%, 180px); padding: .4rem; border-radius: .3rem; background: var(--surface); }
.login-intro h1 { font-size: clamp(1.9rem, 4vw, 3rem); }
.login-intro p { color: #d9edcb; }
.login-form { align-content: center; padding: clamp(1.4rem, 5vw, 3rem); }
.login-form h2 { font-size: 1.35rem; margin-bottom: .4rem; }
.form-error { color: var(--error); font-size: .86rem; }
dialog { width: min(480px, calc(100% - 2rem)); border: 1px solid var(--line); border-radius: .6rem; background: var(--surface); color: var(--ink); padding: 1.25rem; }
dialog::backdrop { background: #1c254099; }
dialog h2 { font-size: 1.25rem; }
.dialog-actions { display: flex; gap: .5rem; justify-content: flex-end; flex-wrap: wrap; }
#feedback { position: fixed; z-index: 2; left: 1rem; bottom: 1rem; max-width: min(400px, calc(100% - 2rem)); background: var(--ink-deep); color: white; border-radius: .5rem; padding: .75rem 1rem; }
#feedback.error { background: var(--error); }

.presenter { min-height: 100vh; background: var(--ink-deep); color: var(--surface); display: grid; align-content: start; gap: .85rem; padding: .85rem 1rem; }
.presenter-tools, .presenter-controls { display: flex; align-items: center; justify-content: space-between; gap: .5rem; width: min(100%, 1150px); margin-inline: auto; }
.presenter .btn { color: var(--ink-deep); }
.presenter-frame { width: min(100%, 1150px, calc(145vh - 140px)); margin-inline: auto; }
.presenter-frame .slide { aspect-ratio: 16 / 9; color: var(--ink); min-height: 0; padding: clamp(.65rem, 3.2vw, 2.6rem); }
.presenter-frame .slide-cover { color: white; }
.presenter-frame .comparison-photo { aspect-ratio: 16 / 10; }
.presenter-frame .slide-compare.is-dense .comparison-photo { aspect-ratio: 2.8 / 1; }
.presenter-frame .step-visible .comparison-photo:nth-child(2),
.presenter-frame .step-visible .comparison-table :is(th, td):last-child,
.presenter-frame .step-visible .decision-fragment { animation: reveal .32s ease both; }
.slide.animate:is(.effect-fade, .effect-fade-sequence) { animation: reveal .38s ease-out both; }
.slide.animate:is(.effect-sequence, .effect-fade-sequence, .effect-decision) :is(.slide-text-content li, .cover-layout > *, .comparison-table tbody tr) {
  animation: rise .5s ease-out both;
  animation-delay: calc(var(--effect-index, 0) * 110ms);
}
.slide.animate :is(li, tr, .cover-layout > *):nth-child(2) { --effect-index: 1; }
.slide.animate :is(li, tr, .cover-layout > *):nth-child(3) { --effect-index: 2; }
.slide.animate :is(li, tr, .cover-layout > *):nth-child(4) { --effect-index: 3; }
.slide.animate :is(li, tr):nth-child(5) { --effect-index: 4; }
.slide.animate :is(li, tr):nth-child(6) { --effect-index: 5; }
.slide.animate :is(li, tr):nth-child(7) { --effect-index: 6; }
.slide.animate :is(li, tr):nth-child(8) { --effect-index: 7; }
.slide.animate :is(li, tr):nth-child(9) { --effect-index: 8; }
.slide.animate :is(li, tr):nth-child(10) { --effect-index: 9; }
.slide.animate :is(li, tr):nth-child(n+11) { --effect-index: 10; }
.presenter-notes { width: min(100%, 1150px); margin-inline: auto; color: var(--surface); display: grid; gap: .5rem; line-height: 1.45; }
.presenter-notes p { white-space: pre-wrap; }
@keyframes reveal { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(1.5rem); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .slide.animate, .slide.animate *,
  .presenter-frame .step-visible :is(.comparison-photo:nth-child(2), .comparison-table :is(th, td):last-child, .decision-fragment) {
    animation: none !important;
  }
}
#print-deck { display: none; }
.presence { position: relative; z-index: 4; color: var(--ink); }
.presence summary { display: flex; align-items: center; gap: .35rem; padding: .38rem .6rem; border-radius: .36rem; cursor: pointer; white-space: nowrap; font-weight: 650; }
.presence summary::-webkit-details-marker { display: none; }
.presence summary:hover, .presence[open] summary { background: var(--light-green); }
.presence-dot { width: .55rem; height: .55rem; border-radius: 50%; background: #4c852e; }
.presence ul { position: absolute; right: 0; width: min(310px, 80vw); margin: .35rem 0 0; padding: .55rem; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: .55rem; box-shadow: 0 12px 32px #1c25401c; }
.presence li { display: grid; gap: .16rem; padding: .55rem; text-align: left; overflow-wrap: anywhere; }
.presence li + li { border-top: 1px solid var(--line); }
.presence li span { color: var(--muted); }
.canvas-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .38rem; margin-bottom: .65rem; }
.canvas-tools .btn { padding: .38rem .58rem; }
.canvas-panes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; align-items: start; }
.canvas-pane { min-width: 0; }
.canvas-actionbar { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; min-height: 2rem; margin: 0 0 .45rem; }
.canvas-actionbar .btn { padding: .26rem .48rem; font-size: .75rem; }
.live-heading { justify-content: space-between; padding-inline: .15rem; }
.live-heading h3 { font-size: .9rem; margin: 0; }
.live-heading span, .canvas-hint { color: var(--muted); font-size: .75rem; }
.live-heading i { display: inline-block; width: .45rem; height: .45rem; margin-right: .15rem; border-radius: 50%; background: #4c852e; vertical-align: .08em; }
.canvas-hint { min-height: 1em; margin: .48rem 0 0; line-height: 1.4; }
.editable-preview { position: relative; }
.canvas-panes .slide { aspect-ratio: 16 / 9; min-height: 0; padding: clamp(.55rem, 1.75vw, 1.5rem); overflow: hidden; }
.canvas-panes .slide-compare.is-dense .comparison-photo { aspect-ratio: 3.8 / 1; }
.editable-preview .slide [data-slide-box] { cursor: move; touch-action: none; user-select: none; }
.editable-preview .slide [data-slide-box] img { -webkit-user-drag: none; }
.editable-preview .slide a { cursor: move; }
.editable-preview .slide .is-inline-editing { cursor: text; user-select: text; }
.editable-preview [data-inline-text] { display: block; min-width: 1ch; min-height: 1.25em; max-height: 100%; color: inherit; outline: none; white-space: pre-wrap; overflow-wrap: anywhere; cursor: text; user-select: text; overflow: auto; }
.editable-preview [data-inline-text]:empty::before { content: attr(data-inline-text); opacity: .55; pointer-events: none; }
.editable-preview .empty-text-box { display: inline-block; min-height: 1.25em; font-size: .88em; opacity: .65; }
.editable-preview .slide :is(.slide-text-content, .comparison-body) > [data-slide-box="body"].is-inline-editing, .editable-preview .slide .cover-layout [data-slide-box="body"].is-inline-editing { font-size: clamp(.72rem, 3.25cqi, 1.2rem); line-height: 1.43; }
.editor-save { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: .5rem; }
.editor-heading { margin: 0; gap: .35rem; }
.editor-heading .btn { font-size: .78rem; }
.element-settings, [data-file-descriptions] { display: grid; gap: .44rem; }
.format-toolbar { display: flex; gap: .25rem; }
.format-toolbar .btn { padding: .24rem .47rem; min-width: 1.8rem; }
.format-toolbar .btn[aria-pressed="true"] { background: #e5f0dd; border-color: #689755; color: #284e22; }
.element-settings { padding: .65rem; border: 1px solid #b9cda9; background: #f0f6eb; border-radius: .45rem; }
.element-settings h3 { font-size: .92rem; margin: 0; }
.element-settings .panel-heading { margin: 0; min-height: auto; }
.element-settings .btn:last-child { justify-self: start; }
.box-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .42rem; }
.box-fields input { padding: .44rem .5rem; }
.box-fields label { font-size: .75rem; }
.slide a { color: #345e2a; text-decoration-thickness: .075em; text-underline-offset: .15em; }
.slide-cover a, .presenter-notes a { color: #d9edcb; }
.slide-cover > .placed-template h1, .slide-cover > h1.placed-template { font-size: clamp(1.6rem, 7cqi, 4.3rem); }
.slide-cover > .placed-template[data-slide-box="body"] p { color: #d9edcb; }
.comparison-body { display: grid; gap: .4em; align-content: start; }
.custom-layout, .slide-canvas { position: relative; aspect-ratio: 16 / 9; }
.custom-layout { overflow: hidden; }
.layout-placeholder { visibility: hidden; pointer-events: none; }
.slide > .placed-template, .extra-box {
  position: absolute;
  min-width: 0;
  min-height: 0;
  max-width: none;
  max-height: none;
  margin: 0;
  overflow: hidden;
  transform: none;
  z-index: 2;
}
.slide > img.placed-template { object-fit: contain; }
.slide > .comparison-photo.placed-template { max-height: none; }
.extra-box { z-index: 3; }
.box-text { line-height: 1.28; font-size: var(--text-scale, 3.2cqi); overflow-wrap: anywhere; }
.align-left { text-align: left; }
.align-center { text-align: center; }
.align-right { text-align: right; }
.image-box { display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: .18em; }
.image-box img { width: 100%; height: 100%; object-fit: contain; border-radius: .22em; }
.image-box figcaption { color: var(--muted); line-height: 1.25; font-size: clamp(.64rem, 1.8cqi, 1rem); overflow-wrap: anywhere; }
.slide-cover .image-box figcaption { color: #d9edcb; }
.model-link { display: grid; align-content: center; gap: .25em; height: 100%; padding: .35em; border: 1px solid var(--line); border-radius: .35em; background: var(--surface); overflow-wrap: anywhere; font-size: clamp(.63rem, 1.8cqi, 1rem); }
.model-link span { color: var(--muted); }
.resize-outline { position: absolute; z-index: 5; border: 2px solid #4b7935; pointer-events: none; }
.resize-handle { position: absolute; width: .7rem; height: .7rem; border: 2px solid #4b7935; border-radius: .12rem; background: white; pointer-events: auto; touch-action: none; }
.resize-handle[data-resize="nw"] { top: -.35rem; left: -.35rem; cursor: nwse-resize; }
.resize-handle[data-resize="ne"] { top: -.35rem; right: -.35rem; cursor: nesw-resize; }
.resize-handle[data-resize="sw"] { bottom: -.35rem; left: -.35rem; cursor: nesw-resize; }
.resize-handle[data-resize="se"] { bottom: -.35rem; right: -.35rem; cursor: nwse-resize; }
.archive-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .7rem; }
.archive-heading p { color: var(--muted); margin-top: .36rem; }
.archive-empty { padding: 2rem; border: 1px dashed var(--line); border-radius: .65rem; background: var(--surface); }
.archive-empty p { margin-top: .5rem; color: var(--muted); }
.archive-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 235px), 1fr)); gap: .7rem; padding: 0; margin: .2rem 0 0; list-style: none; }
.archive-item { border: 1px solid var(--line); background: var(--surface); border-radius: .6rem; overflow: hidden; }
.archive-item > img, .archive-file-preview { width: 100%; aspect-ratio: 16 / 10; object-fit: contain; background: #e8ecef; }
.archive-file-preview { display: grid; place-items: center; }
.archive-file-preview span { letter-spacing: .1em; font-weight: 800; color: var(--ink); padding: .55rem .8rem; background: var(--surface); border: 1px solid var(--line); border-radius: .5rem; }
.archive-meta { display: grid; gap: .42rem; padding: .8rem; overflow-wrap: anywhere; }
.archive-meta span, .archive-meta p { color: var(--muted); font-size: .8rem; }
.archive-meta .btn { justify-self: start; text-decoration: none; }
.archive-actions { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.archive-actions .btn, .model-link .btn { font-size: .77rem; padding: .35rem .48rem; }
.model-link .btn { justify-self: start; }
.viewer-dialog { width: min(960px, calc(100% - 1.5rem)); padding: .85rem; max-height: 92vh; }
.viewer-heading, .viewer-tools { display: flex; align-items: center; justify-content: space-between; gap: .55rem; flex-wrap: wrap; }
.viewer-heading { margin-bottom: .55rem; }
.viewer-heading h2 { overflow-wrap: anywhere; }
.viewer-viewport { display: grid; place-items: center; width: 100%; height: min(62vh, 550px); min-height: 215px; background: #e9eef2; border: 1px solid #cdd6df; border-radius: .4rem; overflow: hidden; }
.viewer-viewport canvas { display: block; touch-action: none; }
.viewer-viewport p { margin: 1rem; color: var(--muted); text-align: center; line-height: 1.4; }
.viewer-tools { margin-top: .55rem; }
.viewer-tools span { color: var(--muted); font-size: .78rem; }
.viewer-tools div { display: flex; gap: .35rem; flex-wrap: wrap; }
.attach-form [data-file-descriptions] { grid-column: 1 / -1; }

@page { size: 13.333in 7.5in; margin: 0; }
@media print {
  html, body { margin: 0; padding: 0; background: white; }
  #app, #feedback { display: none !important; }
  #print-deck { display: block; }
  .print-page { width: 13.333in; height: 7.5in; break-after: page; }
  .print-page:last-child { break-after: auto; }
  .print-page .slide {
    width: 100%; height: 100%; min-height: 0; padding: .55in;
    border: 0; border-radius: 0; print-color-adjust: exact; -webkit-print-color-adjust: exact;
  }
  .print-page .slide-compare .comparison-photo { max-height: 4.75in; }
  .print-page .slide-compare.is-dense .comparison-photo { max-height: 2.5in; }
}

@media (max-width: 935px) {
  .slides-layout { grid-template-columns: minmax(150px, .95fr) minmax(300px, 3fr); }
  .inspector { grid-column: 2; }
  .inspector form { grid-template-columns: 1fr 1fr; }
  .inspector form label:has(textarea), #slide-images, .effect-controls, .element-settings, .editor-heading { grid-column: 1 / -1; }
  .points-layout { grid-template-columns: minmax(165px, .95fr) minmax(300px, 3fr); }
  .comments { grid-column: 2; }
  .toolbar { gap: .8rem; }
  .brand { width: 144px; }
}

@media (min-width: 936px) {
  .slides-layout .rail, .slides-layout .inspector { max-height: calc(100vh - 7.9rem); overflow-y: auto; scrollbar-gutter: stable; }
  .editor-heading { position: sticky; top: -.92rem; z-index: 6; background: var(--surface); padding-block: .35rem; }
  .has-live-preview .inspector { max-height: none; overflow: visible; }
  .has-live-preview .editor-heading { position: static; }
}

@media (max-width: 780px) {
  .canvas-panes { grid-template-columns: minmax(0, 1fr); }
  .has-live-preview .inspector form { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 620px) {
  .toolbar { padding: .75rem; flex-wrap: wrap; }
  .toolbar nav { order: 3; width: 100%; padding: 0; border-left: 0; }
  .toolbar-actions { gap: .15rem; }
  .toolbar-actions .btn { padding-inline: .42rem; }
  .contextbar { padding-inline: .75rem; gap: .25rem; align-items: flex-start; }
  .contextbar div { justify-content: end; text-align: right; }
  .workspace { padding: .7rem; grid-template-columns: minmax(0, 1fr); gap: .65rem; }
  .slides-layout.has-live-preview { grid-template-columns: minmax(0, 1fr); }
  .has-live-preview .inspector { grid-column: auto; }
  .inspector, .comments { grid-column: auto; }
  .slide-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .thumbnail { flex-basis: 1.7rem; }
  .slide { min-height: 225px; }
  .point-meta, .attach-form { grid-template-columns: 1fr; }
  .team { width: calc(100% - 1.4rem); }
  .login-layout { grid-template-columns: 1fr; }
  .presenter-frame { width: 100%; }
  .slide-text.is-dense:not(.has-illustration) ul { grid-template-columns: 1fr; }
}
