:root {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #242b26;
  background: #f8f9f5;
  font-synthesis: none;
  --ink:#243d2d;
  --muted:#778075;
  --line:#e1e5dc;
  --paper:#fff;
  --sage:#eef2e9;
  --accent:#c4d88c;
  --serif:Georgia,"Times New Roman",serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: .45;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 2px solid #6a863c;
  outline-offset: 4px;
}
button {
  border: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
[hidden] {
  display: none !important;
}
.symbols {
  display: none;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip {
  position: absolute;
  left: 10px;
  top: -100px;
  padding: 12px;
  background: white;
  z-index: 10;
}
.skip:focus {
  top: 10px;
}
.topbar {
  height: 86px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  background: #fcfdf9;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font: 30px var(--serif);
  letter-spacing: -1px;
}
.brand small {
  font: 8px -apple-system, sans-serif;
  display: block;
  letter-spacing: 2.1px;
  margin-top: 4px;
  color: #687360;
}
.brand-mark {
  font: 38px var(--serif);
  width: 43px;
  height: 47px;
  border: 1px solid #728268;
  border-radius: 4px;
  display: grid;
  place-content: center;
  position: relative;
}
.brand-mark span {
  position: absolute;
  bottom: 2px;
  right: 4px;
  color: #9aab73;
  font-size: 26px;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 28px;
}
.local-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: #6a7368;
}
.local-badge i,
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #7f9a5c;
  display: inline-block;
}
.account-button {
  display: flex;
  align-items: center;
  gap: 9px;
  background: transparent;
  font-size: 12px;
  color: #4d574a;
}
.avatar {
  display: grid;
  place-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ebeede;
  font-size: 11px;
}
.chevron {
  font-size: 16px;
  color: #929989;
}
.app-shell {
  display: grid;
  grid-template-columns: 194px minmax(440px, 1fr) 340px;
  min-height: calc(100vh - 86px);
}
.sidebar {
  padding: 28px 16px 20px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #f1f3ec;
}
.new-button {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 13px;
  background: #fff;
  border: 1px solid #dce1d3;
  border-radius: 6px;
  color: #33482f;
  font-size: 12px;
  box-shadow: 0 1px 2px #22320b05;
}
.new-button svg {
  width: 15px;
}
.eyebrow {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1.9px;
  color: #788269;
  margin: 0 0 14px;
}
.side-label {
  margin: 23px 10px 1px;
  font-size: 8px;
  letter-spacing: 1.7px;
}
.side-empty {
  font-size: 11px;
  color: #909687;
  line-height: 1.7;
  padding: 0 10px;
}
.session-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.session-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px;
  border-radius: 6px;
  text-align: left;
  background: transparent;
  color: #626d5b;
  width: 100%;
}
.session-item.active {
  background: #e3e9d7;
  color: #314627;
}
.session-item svg {
  width: 15px;
  height: 17px;
  margin-top: 2px;
}
.session-item strong {
  font-size: 11px;
  font-weight: 500;
  display: block;
  max-width: 119px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.session-item small {
  font-size: 9px;
  display: block;
  margin-top: 5px;
  color: #7e8874;
}
.sidebar-bottom {
  margin-top: auto;
  border-top: 1px solid #dfe4d6;
  padding-top: 18px;
  display: flex;
  gap: 8px;
  font-size: 10px;
  color: #59654f;
  line-height: 1.4;
}
.sidebar-bottom small {
  display: block;
  font-size: 9px;
  color: #8b9381;
  margin-top: 4px;
}
.pi-mark {
  font: 26px var(--serif);
  color: #83906b;
}
main {
  padding: 25px 34px 32px;
  min-width: 0;
  max-height: calc(100vh - 86px);
  overflow-y: auto;
}
.breadcrumb {
  font-size: 10px;
  color: #8a9382;
  display: flex;
  gap: 10px;
  margin-bottom: 35px;
}
.breadcrumb span:last-child {
  color: #56624e;
}
.intro {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin: 0 0 42px;
}
.intro .eyebrow {
  font-size: 8px;
  margin-bottom: 17px;
}
h1 {
  font: 40px/1.13 var(--serif);
  letter-spacing: -1.4px;
  color: #263e2a;
  margin: 0;
}
.intro-copy {
  font-size: 12px;
  color: #778071;
  line-height: 1.85;
  margin-top: 17px;
}
.mini-document {
  flex-shrink: 0;
  width: 185px;
  height: 220px;
  transform: rotate(5deg);
  background: #fff;
  border: 1px solid #e1e4d8;
  border-radius: 3px;
  padding: 23px 20px;
  box-shadow: 7px 12px 0 -3px #e8ecdf, 0 9px 24px #3e542710;
  position: relative;
  margin-right: 20px;
}
.mini-document span {
  font-size: 5px;
  letter-spacing: 1px;
  color: #9b9f91;
  display: block;
  margin-bottom: 15px;
}
.mini-document strong {
  font: 14px var(--serif);
  display: block;
  margin-bottom: 15px;
}
.mini-document i {
  display: block;
  width: 100%;
  height: 3px;
  background: #e5e9e0;
  margin-bottom: 6px;
}
.mini-document i.short {
  width: 60%;
}
.mini-document b {
  display: block;
  font: 7px var(--serif);
  margin: 19px 0 12px;
}
.mini-document em {
  position: absolute;
  bottom: 13px;
  right: -24px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 9px 12px;
  background: #e5eecd;
  color: #5b7044;
  font-size: 8px;
  font-style: normal;
  transform: rotate(-5deg);
  border: 1px solid #d5e0bc;
  border-radius: 4px;
}
.mini-document svg {
  width: 12px;
  height: 12px;
}
.setup-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
h2 {
  font-weight: 500;
  font-size: 16px;
  margin: 0;
}
.text-button {
  background: transparent;
  color: #566b41;
  font-size: 11px;
  padding: 4px 0;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.text-button:hover {
  text-decoration: underline;
}
.task-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}
.task-tabs button {
  color: #8b9185;
  padding: 10px 13px 12px;
  background: none;
  font-size: 11px;
  border-bottom: 2px solid transparent;
}
.task-tabs button[aria-selected=true] {
  color: #2b472d;
  border-color: #536d3c;
  font-weight: 600;
}
.input-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.input-cards.single {
  grid-template-columns: 1fr;
}
.input-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 19px 18px 17px;
}
.card-title {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}
.step-number {
  font: 22px var(--serif);
  color: #a1ac8f;
}
h3 {
  font-size: 12px;
  font-weight: 600;
  margin: 1px 0 6px;
}
.card-title p {
  font-size: 10px;
  color: #8a9182;
  margin: 0;
  line-height: 1.5;
}
.dropzone {
  border: 1px dashed #d3dbc7;
  border-radius: 5px;
  background: #fafbf7;
  min-height: 149px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  text-align: center;
  padding: 16px 8px;
  position: relative;
  transition: background .15s;
}
.dropzone:hover,
.dropzone.drag {
  background: #f0f5e7;
  border-color: #98ad75;
}
.dropzone input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.upload-picker { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; min-width: 0; cursor: pointer; }
.upload-picker > span:not(.upload-icon) { font-size: 11px; color: var(--muted); }
.example-file { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 8px; max-width: 100%; }
.example-file a { color: var(--ink); font-size: 12px; text-underline-offset: 3px; }
.example-badge { color: #61744a; font-size: 11px; }
.example-note { font-size: 12px; line-height: 1.6; }
.dropzone:focus-within {
  outline: 2px solid #6a863c;
}
.dropzone strong {
  font-size: 11px;
  font-weight: 500;
}
.dropzone > span:not(.upload-icon) {
  font-size: 9px;
  color: #949c89;
}
.upload-icon {
  background: #edf1e5;
  color: #7b8d62;
  border: 1px solid #e0e7d3;
  width: 34px;
  height: 34px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  margin-bottom: 3px;
}
.upload-icon svg {
  width: 16px;
  height: 16px;
}
.file-pill {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 6px 9px;
  background: #e6edd7;
  border-radius: 4px;
  color: #4a6139 !important;
}
.start-card {
  background: #eff3e8;
  border: 1px solid #dfe7d4;
  border-radius: 6px;
  margin-top: 19px;
  padding: 18px;
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}
.start-card h3 {
  font-size: 12px;
  font-weight: 500;
}
.start-card p {
  font-size: 10px;
  line-height: 1.6;
  color: #808b74;
  margin: 6px 0;
}
.consent {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 9px;
  line-height: 1.6;
  color: #77836b;
  margin-top: 12px;
  max-width: 360px;
}
.consent input {
  margin: 2px 0 0;
  accent-color: #4f6c34;
}
.primary {
  border: 1px solid #2e492d;
  background: #2e492d;
  color: white;
  padding: 12px 17px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: 11px;
  white-space: nowrap;
  transition: background .15s;
}
.primary:hover {
  background: #3b5837;
}
.primary svg {
  width: 14px;
  height: 14px;
}
.primary.small {
  padding: 9px 12px;
  gap: 7px;
}
.quiet {
  font-size: 10px;
  color: #91998a;
  line-height: 1.6;
}
.setup-note {
  margin-top: 17px;
  max-width: 540px;
}
.conversation {
  border-left: 1px solid var(--line);
  background: #fff;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 86px);
  min-width: 0;
}
.conversation-heading {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 23px 22px 19px;
  border-bottom: 1px solid #eef0e9;
}
.pi-badge {
  font: 26px var(--serif);
  color: #647d3d;
  display: grid;
  place-items: center;
  width: 34px;
  height: 36px;
  background: #eef3e4;
  border: 1px solid #e0e8d2;
  border-radius: 7px;
}
.conversation-heading h2 {
  font-size: 12px;
  font-weight: 600;
  margin-top: 1px;
}
.conversation-heading p {
  font-size: 9px;
  color: #8c9682;
  margin: 5px 0 0;
}
.conversation-heading > .status-dot {
  margin-left: auto;
  background: #c2cbb6;
}
.conversation-scroll {
  flex: 1;
  overflow: auto;
  padding: 25px 22px;
  min-height: 200px;
  scroll-behavior: smooth;
}
.chat-welcome {
  padding: 29px 4px 0;
}
.welcome-symbol {
  color: #899b6a;
  margin-bottom: 18px;
}
.welcome-symbol svg {
  width: 29px;
  height: 29px;
}
.chat-welcome h3 {
  font: 26px/1.3 var(--serif);
  letter-spacing: -.5px;
  color: #344c32;
  margin-bottom: 14px;
}
.chat-welcome > p {
  font-size: 11px;
  color: #87917d;
  line-height: 1.9;
}
.welcome-example {
  border-top: 1px solid #e8ecdf;
  border-bottom: 1px solid #e8ecdf;
  margin: 28px 0 20px;
  padding: 18px 0 5px;
}
.welcome-example span {
  font-size: 8px;
  letter-spacing: 1.5px;
  color: #a3ac97;
}
.welcome-example p {
  font: italic 12px/1.7 var(--serif);
  color: #687b54;
  margin: 13px 0;
}
.composer-wrap {
  padding: 14px 17px 10px;
  background: #fff;
}
.composer {
  border: 1px solid #dae1d0;
  border-radius: 7px;
  padding: 11px 12px 8px;
  box-shadow: 0 3px 8px #26381a05;
}
.composer:focus-within {
  border-color: #9cb37b;
  box-shadow: 0 0 0 2px #eff4e6;
}
.composer textarea {
  resize: vertical;
  min-height: 64px;
  max-height: 180px;
  width: 100%;
  border: 0;
  background: none;
  font-size: 11px;
  color: #35492f;
  line-height: 1.7;
  outline: none;
}
.composer textarea::placeholder {
  color: #a2aa98;
}
.composer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.composer-bottom span {
  font-size: 8px;
  color: #a3ab98;
}
.composer-bottom button {
  background: #3d5731;
  color: white;
  width: 29px;
  height: 29px;
  border-radius: 5px;
  display: grid;
  place-items: center;
}
.composer-bottom button svg {
  width: 16px;
  height: 16px;
  transform: rotate(-90deg);
}
.chat-footnote {
  text-align: center;
  font-size: 8px;
  color: #a7ae9f;
  margin: 10px 0 0;
}
.message {
  font-size: 11px;
  line-height: 1.85;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin-bottom: 23px;
}
.message.user {
  background: #eff4e6;
  padding: 11px 14px;
  border-radius: 8px 8px 0 8px;
  margin-left: 22px;
  color: #485c38;
}
.message.assistant {
  color: #59644f;
}
.message.assistant:before {
  content: "BRANDEIS";
  font-size: 8px;
  letter-spacing: 1.5px;
  color: #8d9b7b;
  display: block;
  margin-bottom: 8px;
}
.message.notice {
  font-size: 10px;
  color: #959e8c;
  padding-left: 12px;
  border-left: 2px solid #dce3d0;
  line-height: 1.7;
}
.suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 10px;
}
.suggestions button {
  font-size: 9px;
  padding: 6px 9px;
  border: 1px solid #e3e8d8;
  border-radius: 4px;
  background: #fafcf6;
  color: #7d8a6d;
}
.selected-context {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 9px;
  padding: 8px;
  background: #f1f5e9;
  border-radius: 4px;
  margin-bottom: 8px;
  color: #75875f;
}
.selected-context span {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.selected-context button {
  background: none;
  color: #7b8a69;
  font-size: 16px;
}
.workspace-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 20px;
}
.workspace-header h1 {
  font-size: 27px;
  letter-spacing: -.6px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.workspace-header .eyebrow {
  font-size: 8px;
  margin-bottom: 9px;
}
.document-meta {
  font-size: 10px;
  color: #8a9580;
  margin: 9px 0 0;
  line-height: 1.6;
}
.document-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  align-items: center;
}
.document-actions select {
  font-size: 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 8px;
  background: #fff;
  color: #5e6b53;
  min-width: 135px;
  max-width: 200px;
}

.usage-card { margin: 28px 0 20px; padding: 15px 13px; border: 1px solid #dce3d1; border-radius: 8px; background: #f8faf3; }
.usage-card .eyebrow { font-size: 9px; letter-spacing: .12em; }
.usage-card p { margin: 14px 0 6px; font-size: 11px; color: #526247; }
.usage-card p strong { font-size: 17px; font-weight: 500; }
.usage-card small { display: block; font-size: 10px; line-height: 1.6; margin-top: 12px; color: #7b8570; }
.usage-card button { margin-top: 13px; font-size: 10px; }
.usage-track { height: 3px; border-radius: 3px; overflow: hidden; background: #e4e9dc; }
.usage-track i { display: block; height: 100%; background: #859b5f; }
.allowance-banner { border-top: 1px solid var(--line); padding: 17px 0; margin-top: 20px; color: #69775a; font-size: 12px; line-height: 1.6; }
.header-right > .text-button { white-space: nowrap; font-size: 12px; }
.model-button { font-size: 12px; }
.user-dialog { max-width: 440px; }
.connected-client { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 16px 0; font-size: 12px; }
#connected-clients { margin: 24px 0; border-top: 1px solid var(--line); padding-top: 16px; }
#connected-clients h3 { font-size: 14px; }
dialog .pair-code { font: 28px ui-monospace, monospace; color: var(--ink); letter-spacing: 4px; }
#pair-error { color: #8b442a; }
.google-sign-in { width: 100%; display: flex; justify-content: center; align-items: center; gap: 12px; padding: 14px; margin-top: 22px; background: white; border: 1px solid #cfd6c7; border-radius: 6px; font-size: 14px; color: #31462c; }
.google-sign-in:disabled { opacity: .5; cursor: not-allowed; }
.google-letter { font: 600 20px Arial, sans-serif; color: #4285f4; }
#user-profile { padding: 16px; margin: 20px 0; background: #f1f5e9; border-radius: 6px; overflow-wrap: anywhere; }
.pricing-dialog { width: min(950px, 94vw); max-width: 950px; }
.pricing-dialog > h2 { font-size: 32px; }
.pricing-proposal { padding: 12px 15px; background: #f6f1e4; color: #8b7750; border-radius: 5px; margin: 22px 0; font-size: 12px; }
#pricing-reason { padding: 12px 15px; border: 1px solid #dbc2a5; background: #fff5e9; border-radius: 5px; color: #775330; font-size: 13px; }
.pricing-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.price-card { padding: 22px 18px; border: 1px solid #dfe4d9; border-radius: 7px; }
.price-card.featured { background: #f1f6e8; border-color: #9fb482; }
.price { margin-top: 18px; font: 36px var(--serif); color: #2e4829; }
.price small { display: block; font: 11px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #7e8974; margin-top: 6px; }
.price-card p { font-size: 13px; line-height: 1.9; margin: 22px 0 4px; color: #53634b; }
.plan-term { display: block; min-height: 32px; font-size: 10px; color: #8a9380; }
.price-card button { width: 100%; margin-top: 20px; font-size: 11px; }
.plan-status { padding: 12px 4px; border-radius: 4px; color: #7d8873; background: #edf0e7; cursor: default; }
.pricing-details { margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--line); }
.pricing-details p { font-size: 11px; line-height: 1.7; color: #7b8473; }
@media (max-width: 1000px) { .model-button #account-label { display: none; } .header-right { gap: 14px; } }
@media (max-width: 650px) { .pricing-cards { grid-template-columns: 1fr 1fr; } .pricing-dialog > h2 { font-size: 26px; } .local-badge { display: none; } .header-right > .text-button { font-size: 10px; } }
.demo-banner {
  font-size: 9px;
  line-height: 1.6;
  background: #f5f0e2;
  color: #927b4c;
  padding: 9px 12px;
  border: 1px solid #e9dfc7;
  border-radius: 5px;
  margin-bottom: 15px;
}
.sample-tag {
  font-size: 7px;
  letter-spacing: 1px;
  padding: 3px 5px;
  background: #ece3cf;
  border-radius: 3px;
  margin-right: 5px;
}
.progress-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 15px;
  margin-bottom: 19px;
}
.progress-heading {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 18px;
}
.progress-heading strong {
  font-size: 10px;
  font-weight: 500;
  color: #5c6d50;
}
.progress-heading button {
  margin-left: auto;
  font-size: 9px;
}
.danger {
  color: #9e6b50;
}
.status-dot.working {
  animation: pulse 1.4s infinite;
}
.status-dot.waiting {
  background: #c29b59;
}
.status-dot.failed {
  background: #b56953;
}
.stages {
  display: flex;
  gap: 5px;
  justify-content: space-between;
}
.stage {
  flex: 1;
  position: relative;
  min-width: 0;
  text-align: center;
}
.stage:before {
  content: "";
  position: absolute;
  top: 9px;
  left: 55%;
  width: 90%;
  height: 1px;
  background: #edf0e6;
}
.stage:last-child:before {
  display: none;
}
.stage > span {
  background: #f5f7ef;
  color: #a7b195;
  border: 1px solid #e8ecdf;
  position: relative;
  z-index: 1;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  font-size: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.stage.passed > span {
  background: #e4eed5;
  color: #657f43;
  border-color: #d4e2c0;
}
.stage.running > span {
  background: #35532e;
  color: #fff;
  border-color: #35532e;
}
.stage.failed > span {
  color: #aa5c45;
  border-color: #e8cdc3;
  background: #faf0eb;
}
.stage small {
  display: block;
  margin-top: 8px;
  font-size: 7px;
  line-height: 1.4;
  color: #97a086;
}
.stage.running small {
  color: #3f5932;
}
.document-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
}
.document-tabs {
  display: flex;
  gap: 8px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.document-tabs button {
  background: none;
  padding: 14px 5px 12px;
  border-bottom: 2px solid transparent;
  font-size: 10px;
  color: #8e9785;
}
.document-tabs button[aria-selected=true] {
  color: #34502c;
  border-bottom-color: #6d8750;
  font-weight: 600;
}
.document-tabs button span {
  font-size: 8px;
  background: #f0f3e9;
  padding: 2px 4px;
  border-radius: 3px;
  margin-left: 3px;
}
.document-tabs > a {
  margin-left: auto;
  font-size: 9px;
  align-self: center;
}
.document-view {
  min-height: 440px;
  background: #f1f2ed;
  padding: 26px;
  overflow: auto;
  max-height: 67vh;
}
.preview-empty {
  min-height: 390px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #87927b;
}
.preview-empty svg {
  width: 35px;
  height: 35px;
  color: #a2b18e;
  margin-bottom: 16px;
}
.preview-empty h3 {
  font: 22px var(--serif);
  color: #647a50;
  margin: 0 0 12px;
}
.preview-empty p {
  max-width: 270px;
  font-size: 11px;
  line-height: 1.7;
}
.paper {
  background: white;
  box-shadow: 0 3px 14px #2235110c;
  border: 1px solid #e4e7dc;
  max-width: 610px;
  min-height: 600px;
  margin: auto;
  padding: 43px 45px 25px;
  font: 12px/1.9 var(--serif);
  color: #373b33;
}
.paper .paper-meta {
  font: 7px sans-serif;
  letter-spacing: 1.5px;
  text-align: center;
  color: #939985;
  margin-bottom: 23px;
}
.paper .court {
  text-align: center;
  font-size: 10px;
  line-height: 2;
  margin-bottom: 30px;
}
.paper .caption {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid #858c7d;
  border-bottom: 1px solid #858c7d;
  padding: 15px 0;
  gap: 18px;
  font-size: 10px;
  line-height: 1.8;
  margin-bottom: 30px;
}
.paper h4 {
  font-size: 11px;
  line-height: 1.8;
  margin: 20px 0 9px;
  cursor: pointer;
  padding: 2px 5px;
  border-radius: 2px;
}
.paper h4:hover,
.paper h4.selected {
  background: #eef3e1;
  outline: 1px solid #dce6c7;
}
.paper p {
  font-size: 10px;
  text-align: justify;
  margin: 0 0 12px;
  color: #777d71;
}
.paper .paper-footer {
  margin-top: 35px;
  padding-top: 10px;
  border-top: 1px solid #a9b09e;
  text-align: center;
  font-size: 8px;
}
.pdf-frame {
  width: 100%;
  height: 65vh;
  min-height: 440px;
  border: 0;
  background: #fff;
}
.outline-intro {
  font-size: 10px;
  line-height: 1.8;
  color: #839176;
  padding: 0 3px 13px;
}
.outline-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.outline-row {
  display: flex;
  gap: 9px;
  width: 100%;
  text-align: left;
  padding: 12px 12px 12px calc(10px + var(--depth)*12px);
  background: white;
  border: 1px solid #e1e6d8;
  border-radius: 4px;
  align-items: flex-start;
  color: #4e6440;
}
.outline-row.selected {
  border-color: #9bb27b;
  background: #f3f7ec;
}
.outline-row .num {
  font: 13px var(--serif);
  min-width: 23px;
  color: #71895a;
}
.outline-row strong {
  font-size: 10px;
  font-weight: 500;
  line-height: 1.5;
  display: block;
}
.outline-row small {
  display: block;
  font-size: 8px;
  color: #a0a991;
  margin-top: 5px;
}
.level-tag {
  font-size: 8px;
  background: #eef2e6;
  color: #859371;
  border-radius: 3px;
  padding: 3px 5px;
  white-space: nowrap;
  margin-left: auto;
}
.review-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 17px;
}
.review-stat {
  padding: 14px;
  background: white;
  border: 1px solid #e0e6d6;
  border-radius: 5px;
}
.review-stat strong {
  font: 24px var(--serif);
  color: #556f40;
  display: block;
}
.review-stat span {
  font-size: 8px;
  color: #98a18d;
}
.review-note {
  background: #fff;
  border: 1px solid #e0e5d7;
  border-left: 3px solid #b8c994;
  border-radius: 4px;
  padding: 13px;
  margin-bottom: 9px;
  font-size: 10px;
  line-height: 1.7;
  color: #788768;
}
.review-note strong {
  color: #556947;
  display: block;
  margin-bottom: 4px;
  font-weight: 500;
}
.review-note.warn {
  border-left-color: #d8bd84;
}
.review-note ul {
  padding-left: 16px;
  margin: 6px 0;
}
.activity {
  margin-top: 17px;
  color: #8a9780;
  font-size: 10px;
}
.activity summary {
  cursor: pointer;
  padding: 6px 0;
}
.activity summary span {
  font-size: 8px;
  color: #a3ad99;
  margin-left: 12px;
}
.activity > div {
  margin-top: 10px;
  max-height: 220px;
  overflow: auto;
  padding: 10px;
  background: #f0f3e9;
  border-radius: 4px;
  font: 9px/1.8 ui-monospace, monospace;
  overflow-wrap: anywhere;
}
.activity .log-row {
  padding: 4px 0;
  border-bottom: 1px solid #e3e9d8;
}
.log-row time {
  font-size: 8px;
  color: #a3ad93;
  margin-right: 8px;
}
.decision-card {
  background: #f9fbf3;
  border: 1px solid #dae4c9;
  border-radius: 7px;
  padding: 16px;
  margin: 12px 0 23px;
  color: #52653f;
}
.decision-card .eyebrow {
  font-size: 8px;
  color: #96a77e;
  margin-bottom: 12px;
}
.decision-card h3 {
  font: 17px/1.4 var(--serif);
  margin-bottom: 10px;
}
.decision-card p {
  font-size: 10px;
  line-height: 1.8;
  color: #8b987a;
}
.decision-card .evidence {
  font-size: 9px;
  background: #eef3e3;
  border-radius: 3px;
  padding: 8px;
  margin: 12px 0;
  line-height: 1.8;
  color: #7b8e62;
}
.decision-card button {
  font-size: 10px;
  padding: 10px;
  border: 1px solid #d6dfc7;
  border-radius: 4px;
  background: #fff;
  color: #6d8058;
  width: 100%;
  margin-top: 6px;
  text-align: center;
}
.decision-card button.recommended {
  background: #3c5930;
  color: white;
  border-color: #3c5930;
}
.decision-card label {
  font-size: 9px;
  display: block;
  margin: 12px 0 6px;
}
.decision-card input {
  width: 100%;
  padding: 10px;
  background: #fff;
  color: #3f5730;
  border: 1px solid #d6dfc7;
  border-radius: 4px;
  font-size: 11px;
}
.error-card {
  background: #fbf3ec;
  border: 1px solid #e8d5c4;
  border-radius: 5px;
  padding: 13px;
  font-size: 11px;
  line-height: 1.6;
  color: #a77c58;
  margin-bottom: 17px;
}
.connection {
  padding: 9px;
  border-radius: 4px;
  background: #f8efd9;
  color: #9f8650;
  font-size: 10px;
  margin-bottom: 15px;
}
.toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: #34482b;
  color: #fff;
  box-shadow: 0 6px 20px #0002;
  border-radius: 6px;
  padding: 12px 20px;
  font-size: 12px;
  z-index: 100;
  max-width: 80vw;
  line-height: 1.6;
}
dialog {
  border: 1px solid #dce3d0;
  border-radius: 12px;
  width: 480px;
  max-width: 90vw;
  padding: 32px;
  color: #415337;
  box-shadow: 0 20px 90px #17220e30;
}
dialog::backdrop {
  background: #24321f60;
  backdrop-filter: blur(3px);
}
dialog .eyebrow {
  font-size: 8px;
}
dialog h2 {
  font: 28px var(--serif);
  margin: 16px 0 13px;
}
dialog > p {
  font-size: 11px;
  color: #8b967d;
  line-height: 1.8;
}
.dialog-close {
  position: absolute;
  right: 15px;
  top: 12px;
  font-size: 24px;
  background: none;
  color: #9aa58d;
}
.account-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 22px 0 17px;
}
.account-options button {
  text-align: left;
  border: 1px solid #dce3d0;
  background: #fafbf7;
  padding: 17px;
  border-radius: 6px;
  position: relative;
  color: #677e51;
}
.account-options button.selected {
  background: #eef3e4;
  border-color: #a7bc85;
}
.account-options strong {
  display: block;
  font-size: 13px;
  font-weight: 500;
}
.account-options span {
  display: block;
  font-size: 9px;
  color: #9ba58d;
  margin-top: 6px;
}
.account-options i {
  position: absolute;
  right: 13px;
  top: 19px;
  width: 10px;
  height: 10px;
  border: 1px solid #b7c5a1;
  border-radius: 50%;
}
.account-options .selected i {
  background: #647e43;
  box-shadow: inset 0 0 0 2px #eff4e6;
}
.account-state {
  font-size: 11px;
}
.account-connected {
  font-size: 11px;
  color: #6b8650;
  margin: 0 0 15px;
}
#auth-flow {
  margin: 15px 0;
  font-size: 11px;
  line-height: 1.8;
  color: #889779;
  overflow-wrap: anywhere;
}
#auth-flow a {
  display: block;
  color: #436532;
  text-decoration: underline;
  margin: 10px 0;
}
#auth-flow input {
  width: 100%;
  padding: 9px;
  border: 1px solid #dae4cb;
  border-radius: 4px;
  font-size: 10px;
}
#auth-flow button {
  margin-top: 8px;
}
#account-state {
  font-size: 11px;
  line-height: 1.8;
  margin-bottom: 14px;
}
.template-result {
  max-width: 400px;
  margin: 50px auto;
  text-align: center;
  padding: 25px;
}
.template-result h3 {
  font: 26px var(--serif);
  color: #536d40;
}
.template-result p {
  font-size: 11px;
  line-height: 1.8;
  color: #849673;
}
.template-result .primary {
  margin-top: 14px;
}
@keyframes pulse {
  50% {
    box-shadow: 0 0 0 4px #8aa65b1f;
  }
}
@media (min-width: 1500px) {
  .app-shell {
    grid-template-columns: 220px minmax(600px, 1fr) 390px;
  }
  main {
    padding: 30px 48px;
  }
  .intro {
    margin-bottom: 45px;
  }
  .intro h1 {
    font-size: 48px;
  }
  .intro-copy {
    font-size: 13px;
  }
  .mini-document {
    width: 215px;
    height: 250px;
    padding: 28px;
  }
  .mini-document strong {
    font-size: 17px;
  }
  .mini-document b {
    font-size: 9px;
  }
  .input-card {
    padding: 23px;
  }
  .dropzone {
    min-height: 175px;
  }
  .conversation-heading {
    padding: 26px;
  }
  .conversation-scroll {
    padding: 28px;
  }
  .message {
    font-size: 12px;
  }
  .chat-welcome h3 {
    font-size: 30px;
  }
  .chat-welcome > p {
    font-size: 12px;
  }
}
@media (max-width: 1150px) {
  .app-shell {
    grid-template-columns: 155px minmax(360px, 1fr) 300px;
  }
  main {
    padding: 22px;
  }
  .sidebar {
    padding: 22px 10px;
  }
  .mini-document {
    display: none;
  }
  .intro h1 {
    font-size: 38px;
  }
  .start-card {
    flex-direction: column;
    align-items: stretch;
  }
  .start-card > .primary {
    align-self: flex-end;
  }
  .conversation-heading {
    padding: 20px 16px;
  }
  .conversation-scroll {
    padding: 20px 17px;
  }
  .input-cards {
    gap: 10px;
  }
  .input-card {
    padding: 14px;
  }
  .card-title {
    gap: 8px;
  }
  .card-title p {
    font-size: 9px;
  }
  .stage small {
    font-size: 6px;
  }
  .document-actions {
    flex-direction: column;
    align-items: flex-end;
  }
  .document-view {
    padding: 16px;
  }
  .paper {
    padding: 30px 25px;
  }
  .sidebar-bottom {
    font-size: 9px;
  }
}
@media (max-width: 860px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
  .sidebar {
    display: none;
  }
  .topbar {
    height: 72px;
    padding: 0 20px;
  }
  .app-shell {
    min-height: calc(100vh - 72px);
  }
  main,
  .conversation {
    max-height: calc(100vh - 72px);
  }
  .header-right {
    gap: 14px;
  }
  .breadcrumb {
    margin-bottom: 28px;
  }
  .intro {
    margin-bottom: 25px;
  }
  .intro-copy br {
    display: none;
  }
  .input-cards {
    grid-template-columns: 1fr;
  }
  .input-card {
    padding: 15px;
  }
  .dropzone {
    min-height: 105px;
  }
  .card-title {
    margin-bottom: 12px;
  }
  .dropzone .upload-icon {
    display: none;
  }
  .task-tabs button {
    padding: 10px 7px;
    font-size: 10px;
  }
  .intro h1 {
    font-size: 34px;
  }
}
@media (max-width: 620px) {
  .app-shell {
    display: block;
  }
  .topbar {
    padding: 0 16px;
  }
  .brand {
    font-size: 25px;
  }
  .brand-mark {
    width: 34px;
    height: 39px;
    font-size: 30px;
  }
  .brand small {
    font-size: 6px;
  }
  .local-badge {
    display: none;
  }
  .account-button {
    font-size: 10px;
  }
  .conversation {
    border-left: 0;
    border-top: 1px solid var(--line);
    max-height: none;
    min-height: 450px;
  }
  .conversation-scroll {
    max-height: 500px;
  }
  .chat-welcome {
    padding: 10px 4px;
  }
  .welcome-example {
    margin: 17px 0;
  }
  .chat-welcome h3 {
    font-size: 24px;
  }
  .conversation-heading {
    padding: 20px;
  }
  main {
    max-height: none;
    padding: 22px 18px;
  }
  .intro {
    margin-bottom: 25px;
  }
  .intro h1 {
    font-size: 38px;
  }
  .input-cards {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .card-title p {
    font-size: 9px;
  }
  .step-number {
    display: none;
  }
  .card-title h3 {
    font-size: 11px;
  }
  .dropzone strong {
    font-size: 10px;
  }
  .dropzone > span {
    font-size: 8px !important;
  }
  .document-view {
    max-height: none;
  }
  .workspace-header {
    align-items: flex-start;
  }
  .workspace-header h1 {
    font-size: 25px;
  }
  .document-actions {
    gap: 8px;
  }
  .document-view {
    padding: 13px;
  }
  .paper {
    min-height: 500px;
  }
  .document-tabs {
    gap: 7px;
    padding: 0 12px;
  }
  .stage small {
    font-size: 7px;
  }
  .composer-wrap {
    padding: 14px 20px 18px;
  }
  .composer textarea {
    min-height: 80px;
  }
  .setup-note {
    font-size: 9px;
  }
  .conversation-scroll {
    padding: 20px;
  }
  .message {
    font-size: 12px;
  }
  .chat-welcome .quiet {
    font-size: 10px;
  }
  .status-dot {
    width: 7px;
    height: 7px;
  }
  .review-summary {
    gap: 6px;
  }
  .review-stat {
    padding: 11px;
  }
  .review-stat strong {
    font-size: 22px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
.message {
  font-size: 13px;
}
.conversation-heading h2 {
  font-size: 14px;
}
.conversation-heading p {
  font-size: 10px;
}
.chat-welcome > p {
  font-size: 12px;
  color: #707e63;
}
.composer textarea {
  font-size: 12px;
}
.composer-bottom span {
  font-size: 9px;
}
.session-item strong {
  font-size: 12px;
}
.card-title p,
.intro-copy {
  color: #69775d;
}
.stage small {
  font-size: 8px;
}
.decision-card p {
  color: #71835c;
  font-size: 11px;
}
.review-note {
  color: #687b55;
  font-size: 11px;
}
.outline-row strong {
  font-size: 12px;
}

.setup-steps {padding-left: 1.3rem}.setup-steps li {margin: 1rem 0}.setup-steps p {font-size: .9rem; margin: .5rem 0}.setup-steps button {padding-left: 0}

.desktop-panel { margin: 22px 28px 0; padding: 22px; border: 1px solid #c4d2bf; background: #edf3e8; border-radius: 12px; display: flex; gap: 24px; align-items: start; }
.desktop-panel[hidden] { display: none; }
.desktop-panel h2 { margin: 8px 0; font: 25px Georgia, serif; }
.desktop-panel p { max-width: 620px; font-size: 13px; line-height: 1.6; margin: 6px 0; }
.desktop-actions { min-width: 170px; display: grid; gap: 10px; }
.desktop-actions details { font-size: 12px; line-height: 1.6; }
.desktop-actions input { width: 72px; margin: 8px; padding: 5px; }
.downloads { margin: 22px 0 30px; padding: 22px; border: 1px solid var(--line, #dce2d8); border-radius: 12px; background: #fff; }
.downloads-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.downloads-heading h2 { margin: 0; font-size: 19px; }
.downloads-heading span { font-size: 11px; color: var(--muted); }
.download-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.download-cards a { padding: 15px 12px; display: grid; gap: 8px; background: #f6f8f2; border: 1px solid #e0e6d9; border-radius: 8px; text-decoration: none; color: #243d2d; }
.download-cards a:hover { border-color: #487050; background: #edf3e8; }
.download-cards strong { font-size: 13px; }.download-cards span,.download-cards small { font-size: 11px; line-height: 1.5; }.download-cards b { font-size: 12px; margin-top: 5px; }
.downloads .quiet { margin-bottom: 0; font-size: 11px; line-height: 1.65; }.downloads a { color: #355c39; }
.desktop-approval { max-width: 580px; margin: 40px auto; padding: 24px; font-size: 15px; line-height: 1.65; }
.desktop-approval h1 { font: 30px Georgia, serif; }.desktop-approval a { display: block; margin-top: 20px; color: #355c39; }
@media(max-width: 760px) { .desktop-panel { margin: 14px; flex-direction: column; }.desktop-actions { width: 100%; }.download-cards { grid-template-columns: 1fr; }.downloads-heading { align-items: start; flex-direction: column; } }

.page-tabs { height: 54px; display: flex; align-items: stretch; gap: 26px; padding: 0 32px; background: #fcfdf9; border-bottom: 1px solid var(--line); }
.page-tabs > button { background: transparent; padding: 0 2px; border-bottom: 2px solid transparent; color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 10px; }
.page-tabs > button[aria-selected="true"] { color: var(--ink); border-bottom-color: #6a863c; font-weight: 600; }
.tab-status { padding: 4px 7px; border-radius: 5px; background: var(--sage); font-size: 10px; font-weight: 400; }
html[data-hosted="true"] { --workbench-height: calc(100vh - 140px); }
html[data-hosted="true"] .app-shell { min-height: var(--workbench-height); }
html[data-hosted="true"] #main, html[data-hosted="true"] .conversation { max-height: var(--workbench-height); }
.desktop-page { max-width: 1140px; max-height: none; margin: 0 auto; padding: 40px 32px 56px; overflow: visible; }
.desktop-page-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.desktop-page-heading h1 { margin: 8px 0 12px; font: 36px var(--serif); color: var(--ink); }
.desktop-page-heading p:not(.eyebrow) { font-size: 14px; line-height: 1.6; color: #687360; margin: 0; }
.desktop-page .desktop-panel { margin: 24px 0 0; justify-content: space-between; }
.desktop-page .desktop-actions { min-width: 220px; }
.desktop-page .downloads { margin: 0; }
.desktop-model-control { padding: 10px 0; border-top: 1px solid #d5dfcd; }
.desktop-model-control #account-label { display: inline; }
#desktop-setup-link { margin-bottom: 12px; padding-left: 0; }
@media(max-width: 860px) { html[data-hosted="true"] { --workbench-height: calc(100vh - 126px); } }
@media(max-width: 620px) {
  .page-tabs { gap: 20px; padding: 0 18px; }
  .desktop-page { padding: 28px 18px 40px; }
  .desktop-page-heading { flex-direction: column; align-items: start; gap: 12px; }
  .desktop-page-heading h1 { font-size: 30px; }
  html[data-hosted="true"] #main, html[data-hosted="true"] .conversation { max-height: none; }
}

/* Reusable styles share one gallery, independent of the active pi conversation. */
.input-cards.gallery-mode { grid-template-columns: 1fr; }
.gallery-toolbar { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; margin: 0 0 12px; }
.gallery-toolbar [role="group"] { display: flex; gap: 4px; background: var(--sage); border-radius: 6px; padding: 4px; }
.gallery-toolbar button { padding: 9px 12px; background: transparent; color: var(--muted); font-size: 12px; }
.gallery-toolbar button[aria-pressed="true"] { background: white; color: var(--ink); border-radius: 4px; }
.gallery-toolbar input { width: 200px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 5px; }
.gallery-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; max-height: 48vh; overflow: auto; padding: 2px; }
.gallery-card { border: 1px solid var(--line); border-radius: 7px; padding: 20px; display: flex; flex-direction: column; align-items: start; }
.gallery-card.selected { border-color: #6a863c; background: #f5f7ef; box-shadow: inset 0 0 0 1px #6a863c; }
.gallery-card h3 { font: 23px var(--serif); margin: 10px 0; overflow-wrap: anywhere; }
.gallery-card p { font-size: 12px; line-height: 1.65; color: var(--muted); flex: 1; }
.gallery-empty { grid-column: 1 / -1; background: var(--sage); border-radius: 7px; padding: 28px; }
.gallery-empty p { font-size: 13px; line-height: 1.6; }
.gallery-footer { display: flex; flex-wrap: wrap; gap: 18px; justify-content: space-between; padding: 18px 0; margin-top: 16px; border-top: 1px solid var(--line); }
.gallery-import { position: relative; cursor: pointer; }
.gallery-import input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.gallery-import:focus-within { outline: 2px solid #6a863c; outline-offset: 4px; }
.template-picker { padding: 20px; background: #fafbf7; border: 1px dashed #d3dbc7; border-radius: 5px; margin-bottom: 20px; }
#selected-template strong { display: block; font-size: 14px; margin: 6px 0 0; overflow-wrap: anywhere; }
.template-picker .example-file { align-items: flex-start; margin-bottom: 14px; }
.template-picker .gallery-import { display: inline-flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
#clear-draft { margin-top: 10px; }
@media(max-width: 620px) { .gallery-cards { grid-template-columns: 1fr; } .gallery-toolbar input { width: 100%; } .gallery-toolbar label { width: 100%; } }

#pack-balances { margin: 18px 0; padding: 16px; background: var(--sage); border-radius: 7px; }
.pack-balance { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 18px; padding: 8px 0; font-size: 12px; }
.pack-balance small { color: var(--muted); }

.word-locations{border:0;padding:0;margin:24px 0}.word-locations legend{font-size:14px;font-weight:650;margin-bottom:10px}.word-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.word-options label{display:flex;align-items:center;gap:12px;border:1px solid var(--line,#ddd);border-radius:10px;padding:14px;cursor:pointer;background:var(--paper,#fff)}.word-options label:has(:checked){border-color:var(--accent,#8c4936);box-shadow:inset 0 0 0 1px var(--accent,#8c4936)}.word-options strong,.word-options small{display:block}.word-options small{font-size:12px;line-height:1.45;margin-top:5px;color:var(--muted,#666)}.word-options input{accent-color:var(--accent,#8c4936)}.word-locations>p{margin:10px 0}.word-options label:has(:focus-visible){outline:2px solid var(--accent,#8c4936);outline-offset:3px}@media(max-width:600px){.word-options{grid-template-columns:1fr}}

.word-progress { margin: 16px 0; padding: 18px 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.word-progress strong { font-size: 14px; }
.word-progress p { margin: 7px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.word-progress ol { display: flex; flex-wrap: wrap; gap: 12px 24px; list-style: none; padding: 0; margin: 16px 0 0; }
.word-progress li { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 12px; }
.word-progress li > span:first-child { display: grid; place-items: center; width: 23px; height: 23px; border: 1px solid var(--line); border-radius: 50%; }
.word-progress li.done, .word-progress li.current { color: var(--ink); }
.word-progress li.done > span:first-child { background: var(--sage); }
.word-progress li.current { font-weight: 650; }
.word-progress li.current > span:first-child { border: 2px solid var(--accent); }

/* Saved template previews and reversible gallery removal. */
.gallery-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; width: 100%; }
.template-preview-button { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 5px; background: white; padding: 8px 12px; font: inherit; font-size: 12px; cursor: pointer; }
.template-preview-button svg { width: 16px; height: 18px; }
.template-preview-button:hover { border-color: #6a863c; }
.gallery-actions .danger { margin-left: auto; }
.gallery-undo { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 12px 0; font-size: 12px; }
.gallery-undo[hidden] { display: none; }
.template-preview-dialog { width: min(680px, calc(100vw - 32px)); max-height: 90vh; overflow: auto; }
.template-preview-dialog h2 { overflow-wrap: anywhere; padding-right: 24px; }
#template-preview-body { background: #edece7; padding: 24px; border-radius: 6px; }
.template-preview-paper { background: white; color: #171717; padding: 36px; box-shadow: 0 2px 12px #0001; min-height: 330px; overflow-wrap: anywhere; }
@media(max-width: 620px) { #template-preview-body { padding: 12px; } .template-preview-paper { padding: 20px; } }
