/* Savvid site. Follows the extension's design system: Chrome's surfaces and type ramp,
   pure greys, and one blue that only ever means "saving". No external resources. */

:root {
  color-scheme: light dark;
  --surface: #FFFFFF;
  --ink: #1F1F1F;
  --ink-2: #474747;
  --ink-3: #6B6B6B;
  --line: #E3E3E3;
  --line-strong: #C7C7C7;
  --wash: #EFEFEF;
  --tile-edge: rgb(0 0 0 / 0.07);
  --hover: rgb(31 31 31 / 0.045);
  --selected: rgb(31 31 31 / 0.07);
  --blue: #0B57D0;
  --blue-wash: rgb(11 87 208 / 0.08);
  --rec: #D93025;
  --ok: #146C2E;
  --bad: #B3261E;
  --mark: #4E8BF4;
  --scrim: rgb(0 0 0 / 0.72);
  --bubble-ring: #E3E3E3;
  --float-shadow: 0 2px 8px rgb(60 64 67 / 0.2), 0 2px 12px rgb(60 64 67 / 0.1);
  --focus: #1F1F1F;
}

:root[data-theme="dark"] {
  --surface: #1F1F1F;
  --ink: #E3E3E3;
  --ink-2: #C7C7C7;
  --ink-3: #9A9A9A;
  --line: #363636;
  --line-strong: #5C5C5C;
  --wash: #2E2E2E;
  --tile-edge: rgb(255 255 255 / 0.08);
  --hover: rgb(227 227 227 / 0.06);
  --selected: rgb(227 227 227 / 0.09);
  --blue: #A8C7FA;
  --blue-wash: rgb(168 199 250 / 0.12);
  --rec: #FF6B5E;
  --ok: #6DD58C;
  --bad: #F28B82;
  --bubble-ring: #5C5C5C;
  --float-shadow: 0 2px 8px rgb(0 0 0 / 0.4), 0 2px 12px rgb(0 0 0 / 0.25);
  --focus: #E3E3E3;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --surface: #1F1F1F;
    --ink: #E3E3E3;
    --ink-2: #C7C7C7;
    --ink-3: #9A9A9A;
    --line: #363636;
    --line-strong: #5C5C5C;
    --wash: #2E2E2E;
    --tile-edge: rgb(255 255 255 / 0.08);
    --hover: rgb(227 227 227 / 0.06);
    --selected: rgb(227 227 227 / 0.09);
    --blue: #A8C7FA;
    --blue-wash: rgb(168 199 250 / 0.12);
    --rec: #FF6B5E;
    --ok: #6DD58C;
    --bad: #F28B82;
    --bubble-ring: #5C5C5C;
    --float-shadow: 0 2px 8px rgb(0 0 0 / 0.4), 0 2px 12px rgb(0 0 0 / 0.25);
    --focus: #E3E3E3;
  }
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { background: var(--surface); }

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font: 400 16px/24px system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
}

a {
  color: var(--blue);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  width: min(100% - 40px, 1040px);
  margin-inline: auto;
}

/* ---------- Header and footer ---------- */

.site-header {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: inset 0 -1px 0 var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}
.brand .mark { width: 24px; height: 24px; color: var(--mark); display: block; }

.site-nav { display: flex; gap: 4px; margin-right: -12px; }
.site-nav a {
  display: flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--ink-2);
  text-decoration: none;
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
}
.site-nav a:hover { background: var(--hover); color: var(--ink); }

.site-footer {
  box-shadow: inset 0 1px 0 var(--line);
  padding: 32px 0 48px;
  color: var(--ink-3);
  font-size: 13px;
  line-height: 20px;
}
.site-footer p { margin: 0 0 8px; max-width: 72ch; }
.site-footer a { color: var(--ink-2); }
.site-footer .foot-links { display: flex; gap: 20px; margin: 0 0 16px; }

/* ---------- Hero ---------- */

.hero {
  padding: 72px 0 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}
@media (min-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr) 480px; gap: 64px; padding: 96px 0 88px; }
}

.hero h1 {
  margin: 0 0 16px;
  font-size: 40px;
  line-height: 48px;
  font-weight: 600;
  text-wrap: balance;
  max-width: 15ch;
}
@media (max-width: 599px) {
  .hero h1 { font-size: 32px; line-height: 40px; }
  .hero { padding: 48px 0 56px; }
}

.hero .lede {
  margin: 0;
  font-size: 18px;
  line-height: 28px;
  color: var(--ink-2);
  max-width: 44ch;
}

.hero .status {
  margin: 24px 0 0;
  font-size: 14px;
  line-height: 20px;
  color: var(--ink-3);
}

/* ---------- Sections ---------- */

.section {
  max-width: 680px;
  padding: 0 0 64px;
}
.section h2 {
  margin: 0 0 16px;
  font-size: 20px;
  line-height: 28px;
  font-weight: 600;
}
.section p { margin: 0 0 16px; }
.section p:last-child { margin-bottom: 0; }

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: 16px;
}
.steps li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
.steps li::before {
  counter-increment: step;
  content: counter(step);
  width: 28px;
  height: 28px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
  display: grid;
  place-items: center;
  font-size: 13px;
  line-height: 20px;
  font-weight: 600;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
  margin-top: -2px;
}

/* "What it can do" and "What it does not do" sit side by side where there is room. */
@media (min-width: 900px) {
  .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; }
  .pair .section { max-width: none; }
}

.plain {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
}
.plain li::marker { color: var(--ink-3); }

.contact dl {
  margin: 0;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 8px 24px;
}
.contact dt { color: var(--ink-3); }
.contact dd { margin: 0; }

/* ---------- The popup, drawn as Chrome draws it ---------- */

.popup {
  width: 100%;
  max-width: 480px;
  background: var(--surface);
  border-radius: 12px;
  box-shadow: 0 0 0 1px var(--bubble-ring), var(--float-shadow);
  font-size: 13px;
  line-height: 20px;
  color: var(--ink);
  overflow: hidden;
  justify-self: start;
}
@media (min-width: 900px) { .popup { justify-self: end; } }

.p-header {
  height: 48px;
  display: flex;
  align-items: center;
  padding: 0 12px 0 8px;
  box-shadow: inset 0 -1px 0 var(--line);
}
.p-tabs { display: flex; height: 48px; }
.p-tab {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  font-weight: 600;
  color: var(--ink-2);
}
.p-tab .count { font-weight: 400; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.p-tab.active { color: var(--ink); }
.p-tab.active::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 2px;
  background: var(--ink);
  border-radius: 2px 2px 0 0;
}
.p-right { margin-left: auto; display: flex; gap: 4px; }
.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--ink-2);
}

.ic {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ic16 { width: 16px; height: 16px; stroke-width: 1.25; }
.ic12 { width: 12px; height: 12px; stroke-width: 1.25; }

.p-section {
  height: 40px;
  padding: 4px 12px 0 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  line-height: 16px;
  color: var(--ink-2);
}
.p-section .head { font-weight: 600; }
.p-section .count { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.p-section .fact { display: flex; align-items: center; gap: 4px; color: var(--ink-3); }
.p-section .tools { margin-left: auto; display: flex; }
.text-btn {
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  font-weight: 600;
  color: var(--ink-2);
}

.vlist { padding: 0 0 8px; }

.vcard {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  column-gap: 12px;
  align-items: center;
  min-height: 56px;
  margin: 0 8px;
  padding: 8px 8px 8px 12px;
  border-radius: 8px;
}
.vcard.selected { background: var(--selected); }

.tile {
  position: relative;
  width: 64px;
  height: 36px;
  border-radius: 4px;
  background: var(--wash);
  overflow: hidden;
}
.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px var(--tile-edge);
  pointer-events: none;
}
.tile .kind {
  position: absolute;
  top: 5px;
  left: 5px;
  width: 14px;
  height: 14px;
  color: var(--ink-3);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tile .dur {
  position: absolute;
  right: 4px;
  bottom: 4px;
  font-size: 11px;
  line-height: 14px;
  font-weight: 600;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.tile .dur.live { display: flex; align-items: center; gap: 4px; }
.tile .dur.live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--rec);
}
.tile .pic-img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.tile.pic .dur {
  right: 2px;
  bottom: 2px;
  padding: 0 4px;
  border-radius: 2px;
  background: var(--scrim);
  color: #FFFFFF;
}
.tile.pic.saving .dur { bottom: 5px; }
.tile .bar {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgb(255 255 255 / 0.35);
}
.tile.saving .bar { display: block; }
.tile .bar .fill { display: block; height: 100%; width: 46%; background: var(--blue); }
.vcard.stale .tile .kind, .vcard.stale .tile .pic-img { opacity: 0.6; }

.vtext { min-width: 0; }
.vtitle {
  font-weight: 600;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.vcard.off .vtitle { color: var(--ink-2); }
.vmeta {
  height: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  line-height: 16px;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
}
.vmeta .state { font-weight: 600; }
.vmeta .state.ok { color: var(--ok); }
.vmeta .q { display: inline-flex; align-items: center; gap: 2px; }
.vmeta .q .ic16 { color: var(--ink-3); flex: none; }
.vmeta .qual { color: var(--ink-3); }
.vnote { font-size: 12px; line-height: 16px; color: var(--ink-3); }
[hidden] { display: none !important; }

.slot {
  position: relative;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
}
.slot > * { grid-area: 1 / 1; }
.ring { width: 28px; height: 28px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 1.5; }
.ring .track { stroke: var(--line-strong); }
.ring .arc {
  stroke: var(--blue);
  stroke-linecap: round;
  stroke-dasharray: 83.25;
  stroke-dashoffset: 83.25;
  transition: stroke-dashoffset 180ms linear;
}
.slot .pct {
  font-size: 11px;
  line-height: 14px;
  font-weight: 600;
  color: var(--blue);
  font-variant-numeric: tabular-nums;
}
.slot .dot { width: 5px; height: 5px; border-radius: 999px; background: var(--blue); }
.slot .glyph { color: var(--blue); }

.slot .pct, .slot .dot, .slot .glyph, .slot .arc { display: none; }
.slot[data-slot="idle"] .glyph { display: block; }
.slot[data-slot="downloading"] .track { stroke: var(--line); }
.slot[data-slot="downloading"] .arc { display: block; }
.slot[data-slot="downloading"] .pct { display: block; }
.slot[data-slot="finishing"] .track { stroke: var(--blue); }
.slot[data-slot="finishing"] .dot { display: block; }
.slot[data-slot="saved"] .track { stroke: var(--ok); }
.slot[data-slot="saved"] .glyph { display: block; color: var(--ok); }

.record {
  height: 28px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px 0 10px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--line-strong);
  font-weight: 600;
  color: var(--blue);
}
.record::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--rec);
}

.p-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  margin: 0 20px;
  box-shadow: inset 0 1px 0 var(--line);
  font-size: 13px;
  color: var(--ink-2);
}
.p-foot .ic16 { color: var(--ink-3); }
.p-foot .count { color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* ---------- Long-form pages (privacy policy, 404) ---------- */

.prose {
  max-width: 720px;
  padding: 48px 0 64px;
}
.prose h1 {
  margin: 0 0 8px;
  font-size: 32px;
  line-height: 40px;
  font-weight: 600;
  text-wrap: balance;
}
.prose h2 { margin: 48px 0 12px; font-size: 20px; line-height: 28px; font-weight: 600; }
.prose h3 { margin: 32px 0 8px; font-size: 16px; line-height: 24px; font-weight: 600; }
.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 24px; }
.prose li { margin: 0 0 8px; }
.prose li::marker { color: var(--ink-3); }
.prose strong { font-weight: 600; }
.prose code {
  font: inherit;
  padding: 0 4px;
  border-radius: 4px;
  background: var(--wash);
}
.prose hr { border: 0; height: 1px; background: var(--line); margin: 32px 0; }
.table-wrap { overflow-x: auto; margin: 0 0 24px; }
.prose table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
  line-height: 20px;
}
.prose th, .prose td {
  text-align: left;
  vertical-align: top;
  min-width: 10em;
  padding: 8px 16px 8px 0;
  box-shadow: inset 0 -1px 0 var(--line);
}
.prose th { font-weight: 600; color: var(--ink-2); }
.prose td:last-child, .prose th:last-child { padding-right: 0; }

/* On a phone each table row becomes a block, with the column header above each cell. */
@media (max-width: 599px) {
  .prose table, .prose tbody, .prose tr, .prose td { display: block; min-width: 0; }
  .prose thead { display: none; }
  .prose tr { padding: 12px 0; box-shadow: inset 0 -1px 0 var(--line); }
  .prose td { padding: 4px 0; box-shadow: none; }
  .prose td::before {
    content: attr(data-label);
    display: block;
    font-size: 12px;
    line-height: 16px;
    color: var(--ink-3);
  }
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
