/* Unwatch. Minimal by intent: one accent, hairlines instead of cards, type doing the work.
   Tokens live in /tokens.css, linked before this file by every page. Spacing: 4 8 12 16 24 32 48 72. */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.6; color: var(--text);
  background: var(--bg-page); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-weight: 400; letter-spacing: -0.015em; margin: 0; }
p { margin: 0; }
[hidden] { display: none !important; }
button, input, textarea, select { font: inherit; color: inherit; }
.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; }

/* Only ever the side gutter: a padding shorthand here would wipe out the vertical padding that
   .hero and .section set on the same element. */
.wrap { max-width: 720px; margin: 0 auto; padding-inline: 24px; }
.wrap.wide { max-width: 880px; }

/* header */
.nav { display: flex; align-items: center; gap: 20px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-size: 15px; color: var(--text); letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand svg { width: 19px; height: 19px; color: var(--accent); }
.nav nav { display: flex; align-items: center; gap: 18px; margin-left: auto; }
.nav nav a { color: var(--text-3); font-size: 14px; }
.nav nav a:hover { color: var(--text); text-decoration: none; }

/* controls */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: var(--h-control); padding: 0 15px;
  border-radius: var(--r-control); border: 1px solid var(--border-strong); background: var(--bg-surface);
  color: var(--text); font-size: 14px; white-space: nowrap; cursor: pointer;
  transition: background-color 120ms ease-out, border-color 120ms ease-out, color 120ms ease-out;
}
.btn:hover { background: var(--bg-hover); text-decoration: none; }
.btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.lg { height: var(--h-control-lg); padding: 0 20px; }
.btn.sm { height: var(--h-control-sm); padding: 0 10px; font-size: 13px; }
.btn.quiet { border-color: transparent; background: transparent; color: var(--text-3); }
.btn.quiet:hover { background: var(--bg-hover); color: var(--text); }
.btn.icon { width: var(--h-control); padding: 0; }
.btn svg { width: 16px; height: 16px; flex: none; }
.theme-toggle .sun { display: var(--show-in-dark); }
.theme-toggle .moon { display: var(--show-in-light); }
.kbd { display: inline-flex; align-items: center; height: 19px; padding: 0 6px; border-radius: 4px; border: 1px solid var(--kbd-border); background: var(--kbd-bg); font-size: 11px; line-height: 1; color: var(--text-3); }

/* hero and tool */
.hero { padding: 56px 0 0; text-align: center; }
.hero h1 { font-size: 40px; line-height: 1.15; font-weight: 300; margin-bottom: 14px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lede { font-size: 17px; color: var(--text-2); max-width: 520px; margin: 0 auto 28px; }

.tool { text-align: left; }
.field-row { display: flex; gap: 8px; align-items: stretch; }
.field {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px;
  height: var(--h-control-lg); padding: 0 12px 0 14px; border-radius: var(--r-control);
  background: var(--bg-surface); border: 1px solid var(--border);
  box-shadow: 0 0 0 4px var(--bg-ring);
  transition: box-shadow 140ms ease-out, border-color 140ms ease-out;
}
.field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-wash); }
.field.busy { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-wash); }
.field svg { width: 17px; height: 17px; color: var(--text-3); flex: none; }
.field input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; font-size: 16px; outline: none; }
.field input::placeholder { color: var(--text-3); font-weight: 300; }
.field .kbd { flex: none; }
.field-row .btn { height: var(--h-control-lg); }

/* engine line: one quiet sentence, the picker only when there is a choice */
.engine-strip { margin-top: 12px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--text-3); }
.engine-strip .dot { align-self: center; }
.engine-strip .detail { min-width: 0; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--status-neutral); flex: none; }
.dot.good { background: var(--status-good); }
.dot.warn { background: var(--status-warn); }
.dot.critical { background: var(--status-critical); }
.select {
  height: var(--h-control-sm); padding: 0 24px 0 8px; border-radius: var(--r-control);
  border: 1px solid var(--border); background-color: var(--bg-surface); color: var(--text-2); font-size: 13px;
  appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236f6f6f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 6px center; background-size: 13px;
  /* Engine names are long; without this a select sets the flex row's width and the page scrolls
     sideways on a phone. */
  max-width: 100%; text-overflow: ellipsis;
}
.select:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* progress */
.progress { margin-top: 14px; display: grid; gap: 8px; }
.progress .bar { height: 2px; border-radius: 1px; background: var(--bg-active); overflow: hidden; }
.progress .bar > span { display: block; height: 100%; width: 0; background: var(--accent); transition: width 300ms ease-out; }
.progress .text { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--text-2); }
.progress .text .btn { margin-left: auto; }

/* notices */
.notice { margin-top: 14px; padding: 14px 16px; border-radius: var(--r-card); border: 1px solid var(--border); background: var(--bg-subtle); font-size: 14px; }
.notice.error { border-color: color-mix(in srgb, var(--status-critical) 35%, var(--border)); background: color-mix(in srgb, var(--status-critical) 5%, var(--bg-subtle)); }
.notice strong { font-weight: 500; }
.notice p { margin-top: 4px; color: var(--text-2); }
.notice .actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

/* paste fallback */
.paste { margin-top: 14px; }
.paste textarea {
  width: 100%; min-height: 150px; padding: 12px 14px; border-radius: var(--r-control);
  border: 1px solid var(--border); background: var(--bg-surface); font-size: 14px; line-height: 1.5;
  resize: vertical; box-shadow: 0 0 0 4px var(--bg-ring); outline: none;
}
.paste textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-wash); }
.paste .row { display: flex; gap: 10px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.paste .how { font-size: 13px; color: var(--text-3); }

/* result: hairlines, no cards */
.result { margin-top: 40px; text-align: left; opacity: 0; transform: translateY(4px); transition: opacity 400ms ease-out, transform 400ms ease-out; }
.result.in { opacity: 1; transform: none; }
.summary-head { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 16px; align-items: center; padding-bottom: 24px; }
.summary-head .thumb { width: 132px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-control); background: var(--bg-subtle); display: block; }
.summary-head h2 { font-size: 20px; line-height: 1.3; margin-bottom: 6px; }
.summary-head h2 a { color: var(--text); }
.summary-head .meta { font-size: 13px; color: var(--text-3); }
.summary-block { padding: 24px 0; border-top: 1px solid var(--border); }
.summary-block h3 { font-size: 12px; font-weight: 500; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-3); margin-bottom: 12px; }
.summary-block .tldr { font-size: 18px; line-height: 1.55; font-weight: 300; }
.summary-block > ul { margin: 0; padding-left: 18px; display: grid; gap: 9px; }
.summary-block > ul li { font-size: 15.5px; line-height: 1.55; }
.chapters { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.chapter { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 14px; }
.chapter .t { font-size: 13px; font-variant-numeric: tabular-nums; color: var(--accent); line-height: 24px; }
.chapter h4 { font-size: 15.5px; line-height: 24px; margin-bottom: 4px; }
.chapter ul { margin: 0; padding-left: 18px; display: grid; gap: 5px; }
.chapter li { font-size: 14.5px; color: var(--text-2); line-height: 1.55; }
.result-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 24px; border-top: 1px solid var(--border); }
.result-actions .fine { margin-left: auto; font-size: 12.5px; color: var(--text-3); }

/* recent */
.recent { margin-top: 40px; text-align: left; }
.recent h3 { display: flex; align-items: center; gap: 12px; font-size: 12px; font-weight: 500; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-3); margin-bottom: 8px; }
.recent h3 .btn { margin-left: auto; text-transform: none; letter-spacing: 0; }
.recent-list { display: grid; }
.recent-item { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--border); background: none; border-left: 0; border-right: 0; border-bottom: 0; cursor: pointer; text-align: left; }
.recent-item:hover .title { color: var(--accent); }
.recent-item img { width: 48px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 3px; background: var(--bg-subtle); display: block; }
.recent-item > span { min-width: 0; display: block; }
.recent-item .title { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-item .sub, .recent-item .when { display: block; font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* sections below the fold */
.section { padding: 72px 0 0; }
.section h2 { font-size: 13px; font-weight: 500; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-3); margin-bottom: 20px; }
.points { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.points h3 { font-size: 15.5px; margin-bottom: 6px; }
.points p { font-size: 14.5px; color: var(--text-2); }
.faq { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 40px; }
.faq h3 { font-size: 15.5px; margin-bottom: 6px; }
.faq p { font-size: 14.5px; color: var(--text-2); }

/* prose (legal, 404) */
.prose { max-width: 62ch; padding: 48px 0 72px; }
.prose h1 { font-size: 30px; font-weight: 300; margin-bottom: 6px; }
.prose .updated { color: var(--text-3); font-size: 14px; margin-bottom: 32px; }
.prose h2 { font-size: 18px; margin: 32px 0 10px; }
.prose p { margin-bottom: 13px; }
.prose ul { margin: 0 0 13px; padding-left: 20px; }
.prose li { margin-bottom: 5px; }

/* footer */
/* The page footer. Scoped to the direct child of body so it cannot also style the result's own
   <footer>, which sat under 96px of dead space because of it. */
body > footer { margin-top: 72px; border-top: 1px solid var(--border); padding: 24px 0 40px; font-size: 13px; color: var(--text-3); }
body > footer .row { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
body > footer .row .spacer { flex: 1; }
body > footer a { color: var(--text-3); }
body > footer a:hover { color: var(--text-2); }

@media (max-width: 760px) {
  .hero { padding-top: 32px; }
  .hero h1 { font-size: 30px; }
  .hero .lede { font-size: 16px; margin-bottom: 24px; }
  .section { padding-top: 48px; }
  .points, .faq { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .wrap { padding-inline: 18px; }
}
@media (max-width: 560px) {
  .field-row { flex-direction: column; }
  .field-row .btn { width: 100%; }
  .field .kbd { display: none; }
  .summary-head { grid-template-columns: minmax(0, 1fr); }
  .summary-head .thumb { width: 100%; }
  .chapter { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .chapter .t { line-height: 1.4; }
  .recent-item { grid-template-columns: 48px minmax(0, 1fr); }
  .recent-item .when { display: none; }
  .result-actions .fine { margin-left: 0; width: 100%; }
}
@media (pointer: coarse) { .btn { min-height: 44px; } .btn.sm { min-height: 34px; } .btn.icon { width: 44px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } .result { opacity: 1; transform: none; } }
