/* Shared by the popup and the extension's own pages. */
@font-face { font-family: "QB Fraunces"; src: url("fonts/fraunces.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "QB Inter"; src: url("fonts/inter.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }

:root {
  --bg: #fbf8f3;
  --raised: #ffffff;
  --ink: #221c17;
  --ink-2: #6e635a;
  --ink-3: #9a8f85;
  --line: #ebe3d8;
  --line-2: #f3ede5;
  --green: #2f5d50;
  --green-ink: #ffffff;
  --green-soft: #e4eee9;
  --apricot: #e9a47a;
  --shadow: 0 1px 2px rgba(60, 40, 20, .06), 0 8px 24px rgba(60, 40, 20, .07);
  --serif: "QB Fraunces", ui-serif, Georgia, "Hiragino Mincho ProN", serif;
  --sans: "QB Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Yu Gothic UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161311;
    --raised: #1f1b18;
    --ink: #f3ece4;
    --ink-2: #b0a499;
    --ink-3: #7d7269;
    --line: #2f2925;
    --line-2: #25201d;
    --green: #86bba8;
    --green-ink: #10201b;
    --green-soft: #22312c;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 400 14px/1.5 var(--sans);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button { font: inherit; color: inherit; }

.mark { display: inline-block; width: 1em; height: 1em; color: currentColor; }
.mark svg { width: 100%; height: 100%; display: block; }

/* Switch */
.switch { position: relative; flex: none; width: 38px; height: 22px; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span {
  position: absolute; inset: 0; border-radius: 11px; background: var(--line);
  transition: background .25s;
}
.switch span::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
  transition: transform .3s cubic-bezier(.2, .75, .2, 1);
}
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { outline: 2px solid var(--green); outline-offset: 2px; }
@media (prefers-color-scheme: dark) { .switch span::after { background: #f3ece4; } }

/* Segmented control */
.seg { display: inline-flex; padding: 2px; border-radius: 9px; background: var(--line-2); border: 1px solid var(--line); }
.seg button {
  border: 0; background: none; padding: 4px 10px; border-radius: 7px; cursor: pointer;
  font-size: 12.5px; font-weight: 500; color: var(--ink-2); transition: background .2s, color .2s;
}
.seg button[aria-pressed="true"] { background: var(--raised); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .1); }
.seg button:focus-visible { outline: 2px solid var(--green); outline-offset: 1px; }
