/*
  Sunny Reader—sunnyreader.com stylesheet.
  Palette mirrors the extension's "Sunny" theme (solarized-light), with
  the orange sun and teal iris from the app icon as accents.
*/

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(fonts/inter-normal-latin.woff2) format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url(fonts/inter-italic-latin.woff2) format('woff2');
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(fonts/sourceserif4-normal-latin.woff2) format('woff2');
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url(fonts/sourceserif4-italic-latin.woff2) format('woff2');
}
@font-face {
  font-family: 'Comic Neue';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(fonts/comic-neue-latin.woff2) format('woff2');
}
:root {
  --bg: #fdf6e3;
  --bg-2: #f5ecd0;
  --bg-3: #ecdfb8;
  --surface: #fffbf0;
  --fg: #475b62;
  --fg-strong: #2b3e46;
  --fg-muted: #7a8a90;
  --link: #268bd2;
  --link-hover: #1a5fa6;
  --sun: #f5a623;
  --sun-deep: #e07e18;
  --iris: #3ce0d1;
  --iris-deep: #14a69a;
  --accent-warm: #c44f67;
  --border: rgba(71, 91, 98, 0.15);
  --border-strong: rgba(71, 91, 98, 0.28);
  --shadow-sm: 0 1px 2px rgba(43, 62, 70, 0.06);
  --shadow-md: 0 4px 16px rgba(43, 62, 70, 0.08), 0 1px 2px rgba(43, 62, 70, 0.06);
  --shadow-lg: 0 12px 40px rgba(43, 62, 70, 0.12), 0 4px 12px rgba(43, 62, 70, 0.08);
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --max: 1120px;
  /* Matches the extension's default: src/shared/defaults.js → prefs.font */
  --font-ui: 'Inter', Helvetica, Arial, sans-serif;
  --font-display: 'Inter', Helvetica, Arial, sans-serif;
  --font-serif: 'Source Serif 4', 'Iowan Old Style', Georgia, serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #002b36;
    --bg-2: #073642;
    --bg-3: #0b4452;
    --surface: #083642;
    --fg: #94a5a6;
    --fg-strong: #e1ebeb;
    --fg-muted: #6b7e82;
    --link: #6fc3df;
    --link-hover: #a9dff0;
    --border: rgba(148, 165, 166, 0.18);
    --border-strong: rgba(148, 165, 166, 0.34);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.35), 0 1px 2px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.45), 0 4px 12px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  color-scheme: light dark;
}

body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 17px;
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a {
  color: var(--link);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover { color: var(--link-hover); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--fg-strong);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(2.25rem, 4.8vw, 3.75rem); letter-spacing: -0.025em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); letter-spacing: -0.02em; }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ------------------------------------------------------------------
   Header
------------------------------------------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--fg-strong);
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--fg-strong); }
.brand img { width: 32px; height: 32px; }

.nav {
  margin-left: auto;
  display: flex;
  gap: 4px;
  align-items: center;
}
.nav a {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  color: var(--fg);
  transition: background 0.15s ease, color 0.15s ease;
}
.nav a:hover {
  background: var(--bg-2);
  color: var(--fg-strong);
}
.nav a.cta {
  background: var(--fg-strong);
  color: var(--bg);
  padding: 8px 16px;
}
.nav a.cta:hover {
  background: var(--link);
  color: var(--bg);
}

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

.hero {
  position: relative;
  padding: 80px 0 60px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -160px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 900px;
  background: radial-gradient(
    closest-side,
    color-mix(in srgb, var(--sun) 22%, transparent),
    transparent 70%
  );
  filter: blur(20px);
  z-index: 0;
  pointer-events: none;
}

.hero .wrap {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 56px;
  align-items: center;
}

@media (max-width: 860px) {
  .hero { padding: 48px 0 40px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 40px; }
}

.hero-copy .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--sun-deep);
  background: color-mix(in srgb, var(--sun) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--sun) 28%, transparent);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 20px;
}
.hero-copy .eyebrow::before {
  content: "";
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--sun);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--sun) 30%, transparent);
}

.hero-copy h1 {
  font-weight: 700;
  margin-bottom: 20px;
}
.hero-copy h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--sun-deep) 0%, var(--sun) 55%, var(--iris-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-copy .lede {
  font-size: 1.2rem;
  color: var(--fg);
  max-width: 34ch;
  margin-bottom: 32px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: var(--radius);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 1rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
  text-decoration: none;
}
.btn-primary {
  background: linear-gradient(180deg, var(--sun) 0%, var(--sun-deep) 100%);
  color: #2b1a08;
  box-shadow: 0 8px 20px rgba(224, 126, 24, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn-primary:hover {
  transform: translateY(-1px);
  color: #2b1a08;
  box-shadow: 0 12px 26px rgba(224, 126, 24, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.btn-primary:active {
  transform: translateY(1px);
  box-shadow: 0 4px 10px rgba(224, 126, 24, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.btn-secondary {
  background: var(--surface);
  color: var(--fg-strong);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover {
  background: var(--bg-2);
  color: var(--fg-strong);
  transform: translateY(-1px);
}

.hero-footnote {
  margin-top: 22px;
  font-size: 0.9rem;
  color: var(--fg-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}
.hero-footnote span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.hero-footnote .check {
  color: var(--iris-deep);
  font-weight: 700;
}

/* ------------------------------------------------------------------
   Reader mockup (hero-right)
------------------------------------------------------------------ */

.mockup {
  position: relative;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  font-family: var(--font-serif);
  transform: perspective(1600px) rotateY(-4deg) rotateX(1deg);
  transition: transform 0.4s ease;
}
.mockup:hover {
  transform: perspective(1600px) rotateY(-2deg) rotateX(0deg);
}

/* Chrome browser chrome: traffic lights + tab strip + omnibox.
   Mirrors the rhythm of a real Chrome window so the reader view reads
   as a tab inside Chrome, not a floating desktop widget. */
.browser-chrome {
  background: var(--bg-3);
  border-bottom: 1px solid var(--border);
}
.browser-tabs {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  padding: 9px 10px 0;
  min-height: 38px;
}
.traffic-lights {
  display: flex;
  gap: 8px;
  margin: 0 10px 9px 4px;
  flex-shrink: 0;
}
.tl {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.1);
}
.tl-red    { background: #ff5f57; }
.tl-yellow { background: #febc2e; }
.tl-green  { background: #28c840; }
.browser-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 260px;
  padding: 8px 14px 9px;
  border-radius: 10px 10px 0 0;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
}
.browser-tab.active {
  background: var(--surface);
  color: var(--fg-strong);
  border: 1px solid var(--border);
  border-bottom: none;
}
.browser-tab img { width: 14px; height: 14px; flex-shrink: 0; }
.browser-tab span { overflow: hidden; text-overflow: ellipsis; }
.browser-newtab {
  margin: 0 0 6px 4px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--fg-muted);
  cursor: default;
}
.browser-newtab svg { width: 14px; height: 14px; }
.browser-omnibox {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.browser-navbtns { display: flex; gap: 2px; }
.browser-navbtns button {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--fg-strong);
  cursor: default;
}
.browser-navbtns button svg { width: 14px; height: 14px; }
.browser-navbtns button.dim { color: var(--fg-muted); opacity: 0.55; }
.omnibox {
  flex: 1;
  height: 28px;
  background: var(--bg-2);
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--fg);
  min-width: 0;
}
.omnibox-lock { width: 12px; height: 12px; flex-shrink: 0; color: var(--fg-muted); }
.omnibox-url {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.browser-extbtn {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--sun) 18%, transparent);
}
.browser-extbtn img { width: 18px; height: 18px; }

/* Body: toolbar on the left, article column on the right with enough
   right-padding to reserve a margin strip where the sticky note lives.
   Keeping the article in one relative container (not a 3-col grid)
   means the note can sit absolutely in that reserved strip, and the
   tape always floats above in clean whitespace — never over text. */
.mockup-body {
  position: relative;
  display: grid;
  grid-template-columns: 52px 1fr;
  min-height: 440px;
}

/* Toolbar dimensions mirror src/ui/reader/index.css—
   --toolbar-item-width: 48px / --toolbar-item-height: 52px / radius 12px. */
.mockup-toolbar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  box-shadow: inset -1px 0 0 var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 0;
}
.mockup-toolbar .tool {
  width: 40px;
  height: 44px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--fg-strong);
  opacity: 0.7;
}
.mockup-toolbar .tool svg {
  width: 20px;
  height: 20px;
  display: block;
}
.mockup-toolbar .tool.active {
  opacity: 1;
  background: linear-gradient(180deg, rgba(64,147,219,0.16), rgba(64,147,219,0.04));
  color: #1a5fa6;
  box-shadow: 0 4px 10px rgba(64,147,219,0.10);
}
.mockup-toolbar .tool.pin {
  margin-top: auto;
  opacity: 0.55;
  background: linear-gradient(180deg, rgba(128,128,128,0.14), rgba(128,128,128,0.02));
}

.mockup-article {
  padding: 28px 32px 36px 32px;
  color: var(--fg-strong);
  min-width: 0;
}
.mockup-article .kicker {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--fg-muted);
  margin-bottom: 10px;
}
.mockup-article h3 {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
}
.mockup-article .byline {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--fg-muted);
  margin-bottom: 20px;
}
.mockup-article p {
  font-size: 1rem;
  line-height: 1.7;
  margin: 0 0 14px;
}
.mockup-article .hl {
  background: #fff59d;
  color: #2a2620;
  padding: 1px 2px;
  border-radius: 2px;
  box-decoration-break: clone;
}
@media (prefers-color-scheme: dark) {
  .mockup-article .hl { background: #6b5a3b; color: #f4e9d6; }
}

/* ------------------------------------------------------------------
   Sticky notes — faithful port of the extension's .note surface
   (see src/shared/note-core.js §PALETTE and the .note-* rules around
   line 1525). Palette, radius, shadow, tape opacity, diagonal grip,
   and body typography all mirror the live component.
------------------------------------------------------------------ */

/* Structure mirrors src/shared/note-core.js exactly:
     .note
       .note-tape-layer > .note-tape-viewport > img.note-tape-art
       .note-surface
         .note-toolbar      (reserves ~22px at top; empty at rest)
         .note-body
   The tape-layer is a SIBLING of the surface so it can float outside
   surface's overflow:hidden clip. Text starts below the toolbar, which
   sits in the horizontal band covered by the tape. */
.note {
  position: absolute;
  width: 240px;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--note-color);
}
.note-surface {
  position: relative;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12), 0 1px 3px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  background-color: var(--note-bg);
  color: var(--note-color);
  overflow: hidden;
}
.note-toolbar {
  height: 22px;
  padding: 5px 8px 5px 11px;
  flex-shrink: 0;
}
.note-body {
  flex: 1;
  min-height: 0;
  padding: 6px 16px 14px;
  text-align: left;
  font: 14px/1.35 system-ui, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: 0.01em;
  word-wrap: break-word;
  overflow-wrap: break-word;
  color: var(--note-color);
  box-shadow: inset 0 4px 8px -4px rgba(0,0,0,0.03), inset 0 0 16px rgba(0,0,0,0.01);
}
.note-body p { margin: 0 0 10px 0; }
.note-body p:last-child { margin-bottom: 0; }

.note-surface::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 16px;
  height: 16px;
  pointer-events: none;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 2px,
    var(--note-grip) 2px,
    var(--note-grip) 3.5px
  );
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
  opacity: 0.7;
}

.note-tape-layer {
  position: absolute;
  left: 50%;
  top: 0;
  z-index: 2;
  transform: translate(-50%, -50%) rotate(var(--tape-angle, 0deg));
  transform-origin: center center;
  pointer-events: none;
}
.note-tape-viewport {
  overflow: hidden;
  display: flex;
  justify-content: center;
}
.note-tape-art {
  display: block;
  width: 140px;
  max-width: none;
  height: auto;
  opacity: 0.65;
  -webkit-user-drag: none;
  user-select: none;
}

/* Mockup size tweak — smaller note that still keeps the proportions */
.mockup .note { width: 210px; }
.mockup .note .note-tape-art { width: 120px; }
.mockup .note .note-body { font-size: 13px; padding: 6px 14px 12px; }
.mockup .note .note-toolbar { height: 20px; }

/* Palette — indices match PALETTE in src/shared/note-core.js */
.note[data-type="0"] { --note-bg: #FFF5CA; --note-color: #5C5017; --note-grip: #E9DD98; }
.note[data-type="1"] { --note-bg: #FFE5DB; --note-color: #6B3324; --note-grip: #EEC8BC; }
.note[data-type="2"] { --note-bg: #FFDAEA; --note-color: #6B2445; --note-grip: #EEBBD2; }
.note[data-type="3"] { --note-bg: #F0E2FF; --note-color: #3D2266; --note-grip: #DCC8EE; }
.note[data-type="4"] { --note-bg: #DAEDFF; --note-color: #1A3A5C; --note-grip: #BDD6EE; }
.note[data-type="5"] { --note-bg: #D4F5EA; --note-color: #1A4D3A; --note-grip: #B4DDCC; }
.note[data-type="6"] { --note-bg: #E0ECD0; --note-color: #344A1F; --note-grip: #C8D8B4; }
.note[data-type="7"] { --note-bg: #F5F5F5; --note-color: #3A3A3A; --note-grip: #DADADA; }

@media (prefers-color-scheme: dark) {
  .note-surface { filter: brightness(0.85) saturate(0.9); }
  .note-tape-layer { filter: brightness(0.92); }
}

/* ------------------------------------------------------------------
   Library cards—mirrors src/ui/library/index.css (.doc-card, .chip,
   .doc-actions) so the mockup looks like the real thing.
------------------------------------------------------------------ */

.lib-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
@media (max-width: 520px) { .lib-grid { grid-template-columns: 1fr; } }

.lib-card {
  position: relative;
  display: grid;
  grid-template-rows: auto auto 1fr auto auto;
  gap: 12px;
  padding: 20px;
  border-radius: 22px;
  background: var(--card-bg, #f1e2a0);
  color: #2a2620;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 6px 18px rgba(43, 62, 70, 0.10), 0 1px 2px rgba(43, 62, 70, 0.06);
  transform: rotate(var(--tilt, 0deg));
  min-height: 248px;
  transition: transform 0.22s ease;
}
.lib-card:hover {
  transform: rotate(0deg) translateY(-2px);
}
.lib-top {
  display: flex;
  align-items: center;
  gap: 10px;
}
.lib-fav {
  width: 32px; height: 32px;
  border-radius: 8px;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}
.lib-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.lib-site {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  color: #2a2620;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lib-date {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  color: rgba(42, 38, 32, 0.55);
}
.lib-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.25;
  font-weight: 700;
  color: #2a2620;
  letter-spacing: -0.005em;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.lib-excerpt {
  font-family: var(--font-serif);
  font-size: 0.88rem;
  line-height: 1.45;
  color: rgba(42, 38, 32, 0.75);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.lib-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.lib-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  color: #2a2620;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 500;
}
.lib-actions {
  display: flex;
  gap: 6px;
}
.lib-btn {
  flex: 1;
  padding: 8px 10px;
  border-radius: 10px;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.55);
  color: #2a2620;
  cursor: pointer;
}
.lib-btn.primary {
  background: #2a2620;
  color: #fffceb;
  border-color: transparent;
}

/* ------------------------------------------------------------------
   Annotation mockup—full-page clipping with multi-color highlights,
   two sticky notes, a cloud note, and a dictionary popover.
------------------------------------------------------------------ */

.annot {
  position: relative;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.annot-chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
}
.annot-chrome .dot { width: 11px; height: 11px; border-radius: 50%; background: var(--border-strong); }
.annot-chrome .dot:nth-child(1) { background: #ff6058; }
.annot-chrome .dot:nth-child(2) { background: #ffbd2f; }
.annot-chrome .dot:nth-child(3) { background: #27c93f; }
.annot-chrome .url {
  margin-left: 12px;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--fg-muted);
}
.annot-body {
  position: relative;
  padding: 36px 56px 72px;
  min-height: 520px;
  font-family: var(--font-serif);
  color: var(--fg-strong);
}
.annot-body h3 {
  font-family: var(--font-serif);
  font-size: 1.7rem;
  line-height: 1.15;
  margin: 0 0 8px;
  color: var(--fg-strong);
}
.annot-body .meta {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--fg-muted);
  margin-bottom: 26px;
}
.annot-body p {
  font-size: 1.05rem;
  line-height: 1.75;
  margin: 0 0 16px;
  max-width: 60ch;
}
.annot-body .hl-yellow { background: #fff59d; padding: 1px 2px; border-radius: 2px; color: #2a2620; box-decoration-break: clone; }
.annot-body .hl-pink   { background: #f8c8c8; padding: 1px 2px; border-radius: 2px; color: #3a1a1a; box-decoration-break: clone; }
.annot-body .hl-green  { background: #cfe9b7; padding: 1px 2px; border-radius: 2px; color: #1e2a17; box-decoration-break: clone; }
.annot-body .hl-blue   { background: #c5ddf5; padding: 1px 2px; border-radius: 2px; color: #1a2838; box-decoration-break: clone; }

/* Cloud note — uses the extension's actual cloud.png, cropped with
   the exact background-position/size from src/shared/note-core.js. */
.cloud-note {
  position: absolute;
  width: 354px;
  height: 188px;
  background-image: url('assets/note/cloud.png');
  background-repeat: no-repeat;
  background-position: -134px -206px;
  background-size: 600px 600px;
  opacity: 0.9;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.12)) drop-shadow(0 1px 2px rgba(0,0,0,0.06));
  -webkit-user-select: none;
  user-select: none;
}
.cloud-body {
  position: absolute;
  top: 56px;
  left: 58px;
  width: 266px;
  height: 114px;
  overflow: hidden;
  font: 23px/38px 'Inter', Helvetica, Arial, sans-serif;
  transform: scaleX(0.85);
  transform-origin: left top;
  color: #3A3A3A;
  text-align: left;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.cloud-body::before {
  content: '';
  float: right;
  width: 52px;
  height: 38px;
}
@media (prefers-color-scheme: dark) {
  .cloud-note {
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.35)) drop-shadow(0 1px 2px rgba(0,0,0,0.22)) brightness(0.75);
  }
}

/* Dictionary popover */
.dict {
  position: absolute;
  width: 230px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--fg-strong);
}
.dict .word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--fg-strong);
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.dict .pron {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.85rem;
  color: var(--fg-muted);
  font-weight: 400;
}
.dict .pos {
  font-size: 0.72rem;
  color: var(--iris-deep);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 6px;
}
.dict .def {
  margin-top: 4px;
  line-height: 1.45;
  color: var(--fg);
}
.dict::after {
  content: "";
  position: absolute;
  top: -8px;
  left: 28px;
  width: 14px; height: 14px;
  background: var(--surface);
  border-top: 1px solid var(--border-strong);
  border-left: 1px solid var(--border-strong);
  transform: rotate(45deg);
}

/* ------------------------------------------------------------------
   Section
------------------------------------------------------------------ */

section.band {
  padding: 80px 0;
}
section.band.alt {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 48px;
}
.section-head .eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--iris-deep);
  margin-bottom: 10px;
}
.section-head h2 { margin-bottom: 12px; }
.section-head p {
  font-size: 1.1rem;
  color: var(--fg);
  margin: 0;
}

/* ------------------------------------------------------------------
   Feature grid
------------------------------------------------------------------ */

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 860px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }

.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.feature:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}
.feature .ico {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--sun) 22%, transparent), color-mix(in srgb, var(--iris) 22%, transparent));
  color: var(--fg-strong);
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  font-size: 22px;
}
.feature h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 8px;
}
.feature p {
  margin: 0;
  font-size: 0.97rem;
  color: var(--fg);
  line-height: 1.55;
}

/* ------------------------------------------------------------------
   Themes strip—real palette swatches from the extension
------------------------------------------------------------------ */

.themes {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
@media (max-width: 860px) { .themes { grid-template-columns: repeat(2, 1fr); } }

.swatch {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.swatch:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.swatch-preview {
  aspect-ratio: 5 / 3;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 4px;
}
.swatch-preview .bar {
  height: 6px;
  border-radius: 3px;
  background: currentColor;
  opacity: 0.22;
}
.swatch-preview .bar.short { width: 50%; }
.swatch-preview .bar.mid { width: 72%; }
.swatch-preview .bar.link {
  opacity: 0.85;
  height: 7px;
  width: 38%;
}

.swatch-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  font-family: var(--font-ui);
  padding: 10px 14px;
  background: var(--surface);
  color: var(--fg-strong);
  border-top: 1px solid var(--border);
}
.swatch-label .kind {
  font-size: 0.72rem;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ------------------------------------------------------------------
   Split
------------------------------------------------------------------ */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 32px; } }
.split.reverse { direction: rtl; }
.split.reverse > * { direction: ltr; }

.split h2 { margin-bottom: 14px; }
.split ul {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
}
.split li {
  padding: 10px 0 10px 28px;
  position: relative;
  border-top: 1px solid var(--border);
  color: var(--fg);
}
.split li:first-child { border-top: 0; }
.split li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  width: 14px;
  height: 8px;
  border-left: 2px solid var(--iris-deep);
  border-bottom: 2px solid var(--iris-deep);
  transform: rotate(-45deg);
}
.split li strong {
  color: var(--fg-strong);
  font-weight: 600;
}

.card-visual {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-md);
}

/* ------------------------------------------------------------------
   Privacy banner
------------------------------------------------------------------ */

.privacy-banner {
  text-align: center;
  padding: 56px 32px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--iris) 12%, var(--surface)), var(--surface));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
}
.privacy-banner h2 {
  max-width: 22ch;
  margin: 0 auto 14px;
}
.privacy-banner p {
  max-width: 52ch;
  margin: 0 auto 22px;
  color: var(--fg);
  font-size: 1.05rem;
}

/* ------------------------------------------------------------------
   Doc pages (privacy, security, support)
------------------------------------------------------------------ */

.doc {
  max-width: 740px;
  margin: 0 auto;
  padding: 64px 24px 80px;
}
.doc h1 { margin-bottom: 8px; }
.doc .updated {
  font-size: 0.9rem;
  color: var(--fg-muted);
  margin-bottom: 36px;
}
.doc h2 {
  font-size: 1.4rem;
  margin-top: 40px;
  margin-bottom: 12px;
  scroll-margin-top: 80px;
}
.doc h3 {
  font-size: 1.1rem;
  margin-top: 28px;
  margin-bottom: 8px;
}
.doc p, .doc li {
  font-family: var(--font-serif);
  font-size: 1.08rem;
  line-height: 1.7;
  color: var(--fg-strong);
}
.doc ul, .doc ol { padding-left: 22px; }
.doc li { margin-bottom: 8px; }
.doc code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
  background: var(--bg-2);
  padding: 2px 6px;
  border-radius: 5px;
  color: var(--fg-strong);
}
.doc .pill-list {
  list-style: none;
  padding: 0;
}
.doc .pill-list li {
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
}
.doc .pill-list li strong {
  color: var(--fg-strong);
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-ui);
  font-weight: 600;
}
.doc .callout {
  padding: 18px 22px;
  background: color-mix(in srgb, var(--iris) 10%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--iris) 35%, var(--border));
  border-radius: var(--radius);
  margin: 24px 0;
}
.doc .callout p:last-child { margin-bottom: 0; }

/* FAQ */
.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px 22px;
  margin-bottom: 10px;
}
.faq summary {
  padding: 16px 0;
  cursor: pointer;
  font-family: var(--font-ui);
  font-weight: 600;
  color: var(--fg-strong);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--fg-muted);
  transition: transform 0.18s ease;
}
.faq details[open] summary::after {
  content: "–";
}
.faq details > *:not(summary) {
  font-family: var(--font-serif);
  font-size: 1rem;
  padding-bottom: 16px;
  color: var(--fg);
  line-height: 1.65;
}

/* ------------------------------------------------------------------
   Footer
------------------------------------------------------------------ */

.site-footer {
  margin-top: 40px;
  padding: 48px 0 32px;
  border-top: 1px solid var(--border);
  background: var(--bg-2);
}
.site-footer .wrap {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  align-items: start;
}
@media (max-width: 720px) {
  .site-footer .wrap { grid-template-columns: 1fr 1fr; }
}
.site-footer .brand { margin-bottom: 12px; }
.site-footer .tagline {
  color: var(--fg-muted);
  font-size: 0.92rem;
  max-width: 30ch;
}
.site-footer h4 {
  font-family: var(--font-display);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg-muted);
  margin: 0 0 14px;
}
.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.site-footer li { margin-bottom: 8px; }
.site-footer a {
  color: var(--fg);
  font-size: 0.95rem;
}
.site-footer a:hover { color: var(--fg-strong); }

.colophon {
  max-width: var(--max);
  margin: 36px auto 0;
  padding: 20px 24px 0;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--fg-muted);
}

/* ------------------------------------------------------------------
   404
------------------------------------------------------------------ */

.not-found {
  min-height: 60vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 80px 24px;
}
.not-found .spin {
  font-size: 6rem;
  margin-bottom: 12px;
  animation: slowSpin 30s linear infinite;
}
@keyframes slowSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .not-found .spin { animation: none; }
}

/* ------------------------------------------------------------------
   Accessibility
------------------------------------------------------------------ */

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

.skip-link {
  position: absolute;
  top: -40px;
  left: 12px;
  background: var(--fg-strong);
  color: var(--bg);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  z-index: 100;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 12px; color: var(--bg); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .mockup, .mockup:hover { transform: none; }
}
