@font-face {
  font-family: "DM Sans"; font-style: normal; font-weight: 100 1000;
  src: url("/assets/fonts/dm-sans-latin-wght-normal.woff2") format("woff2"); font-display: swap;
}
:root {
  --ink: #211d31; --muted: #656071; --accent: #583bc3; --accent-dark: #452994;
  --line: #dedbe4; --paper: #fff; --wash: #f7f6f9; --radius: 18px;
  --aqua: var(--accent); --navy: #271f3e; --error: #922c28;
  font: 16px/1.52 "DM Sans", system-ui, sans-serif; color: var(--ink); background: var(--wash);
}
* { box-sizing: border-box; }
body, h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
h1, h2, h3 { line-height: 1.15; overflow-wrap: anywhere; }
h1 { font-size: clamp(2.1rem, 4.5vw, 3.1rem); letter-spacing: -.052em; font-weight: 580; }
h2 { font-size: 1.18rem; font-weight: 680; letter-spacing: -.035em; }
h3 { font-size: 1rem; font-weight: 650; letter-spacing: -.015em; }
button, input, select, textarea, summary { font: inherit; color: inherit; }
button, summary, a, .file-trigger { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button, .file-trigger { cursor: pointer; border: 1px solid var(--line); border-radius: 9px; background: white; padding: .57rem .9rem; font-size: .9rem; line-height: 1.35; font-weight: 610; }
button:hover:enabled, .file-wrap:hover .file-trigger { background: #f2eef9; border-color: #c6bcd9; }
button:disabled { opacity: .58; cursor: wait; }
.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.primary:hover:enabled { background: var(--accent-dark); border-color: var(--accent-dark); }
a, summary, button.link { color: var(--accent); }
button.link, .row-title, .change-title { background: transparent; border: 0; text-align: left; padding: .2rem 0; }
button.link:hover:enabled, .row-title:hover:enabled, .change-title:hover:enabled { text-decoration: underline; background: transparent; }
:focus-visible { outline: 3px solid #855fdc; outline-offset: 3px; }
#main:focus { outline: 0; }
.skip { position: absolute; left: -999em; z-index: 12; padding: .5rem; background: white; }
.skip:focus { top: 5px; left: 10px; }
.sr-only, .file-input { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.mast { min-height: 70px; display: flex; align-items: center; gap: clamp(1rem,4vw,4.5rem); padding: 0 max(22px,calc((100vw - 1250px) / 2)); background: #fff; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; white-space: nowrap; font-weight: 730; font-size: 1.12rem; letter-spacing: -.055em; color: var(--ink); text-decoration: none; }
.brandmark { display: block; width: 31px; height: 31px; background: #5135a3; border-radius: 9px; position: relative; overflow: hidden; flex: none; }
.brandmark i { position: absolute; left: 5px; top: 8px; width: 21px; height: 11px; border: 1.3px solid #eee9ff; border-radius: 68% 28% 66% 30%; transform: rotate(-29deg); }
.brandmark i:nth-child(2) { top: 11px; } .brandmark i:nth-child(3) { top: 14px; }
.mast nav { display: flex; gap: .18rem; align-items: center; }
nav button { background: transparent; color: var(--muted); border: 0; white-space: nowrap; }
nav button[aria-current=page] { color: var(--accent-dark); background: #eee9fa; }
.mast-end, .account { display: flex; align-items: center; gap: 1.05rem; }
.mast-end { margin-left: auto; }
.account { gap: .65rem; font-size: .8rem; }
.account-name { color: var(--muted); }
.account button { background: none; white-space: nowrap; }
.avatar { border-radius: 50%; background: #efebf8; color: #4b347c; width: 29px; height: 29px; display: grid; place-items: center; font-weight: 750; }
.tools-menu { margin: 0; position: relative; z-index: 5; }
.tools-menu summary { color: var(--muted); padding: .5rem .2rem; }
.tools-menu div { position: absolute; top: 100%; right: 0; min-width: 180px; padding: 6px; background: white; border: 1px solid var(--line); box-shadow: 0 8px 24px #28223714; border-radius: 12px; }
.tools-menu a { display: block; padding: .55rem .7rem; color: var(--ink); font-size: .87rem; text-decoration: none; border-radius: 6px; }
.tools-menu a:hover { background: var(--wash); }
#main { max-width: 1100px; margin: 0 auto; padding: clamp(26px,5vw,64px) clamp(16px,4vw,46px) 64px; }
.page-head, .panel-head, .row, .dialog-head, .queue-row, .queue-head { display: flex; gap: 14px; justify-content: space-between; align-items: center; }
.page-head { margin-bottom: 24px; align-items: flex-end; }
.page-head>div:first-child, .row>div, .queue-row>div { min-width: 0; }
.eyeline { color: var(--muted); font-size: .83rem; font-weight: 640; margin: 0 0 .55rem; }
.hero { position: relative; isolation: isolate; overflow: hidden; background: linear-gradient(110deg,#28203c 6%,#392858 65%,#594181); border-radius: 23px; padding: clamp(24px,4vw,46px); margin-bottom: 26px; }
.hero-copy { position: relative; margin: 0 0 25px; }
.hero h2, .signin h1 { font: normal clamp(2.45rem,5vw,4.35rem)/1.04 Georgia, "Times New Roman", serif; letter-spacing: -.055em; }
.hero h2 { color: #fffaff; max-width: 12.6em; text-wrap: balance; }
.hero-copy p { color: #e0d7ed; margin-top: .8rem; font-size: .98rem; max-width: 38rem; }
.contours { position: absolute; z-index: -1; inset: 0 0 0 auto; width: 35%; overflow: hidden; pointer-events: none; mask-image: linear-gradient(95deg,transparent,black 44%); }
.contours i { position: absolute; width: 126%; height: 114%; right: -46%; top: -51%; transform: rotate(-35deg); border: 1px solid #e7d7ff53; border-radius: 35% 56% 39% 61%; }
.contours i:nth-child(2) { scale: 1.12; } .contours i:nth-child(3) { scale: 1.24; }
.contours i:nth-child(4) { scale: 1.36; } .contours i:nth-child(5) { scale: 1.48; }
.contours i:nth-child(6) { scale: 1.60; } .contours i:nth-child(7) { scale: 1.72; }
.contours i:nth-child(8) { scale: 1.84; } .contours i:nth-child(9) { scale: 1.96; }
.contours i:nth-child(10) { scale: 2.08; } .contours i:nth-child(11) { scale: 2.20; }
.contours i:nth-child(12) { scale: 2.32; } .contours i:nth-child(13) { scale: 2.44; }
.composer { background: white; border-radius: 14px; padding: 14px 17px; }
input:not([type=checkbox]):not([type=radio]):not(.file-input), select, textarea { width: 100%; padding: .72rem .85rem; background: #fff; border: 1px solid #b6afc3; border-radius: 8px; }
textarea { display: block; resize: vertical; line-height: 1.45; }
textarea::placeholder, input::placeholder { color: #716b7b; opacity: 1; }
#quick-question { border: 0; background: none; min-height: 60px; padding: .45rem .15rem; font-size: 1.08rem; resize: vertical; }
#quick-question:focus-visible { outline-offset: 0; }
.compose-actions, .materials, .actions, .attachment { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.compose-actions { justify-content: space-between; margin-top: 10px; border-top: 1px solid #eeebf1; padding-top: 11px; }
.materials .link { margin-left: .3rem; }
.ask-button { padding-inline: 1.25rem; }
.ask-button::after { content: "↑" / ""; padding-left: .65rem; }
.file-wrap { display: inline-flex; position: relative; }
.file-input:focus-visible + .file-trigger { outline: 3px solid #855fdc; outline-offset: 3px; }
.file-trigger::before { content: "+" / ""; font-weight: 650; padding-right: .3rem; }
.attachment { margin-block: .55rem; color: var(--accent-dark); overflow-wrap: anywhere; }
.paste-box { margin-top: .9rem; } .paste-box label { font-size: .87rem; font-weight: 620; }
.panel, .needs-review, .changes { border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(18px,2.6vw,28px); background: white; margin: 0 0 18px; min-width: 0; }
.panel-head { align-items: baseline; margin-bottom: 12px; }
.panel-head .link { font-size: .83rem; flex: none; }
.split { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 18px; align-items: start; }
.needs-review, .changes { background: #fff7e9; border-color: #e7cc96; }
.queue-head { justify-content: flex-start; gap: 9px; }
.signal-dot { width: 9px; height: 9px; border-radius: 50%; background: #ad691a; }
.count { color: #71420e; padding: 1px 7px; font-size: .76rem; border-radius: 20px; background: #f7e5c3; font-weight: 700; }
.queue-row { padding-top: .95rem; }
.queue-row + .queue-row, .change-item + .change-item { margin-top: 1rem; border-top: 1px solid #e9d6af; }
.review-action { background: #fffaf2; color: #69420e; border-color: #d9b671; white-space: nowrap; }
.change-item { padding-top: 14px; }
.change-kind { font-size: .82rem; color: #795018; }
.change-title { color: #573a0e; text-decoration: underline; text-underline-offset: 3px; font-weight: 700; font-size: 1.03rem; }
.change-quote, .quote { margin: .45rem 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.change-quote { font-size: 1.05rem; } .removed { margin-top: .9rem; }
.row, .passage { padding: .86rem 0; border-top: 1px solid #e8e5ec; }
.row:last-child, .passage:last-child { padding-bottom: .12rem; }
.row-title { font-size: .99rem; line-height: 1.38; overflow-wrap: anywhere; font-weight: 650; }
.small, .meta, .empty, .sub { color: var(--muted); }
.small, .meta { font-size: .83rem; } .meta { margin-top: .16rem; }
.sub { margin: .4rem 0 .88rem; } .empty { padding: .8rem 0; }
.chip { display: inline-block; flex: none; border-radius: 99px; padding: .22rem .6rem; color: #514b5e; background: #f0edf4; font-size: .76rem; font-weight: 650; }
.chip.ok { background: #e4f2e9; color: #275a40; }
.chip.warn { background: #f8e7c7; color: #754813; }
fieldset { border: 0; padding: 0; margin: 1rem 0; }
.form-stack label:not(.choice), .login-card label, legend { display: block; font-size: .9rem; font-weight: 630; margin: .8rem 0 .3rem; }
.form-stack>.actions { margin-top: 1rem; }
.mode, .choice, .mode label { display: flex!important; align-items: center; gap: .5rem; }
.mode { gap: 1rem; } .choice { padding: .45rem 0; overflow-wrap: anywhere; }
.choices { max-height: 280px; overflow: auto; } input[type=checkbox], input[type=radio] { accent-color: var(--accent); }
details { margin: .7rem 0; } summary { cursor: pointer; font-size: .91rem; font-weight: 650; } .fold[open]>summary, .quick-material[open]>summary { margin-bottom: .85rem; }
.quote { border-left: 2px solid #d3c4f2; padding-left: .92rem; }
.passage .link { font-size: .85rem; } .passage .quote { margin-bottom: .15rem; }
.notice, .error { padding: .72rem .85rem; border-radius: 8px; margin: .7rem 0; overflow-wrap: anywhere; }
.notice { color: #42315b; background: #f1ecf7; } .error { color: var(--error); background: #fff0eb; border: 1px solid #efc6b9; }
#alerts:not(:empty) { background: #eaf4ed; color: #27533d; border-bottom: 1px solid #d1e6d6; padding: .48rem 5vw; font-size: .87rem; }
#alerts.problem:not(:empty) { background: #fff0eb; color: var(--error); }
dialog { color: var(--ink); border: 1px solid var(--line); width: min(640px,94vw); padding: clamp(18px,3vw,30px); border-radius: 16px; max-height: 88vh; }
dialog::backdrop { background: #22182c80; }
.dialog-head { padding-bottom: .8rem; margin-bottom: .8rem; border-bottom: 1px solid var(--line); }
dl { display: grid; grid-template-columns: max-content minmax(0,1fr); gap: .3rem .9rem; font-size: .88rem; }
dt { color: var(--muted); } dd { margin: 0; overflow-wrap: anywhere; } .mono, pre.code { font: .86rem/1.5 ui-monospace,monospace; overflow-wrap: anywhere; }
.source-lines { max-height: 46vh; overflow: auto; padding: .65rem .65rem .65rem 3.2rem; border: 1px solid var(--line); border-radius: 8px; }
.source-lines li { white-space: pre-wrap; overflow-wrap: anywhere; padding: .2rem .5rem; }
.source-lines li::marker { color: var(--muted); } .source-lines .target { background: #fff0c5; }
.signin { max-width: 980px; margin: clamp(40px,11vh,140px) auto; padding: 0 24px; display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: clamp(24px,7vw,90px); }
.signin h1 { color: #44325d; } .signin-intro p { color: var(--muted); margin-top: 1rem; }
.login-card { padding: clamp(20px,4vw,38px); background: white; border: 1px solid var(--line); border-radius: 18px; }
.login-card .primary { width: 100%; margin-top: 1.1rem; }
.demo { margin-top: 1rem; padding-top: .75rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: .5rem; }
.demo span { width: 100%; font-size: .85rem; color: var(--muted); }
@media(max-width: 960px) {
  .mast { gap: 1.3rem; } .account-name { display: none; }
}
@media(max-width: 720px) {
  .mast { min-height: 55px; gap: .3rem; flex-wrap: wrap; padding: .65rem 16px 0; }
  .mast:not(:has(nav:not([hidden]))) { padding-bottom: .65rem; }
  .mast nav { order: 3; width: 100%; overflow: auto; padding: .5rem 0; }
  .mast nav button { font-size: .84rem; padding: .54rem .65rem; }
  .brand { font-size: 1.02rem; gap: .45rem; } .mast-end { gap: .7rem; }
  .account { gap: .4rem; } .avatar { display: none; } .account button { font-size: .81rem; padding: .45rem .63rem; }
  #main { padding-top: 23px; } .hero { padding: 24px 18px 18px; border-radius: 17px; margin-bottom: 16px; }
  .hero-copy { margin-bottom: 19px; } .hero-copy p { max-width: 28rem; } .hero h2 { max-width: 12em; }
  .composer { padding: 10px; } .materials { gap: 5px; }
  .materials button, .file-trigger { font-size: .82rem; } .materials .link { margin-left: .15rem; }
  .ask-button { padding: .54rem .85rem; } .split, .signin { grid-template-columns: 1fr; }
  .split { gap: 0; } .signin { max-width: 480px; }
  .page-head { align-items: flex-start; flex-direction: column; gap: .65rem; }
  .queue-row { flex-wrap: wrap; } .page-head .actions:empty { display: none; }
}
@media(max-width: 470px) {
  .compose-actions { align-items: flex-end; } .materials { flex: 1; }
  .materials .link { flex-basis: 100%; } .hero h2 { font-size: 2.6rem; }
}
@media(prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto!important; } }

.compare { margin: 1rem 0 0; padding-top: .65rem; border-top: 1px solid #e9d6af; }
.compare summary { color: #69420e; }
.source-fold summary .meta { margin-left: .75rem; font-weight: 450; }
