:root {
  --ink: #242a35;
  --muted: #636a79;
  --border: #dfe2e9;
  --purple: #554ebf;
  --paper: #fff;
  --canvas: #f6f7fa;
  --serif: Georgia, "Times New Roman", serif;
  --sans:
    Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color-scheme: light;
  font: 15px/1.48 var(--sans);
  color: var(--ink);
  background: var(--canvas);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
select,
input,
textarea {
  font: inherit;
  color: inherit;
}
button,
select {
  cursor: pointer;
}
button {
  border: 0;
  background: none;
}
button:disabled,
select:disabled {
  opacity: 0.52;
  cursor: default;
}
a {
  color: inherit;
}
button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid #8784ef;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
h1,
h2,
h3,
p {
  margin: 0;
}
svg.ico {
  width: 18px;
  height: 18px;
  flex: none;
  vertical-align: middle;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.wrap {
  max-width: 1192px;
  width: calc(100% - 88px);
  margin: auto;
}
.topbar {
  height: 64px;
  background: white;
  border-bottom: 1px solid var(--border);
}
.nav {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 25px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--serif);
  font-weight: bold;
  font-size: 26px;
  letter-spacing: -1.2px;
}
.brand img {
  display: block;
}
.nav-separator {
  width: 1px;
  height: 22px;
  background: var(--border);
}
.nav-current {
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  color: #52516e;
}
.help {
  margin-left: auto;
}
.ghost,
.icon-button,
.scan-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-weight: 550;
  color: var(--muted);
  border-radius: 6px;
}
.ghost {
  padding: 7px 9px;
  font-size: 13px;
}
.ghost:hover,
.icon-button:hover {
  background: #f0f0f7;
  color: var(--purple);
}
.icon-button {
  width: 30px;
  height: 30px;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 34px 0 23px;
}
.page-heading h1 {
  font: normal clamp(30px, 3vw, 42px)/1.15 var(--serif);
  letter-spacing: -1.65px;
}
.page-heading p,
.muted {
  color: var(--muted);
  font-size: 14px;
}
.page-heading p {
  margin-top: 7px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 41px;
  border-radius: 7px;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 600;
  transition:
    background 0.15s,
    box-shadow 0.15s;
}
.btn.secondary {
  background: #fff;
  border: 1px solid #cccfd9;
  box-shadow: 0 1px 2px #18284008;
}
.btn.secondary:hover {
  border-color: #8e88bc;
  background: #faf9ff;
}
.btn.primary {
  background: var(--purple);
  color: white;
  box-shadow: 0 2px 4px #3c347326;
}
.btn.primary:hover {
  background: #453ca8;
}
.book-banner {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #203d4b;
  color: #fff;
  min-height: 162px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  gap: 25px;
  padding: 19px 29px;
  box-shadow: 0 2px 4px #203d4b0c;
}
.banner-art {
  position: absolute;
  z-index: -1;
  inset: 0 0 0 30%;
  background: url("./assets/coast.webp") no-repeat right center;
  background-size: auto 112%;
  pointer-events: none;
}
.book-cover {
  flex: none;
  width: 81px;
  height: 121px;
  position: relative;
  border-radius: 2px 4px 4px 2px;
  box-shadow: 3px 5px 9px #091e29a3;
  overflow: hidden;
  background: #dacead;
}
.book-cover img,
.book-cover #plain-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.book-cover #plain-cover {
  display: grid;
  place-items: center;
  color: #254750;
  background: repeating-linear-gradient(135deg, #ece0cb 0 8px, #d8cab4 8px 9px);
}
.book-cover #plain-cover svg {
  width: 35px;
  height: 35px;
}
.book-cover:after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 4px 0 4px #142e4129;
  pointer-events: none;
}
.book-detail {
  max-width: 72%;
  overflow-wrap: anywhere;
  text-shadow: 0 1px 2px #17303a;
}
.book-eyebrow,
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.6px;
  font-weight: 700;
  text-transform: uppercase;
}
.book-eyebrow {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #d4e3df;
}
.book-eyebrow svg.ico {
  width: 13px;
  height: 13px;
}
.book-detail h2 {
  font: normal clamp(25px, 2.5vw, 36px)/1.16 var(--serif);
  letter-spacing: -0.9px;
  margin: 6px 0 2px;
  color: #fff8e9;
}
.book-detail #book-author {
  font-size: 14px;
  color: #e0e7e8;
}
.book-meta {
  display: flex;
  gap: 9px;
  align-items: center;
  font-size: 12px;
  color: #d0dce0;
  margin-top: 10px;
  flex-wrap: wrap;
}
.book-meta .format {
  border: 1px solid #8fa7ad80;
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 1px;
  line-height: 1.5;
}
.book-meta .divider {
  opacity: 0.6;
}
.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
  margin-top: 22px;
  align-items: start;
}
.workspace-left {
  display: grid;
  gap: 20px;
  min-width: 0;
}
.panel {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: white;
  box-shadow: 0 2px 4px #1b294004;
}
.timeline-card,
.settings-card {
  padding: 23px 25px;
}
.eyebrow {
  color: #777792;
  font-size: 9px;
  letter-spacing: 1.5px;
  margin-bottom: 5px;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.panel h2,
.modal-head h2 {
  font: normal 25px/1.25 var(--serif);
  letter-spacing: -0.75px;
}
.timeline-stats {
  display: flex;
  align-items: baseline;
  gap: 9px;
  color: var(--muted);
  font-size: 13px;
  margin-top: 11px;
}
.timeline-stats strong {
  font-weight: 650;
  color: var(--ink);
  font-size: 16px;
}
.timeline-stats b {
  font-weight: 400;
  color: #9296a2;
}
.timeline-scroll {
  margin: 17px 0 14px;
}
#timeline {
  position: relative;
  background: #ebedf2;
  border-radius: 5px;
  overflow: hidden;
  height: 33px;
  display: flex;
  isolation: isolate;
  border: 1px solid #e1e3eb;
}
.time-bar {
  position: absolute;
  top: 0;
  bottom: 0;
  border: 0;
  padding: 0;
  min-width: 3px;
  opacity: 0.95;
}
.time-bar:hover,
.time-bar:focus-visible {
  outline: 2px solid #333;
  outline-offset: -2px;
  z-index: 3;
}
.ticks {
  pointer-events: none;
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to right,
    transparent 0 calc(1% - 1px),
    #ffffff90 calc(1% - 1px) 1%
  );
  z-index: 2;
}
.axis {
  display: flex;
  justify-content: space-between;
  color: #737988;
  margin-top: 5px;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}
#legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.legend-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 0;
  color: #525967;
  font-size: 12px;
}
.legend-button:hover,
.legend-button.active {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--tone);
}
.findings-header {
  padding: 20px 24px 16px;
}
.findings-header h2 {
  display: flex;
  align-items: center;
  gap: 9px;
}
.count {
  font: 600 12px var(--sans);
  color: #626279;
  background: #f0f0f6;
  border-radius: 5px;
  padding: 4px 7px;
  letter-spacing: 0;
}
.small {
  font-size: 12px;
}
.small svg.ico {
  width: 15px;
  height: 15px;
}
.list-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.select-wrap,
.action-wrap {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0 8px;
  color: #565d6a;
}
.select-wrap select,
.action-wrap select {
  background: transparent;
  border: 0;
  padding: 5px 1px;
  font-size: 12px;
  max-width: 100%;
  color: var(--ink);
}
.select-wrap svg.ico {
  width: 13px;
  height: 13px;
}
.finding {
  padding: 15px 23px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border-top: 1px solid #eceef2;
}
.cat-icon {
  display: inline-grid;
  place-items: center;
  flex: none;
  border-radius: 9px;
  background: var(--tint);
  color: var(--dark);
  width: 36px;
  height: 36px;
}
.cat-icon svg {
  width: 18px;
  height: 18px;
}
.finding-content {
  min-width: 0;
  flex: 1;
}
.finding-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.finding-name {
  font-size: 14px;
  font-weight: 650;
}
.severity {
  color: var(--dark);
  font-size: 10px;
  font-weight: 600;
  background: var(--tint);
  border-radius: 4px;
  padding: 1px 5px;
}
.finding-place {
  color: var(--muted);
  font-size: 12px;
  margin: 3px 0;
}
.finding-action {
  font-size: 12px;
  color: #555c69;
}
.finding .review {
  font-size: 12px;
  font-weight: 600;
  color: var(--purple);
  padding: 5px 0 5px 7px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  align-self: center;
}
.review svg {
  width: 13px;
  height: 13px;
}
.page-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 24px;
  color: var(--muted);
  font-size: 12px;
  border-top: 1px solid var(--border);
}
.page-controls > div {
  display: flex;
  gap: 5px;
}
.page-controls button {
  border: 1px solid var(--border);
  padding: 4px 9px;
  border-radius: 5px;
  background: white;
}
.settings-card h2 {
  display: flex;
  align-items: center;
  gap: 9px;
}
.settings-card h2 .ico {
  width: 19px;
  height: 19px;
  color: #66648b;
}
.settings-card > .muted {
  font-size: 12px;
  margin: 6px 0 11px;
}
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 0;
  border-bottom: 1px solid #eaecf0;
}
.setting-row:last-child {
  border-bottom: 0;
}
.setting-row label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
}
.setting-row .cat-icon {
  height: 27px;
  width: 27px;
  border-radius: 7px;
}
.setting-row .cat-icon .ico {
  width: 15px;
  height: 15px;
}
.action-wrap {
  max-width: 123px;
  background: #fafbfc;
  padding: 0 7px;
}
.action-wrap select {
  font-size: 12px;
  padding: 5px 0;
}
.export-area {
  margin: 8px -25px -23px;
  padding: 16px 25px 14px;
  border-top: 1px solid var(--border);
  background: #fafaff;
  border-radius: 0 0 12px 12px;
}
.export-summary {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #4c5067;
  margin-bottom: 10px;
}
.export-summary svg {
  width: 15px;
  height: 15px;
  color: #4e846d;
}
.export-area .btn {
  width: 100%;
}
.export-area p {
  text-align: center;
  color: var(--muted);
  font-size: 10px;
  margin-top: 7px;
}
.export-area p span {
  padding: 0 4px;
}
.scan-link {
  font-size: 11px;
  margin: 11px auto;
  display: flex;
  gap: 6px;
}
.scan-link .ico {
  width: 13px;
  height: 13px;
}
footer {
  display: flex;
  justify-content: space-between;
  color: #747987;
  border-top: 1px solid var(--border);
  padding: 18px 0 24px;
  margin-top: 28px;
  font-size: 11px;
}
footer span:first-child {
  font-family: var(--serif);
  font-size: 15px;
}
.empty {
  padding: 25px;
  color: var(--muted);
  text-align: center;
}
#notice {
  padding: 12px 15px;
  border: 1px solid #c6c5e0;
  background: #f0effc;
  border-radius: 8px;
  margin: 12px 0;
  color: #444063;
}
#toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  border: 1px solid #40505a;
  color: white;
  background: #243640;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 13px;
  box-shadow: 0 5px 25px #0002;
  max-width: 90vw;
}
dialog {
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 25px;
  max-width: min(520px, calc(100% - 28px));
  width: 520px;
  box-shadow: 0 22px 110px #18283935;
}
dialog::backdrop {
  background: #15233163;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 16px;
}
#modal-body {
  display: grid;
  gap: 14px;
  font-size: 14px;
}
#modal-body p {
  color: #555e6d;
}
#modal-body .field {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
}
#modal-body input[type="text"],
#modal-body textarea,
#modal-body select {
  width: 100%;
  padding: 9px;
  border: 1px solid #c9ccd7;
  border-radius: 6px;
  background: #fff;
  font-size: 14px;
  font-weight: 400;
}
textarea {
  resize: vertical;
  min-height: 75px;
}
.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.drop {
  border: 1.5px dashed #a49fce;
  border-radius: 9px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 29px 12px;
  background: #f7f6fd;
  cursor: pointer;
  color: var(--purple);
}
.drop strong {
  font-size: 16px;
  margin: 6px;
}
.drop span {
  font-size: 12px;
  color: var(--muted);
}
.drop.drag {
  background: #e8e6ff;
}
.drop input {
  max-width: 100%;
  margin: 13px auto 0;
  font-size: 12px;
}
.error {
  color: #97362d !important;
}
.original {
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 11px;
}
.original summary {
  cursor: pointer;
  color: #51488f;
  font-weight: 600;
}
.original blockquote {
  margin: 8px 0 0;
  color: #484c55;
  background: #f7f7fa;
  padding: 10px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.sample-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.model-check {
  display: flex;
  align-items: flex-start;
  gap: 7px;
}
.fine {
  font-size: 12px;
}
.guide-list {
  padding-left: 20px;
  display: grid;
  gap: 8px;
  margin: 0;
}
.result-text {
  background: #f2f2fa;
  padding: 12px;
  border-radius: 6px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.category-meta {
  display: flex;
  gap: 8px;
  align-items: center;
}
.dialog-loc {
  font-size: 12px;
  color: var(--muted);
}
.modal-message:empty {
  display: none;
}
.modal-message {
  color: #a13c35;
}
@media (min-width: 1300px) {
  .workspace-grid {
    grid-template-columns: minmax(0, 1fr) 340px;
  }
}
@media (max-width: 900px) {
  .wrap {
    width: calc(100% - 42px);
  }
  .workspace-grid {
    grid-template-columns: minmax(0, 1fr) 290px;
    gap: 15px;
  }
  .settings-card,
  .timeline-card {
    padding: 18px;
  }
  .export-area {
    margin: 8px -18px -18px;
    padding: 15px 18px;
  }
  .findings-header,
  .finding {
    padding-left: 18px;
    padding-right: 18px;
  }
  .banner-art {
    inset-inline-start: 28%;
    opacity: 0.8;
  }
}
@media (max-width: 710px) {
  .wrap {
    width: calc(100% - 32px);
  }
  .topbar {
    height: 56px;
  }
  .nav {
    gap: 13px;
  }
  .nav-current,
  .nav-separator {
    display: none;
  }
  .brand {
    font-size: 24px;
  }
  .workspace-grid {
    grid-template-columns: 1fr;
    margin-top: 15px;
  }
  .workspace-left {
    display: contents;
  }
  .timeline-card {
    grid-row: 1;
  }
  .workspace-grid aside {
    grid-row: 2;
  }
  .findings-card {
    grid-row: 3;
  }
  .page-heading {
    margin: 23px 0 16px;
    align-items: flex-start;
  }
  .page-heading p {
    font-size: 12px;
    max-width: 25ch;
  }
  .page-heading .btn {
    font-size: 12px;
    padding: 8px 10px;
    min-height: 36px;
  }
  .page-heading h1 {
    font-size: 29px;
    letter-spacing: -1.2px;
  }
  .book-banner {
    min-height: 134px;
    padding: 16px;
    gap: 15px;
  }
  .book-cover {
    width: 62px;
    height: 93px;
  }
  .book-detail h2 {
    font-size: 26px;
  }
  .book-detail {
    max-width: calc(100% - 77px);
  }
  .book-detail #book-author {
    font-size: 12px;
  }
  .book-meta {
    font-size: 10px;
    gap: 6px;
  }
  .banner-art {
    opacity: 0.32;
  }
  .setting-row {
    padding: 8px 0;
  }
  .scan-link {
    margin: 9px auto 0;
  }
  #legend {
    gap: 6px 12px;
  }
  .timeline-scroll {
    margin: 13px 0;
  }
  .panel h2 {
    font-size: 23px;
  }
  .finding-top {
    gap: 4px;
  }
  .finding {
    gap: 9px;
  }
  .list-controls .select-wrap {
    min-width: 0;
    max-width: 100%;
  }
  .modal-head h2 {
    font-size: 24px;
  }
  #modal-body .sample-row {
    align-items: flex-start;
  }
  .book-banner .book-eyebrow {
    font-size: 9px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
.reveal-check {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
}
.reveal-check input {
  accent-color: var(--purple);
}
.row-excerpt {
  margin: 9px 0 0;
  padding: 8px 12px;
  border-left: 2px solid var(--tone);
  background: #faf9fc;
  font: 15px/1.5 var(--serif);
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.intensity {
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 0 4px;
  color: var(--muted);
  font-size: 11px;
}
.intensity select {
  background: transparent;
  border: 0;
  padding: 3px 2px;
  color: var(--ink);
  font-size: 12px;
}
.action-wrap select {
  padding-right: 4px;
}
.findings-header .small {
  white-space: nowrap;
}
@media (max-width: 420px) {
  .findings-header h2 {
    font-size: 21px;
    gap: 6px;
  }
  .findings-header .small {
    padding: 6px 0;
    font-size: 11px;
  }
  .reveal-check {
    margin-left: 0;
  }
  .finding-top {
    gap: 6px;
  }
}

.scene-status {
  margin: 16px 0;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid #e0e2ec;
  border-radius: 12px;
  background: white;
}
.scene-status strong, .review-method h3 { font-size: 1rem; }
.scene-status p { margin: 4px 0 0; color: #555d70; font-size: .88rem; }
.scene-status .btn { flex-shrink: 0; }
.review-method h3 { margin: 0; }
.review-method p { margin: 6px 0 12px; }
.review-method #kit-status { margin-bottom: 0; }
.review-method + .review-method { border-top: 1px solid #e0e2ec; margin-top: 20px; padding-top: 20px; }
.kit-actions { display: flex; gap: 10px; flex-wrap: wrap; }
#kit-status:empty { display: none; }
@media (max-width: 570px) {
  .scene-status { align-items: flex-start; flex-direction: column; padding: 14px 16px; gap: 10px; }
}
