/* ribbonwriter.samson.zone: Ribbonwriter's own look, separate from samson.zone
   and gLook. Writing paper and ink, light by default with a dark mode. One
   blue accent and the yellow bar from the icon, used as the underline under
   key words. Serif headings, system text fonts, no web fonts. Light or dark
   follows the device until the header switch picks one. The ribbon in
   the hero copies the extension's own sizes and colors (content.css), so it
   stays light in both modes, the way Gmail's compose window is. */

:root {
  --paper: #f6f4ef;
  --paper-2: #eeeae1;
  --sheet: #ffffff;
  --ink: #1d2025;
  --ink-2: #454b54;
  --muted: #5d636c;
  --line: #e2ddd2;
  --line-2: #cfc8b9;
  --blue: #0f6cbd;
  --blue-text: #0f62ab;
  --blue-hover: #0c5aa0;
  --blue-soft: #e5eef8;
  --marker: #ffc83d;
  --kbd: #ffffff;
  --header: rgba(246, 244, 239, .86);
  --shadow: 0 1px 2px rgba(40, 32, 16, .05), 0 8px 24px -12px rgba(40, 32, 16, .18);

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", Aptos, Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", Charter, "Bitstream Charter", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  /* The extension's default font, Aptos, with its fallback stack. */
  --compose: Aptos, Calibri, Carlito, Arial, Helvetica, sans-serif;

  --wrap: 1080px;
  --gutter: clamp(16px, 4vw, 32px);
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light dark;
}

/* Dark tokens: the device's setting, unless the header switch picked a
   mode (data-theme on <html>, set by ribbonwriter.js). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #15171b;
    --paper-2: #1b1e23;
    --sheet: #20242a;
    --ink: #eceef1;
    --ink-2: #c4c9d0;
    --muted: #9ca3ad;
    --line: #2b3037;
    --line-2: #3b414a;
    --blue-text: #6cb3f3;
    --blue-hover: #1677cc;
    --blue-soft: rgba(108, 179, 243, .12);
    --kbd: #2a2f36;
    --header: rgba(21, 23, 27, .84);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px -14px rgba(0, 0, 0, .7);
  }
}
:root[data-theme="dark"] {
  --paper: #15171b;
  --paper-2: #1b1e23;
  --sheet: #20242a;
  --ink: #eceef1;
  --ink-2: #c4c9d0;
  --muted: #9ca3ad;
  --line: #2b3037;
  --line-2: #3b414a;
  --blue-text: #6cb3f3;
  --blue-hover: #1677cc;
  --blue-soft: rgba(108, 179, 243, .12);
  --kbd: #2a2f36;
  --header: rgba(21, 23, 27, .84);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px -14px rgba(0, 0, 0, .7);
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; overflow-x: clip; }
body {
  margin: 0; background: var(--paper); color: var(--ink-2);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; color: var(--ink); font-family: var(--serif); font-weight: 700; letter-spacing: -.01em; text-wrap: balance; }
p { margin: 0; }
ul, ol, dl, dd { margin: 0; padding: 0; list-style: none; }
a { color: var(--blue-text); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
strong { color: var(--ink); font-weight: 600; }
::selection { background: var(--marker); color: #1d2025; }
:focus-visible { outline: 2px solid var(--blue-text); outline-offset: 3px; border-radius: 6px; }
svg path, svg rect, svg circle { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* The icon's yellow bar, under the words that matter. */
h1 em, h2 em {
  font-style: normal;
  text-decoration: underline var(--marker);
  text-decoration-thickness: .13em;
  text-underline-offset: .14em;
  text-decoration-skip-ink: none;
}

.rw-wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); }
.rw-skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 8px; text-decoration: none;
}
.rw-skip:focus { top: 12px; }

/* Header */
.rw-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header); border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
}
.rw-nav {
  display: flex; align-items: center; gap: 8px 28px;
  max-width: var(--wrap); min-height: 60px; margin: 0 auto; padding: 10px var(--gutter);
}
.rw-brand {
  display: flex; align-items: center; gap: 10px; margin-right: auto;
  color: var(--ink); font: 700 19px/1 var(--serif); text-decoration: none;
}
.rw-brand img { width: 28px; height: 28px; }
.rw-nav ul { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 24px; }
.rw-nav ul a { color: var(--ink-2); font-size: 15px; text-decoration: none; }
.rw-nav ul a:hover { color: var(--ink); }
.rw-nav ul a[aria-current] {
  color: var(--ink);
  text-decoration: underline var(--marker); text-decoration-thickness: 3px; text-underline-offset: 6px;
}

.rw-theme-item:has(> [hidden]) { display: none; }
.rw-theme {
  display: grid; place-items: center; width: 36px; height: 36px; padding: 0;
  border: 1px solid var(--line-2); border-radius: 10px; background: transparent; color: var(--ink-2);
  cursor: pointer; transition: background-color .2s, color .2s;
}
.rw-theme:hover { background: var(--sheet); color: var(--ink); }
.rw-theme[aria-pressed="true"] .rw-moon, .rw-theme[aria-pressed="false"] .rw-sun { display: none; }

/* Buttons */
.rw-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 46px; padding: 0 20px; border: 1px solid transparent; border-radius: 10px;
  background: var(--blue); color: #fff; font: 600 16px/1 var(--sans); text-decoration: none;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .18) inset, 0 6px 18px -8px rgba(15, 108, 189, .7);
  transition: background-color .2s, transform .2s var(--ease);
}
.rw-btn:hover { background: var(--blue-hover); transform: translateY(-1px); }
.rw-btn svg { flex: none; }
.rw-btn-sm { min-height: 36px; padding: 0 14px; font-size: 14.5px; }
.rw-btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); box-shadow: none; }
.rw-btn-ghost:hover { background: var(--sheet); }
/* Shown in place of the Add to Chrome button until RW_STORE is set. */
.rw-soon {
  display: inline-flex; align-items: center; gap: 9px;
  min-height: 46px; padding: 0 18px; border: 1px dashed var(--line-2); border-radius: 10px;
  color: var(--ink-2); font-size: 15px; font-weight: 500;
}

/* Hero */
.rw-hero { padding: 64px 0 0; text-align: center; }
.rw-kicker {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); font-weight: 600; font-size: 15.5px;
}
.rw-kicker img { width: 40px; height: 40px; }
.rw-ver {
  padding: 2px 8px; border: 1px solid var(--line-2); border-radius: 999px;
  color: var(--muted); font: 500 12.5px/1.5 var(--mono);
}
.rw-hero h1 { margin: 26px auto 0; max-width: 12ch; font-size: clamp(42px, 7.4vw, 80px); line-height: 1.02; letter-spacing: -.025em; }
.rw-lead { max-width: 600px; margin: 22px auto 0; font-size: clamp(18px, 2.1vw, 20px); line-height: 1.55; }
.rw-ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 32px; }
.rw-meta { margin-top: 18px; color: var(--muted); font-size: 14px; }

/* The compose window. A ruled blue sheet behind a white window. */
.rw-compose { max-width: 980px; margin: 56px auto 0; padding: 0 var(--gutter); }
.rw-stage { position: relative; isolation: isolate; padding-bottom: 32px; }
.rw-stage::before {
  content: ""; position: absolute; inset: 44px 0 0; z-index: -1; border-radius: 22px;
  background:
    repeating-linear-gradient(180deg, transparent 0 31px, rgba(255, 255, 255, .09) 31px 32px),
    linear-gradient(160deg, #1477cf, #0f6cbd 45%, #0b4f8c);
}
.rw-window {
  container-type: inline-size;
  position: relative; max-width: 880px; margin: 0 auto;
  background: #fff; color: #1f1f1f; text-align: left;
  border-radius: 12px; border: 1px solid rgba(0, 0, 0, .08);
  box-shadow: 0 2px 4px rgba(0, 0, 0, .06), 0 28px 60px -22px rgba(8, 40, 80, .55);
  font: 400 14px/1.4 var(--sans);
}
.rw-titlebar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-radius: 12px 12px 0 0; background: #f2f4f7;
  font-weight: 600; font-size: 14px;
}
.rw-winbtns { display: flex; gap: 14px; }
.rw-winbtns i { position: relative; display: block; width: 11px; height: 11px; color: #5f6368; }
.rw-winbtns i:nth-child(1)::before { content: ""; position: absolute; left: 0; right: 0; bottom: 1px; height: 1.6px; background: currentColor; }
.rw-winbtns i:nth-child(2) { border: 1.6px solid currentColor; border-radius: 1px; }
.rw-winbtns i:nth-child(3)::before, .rw-winbtns i:nth-child(3)::after {
  content: ""; position: absolute; left: -1px; right: -1px; top: 4.7px; height: 1.6px; background: currentColor; transform: rotate(45deg);
}
.rw-winbtns i:nth-child(3)::after { transform: rotate(-45deg); }
.rw-field { margin: 0 14px; padding: 9px 0; border-bottom: 1px solid #eceff1; color: #1f1f1f; }
.rw-field span { margin-right: 10px; color: #5f6368; }

/* The ribbon, at the extension's own sizes (content.css). */
.rw-ribbon {
  display: flex; align-items: center; gap: 1px; overflow: hidden;
  margin: 12px 12px 0; padding: 4px 6px;
  background: #fff; border: 1px solid #e0e0e0; border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
  color: #242424; font: 400 13px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  -webkit-user-select: none; user-select: none;
}
.rw-ribbon:hover { overflow: visible; }
.rw-group { display: flex; flex: none; align-items: center; gap: 1px; }
.rw-sep { flex: none; width: 1px; height: 20px; margin: 0 3px; background: #e0e0e0; }
.rw-ctl {
  position: relative; display: inline-flex; flex: none; align-items: center; justify-content: center;
  min-width: 26px; height: 28px; padding: 0 3px; border-radius: 4px;
}
.rw-ctl > svg { flex: none; width: 20px; height: 20px; }
.rw-ctl svg path, .rw-ctl svg rect, .rw-ctl svg circle { stroke-width: 1.5; }
.rw-ctl .rw-dot { fill: currentColor; stroke: none; }
.rw-ctl .rw-swatch { fill: #c00000; stroke: none; }
.rw-ctl .rw-swatch-hl { fill: #ffff00; stroke: #d6d600; stroke-width: .6; }
.rw-ctl > .rw-chev, .rw-chev { flex: none; width: 12px; height: 12px; color: #616161; }
.rw-chev path { stroke-width: 1.5; }
.rw-menu { gap: 0; padding-right: 1px; }
.rw-split { gap: 0; padding-right: 0; }
.rw-arrow { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 14px; height: 28px; }
.rw-combo {
  justify-content: space-between; gap: 6px; height: 26px; margin: 0 2px; padding: 0 3px 0 8px;
  border: 1px solid #d1d1d1; background: #fff;
}
.rw-combo:not(.rw-size) { min-width: 96px; }
.rw-size { min-width: 46px; }
.rw-glyph { width: 28px; font-size: 15px; }
.rw-glyph-b { font-weight: 700; }
.rw-glyph-i { font: italic 400 16px Georgia, "Times New Roman", serif; }
.rw-glyph-u { text-decoration: underline; text-underline-offset: 2px; }
.rw-end { margin-left: auto; }
@media (hover: hover) {
  .rw-ctl:hover { background: #f0f0f0; }
  .rw-ctl[data-tip]:hover::after {
    content: attr(data-tip); position: absolute; top: calc(100% + 6px); left: 50%; z-index: 5;
    transform: translateX(-50%); padding: 5px 8px; border-radius: 5px;
    background: #242424; color: #fff; font-size: 12px; font-weight: 400; white-space: nowrap; pointer-events: none;
  }
  .rw-end:hover::after { left: auto; right: 0; transform: none; }
}
/* Like the extension, controls fold behind the three dots from the end of
   the ribbon as the window narrows. */
@container (max-width: 830px) { .rw-group[data-fold="1"] { display: none; } }
@container (max-width: 770px) { .rw-group[data-fold="2"] { display: none; } }
@container (max-width: 680px) { .rw-group[data-fold="3"] { display: none; } }
@container (max-width: 575px) { .rw-group[data-fold="4"] { display: none; } }
@container (max-width: 490px) { .rw-group[data-fold="5"] { display: none; } }
@container (max-width: 400px) { .rw-group[data-fold="6"] { display: none; } }
@container (max-width: 400px) {
  .rw-ribbon { margin-inline: 8px; }
  .rw-combo:not(.rw-size) { min-width: 78px; }
}
@container (max-width: 334px) { .rw-group[data-fold="7"] { display: none; } }

.rw-body {
  min-height: 200px; padding: 20px 24px 28px;
  color: #222; font: 400 16px/1.45 var(--compose);
}
.rw-body p { margin: 0; }
.rw-body ul { margin: 0; padding-left: 28px; list-style: disc; }
.rw-body mark { background: #ffff00; color: inherit; }
.rw-caret {
  display: inline-block; width: 1.5px; height: 1.15em; margin-left: 1px; vertical-align: text-bottom;
  background: #1f1f1f; animation: rw-blink 1.1s steps(1) infinite;
}
@keyframes rw-blink { 50% { opacity: 0; } }
.rw-compose figcaption { max-width: 560px; margin: 22px auto 0; color: var(--muted); font-size: 14.5px; text-align: center; }

/* Sections */
.rw-section { padding: 96px 0; }
.rw-alt { background: var(--paper-2); border-block: 1px solid var(--line); }
.rw-eyebrow { color: var(--blue-text); font: 600 12.5px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.rw-section h2 { margin-top: 12px; font-size: clamp(32px, 4.6vw, 48px); line-height: 1.08; }
.rw-intro { max-width: 640px; margin-top: 18px; font-size: 18px; }
.rw-two { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px 64px; align-items: start; }

.rw-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 44px; }
.rw-cards li { padding: 26px; background: var(--sheet); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.rw-card-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--blue-soft); color: var(--blue-text); }
.rw-card-icon .rw-dot { fill: currentColor; stroke: none; }
.rw-card-icon .rw-swatch { fill: var(--marker); stroke: none; }
.rw-cards h3 { margin-top: 20px; font-size: 22px; }
.rw-cards p { margin-top: 10px; font-size: 16px; }


/* Shortcuts */
.rw-keys { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.rw-keys div {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  padding: 12px 14px; background: var(--sheet); border: 1px solid var(--line); border-radius: 12px;
}
.rw-keys dt { font-size: 15px; }
.rw-keys dd { display: flex; align-items: center; gap: 4px; }
kbd {
  display: inline-grid; place-items: center; min-width: 28px; height: 28px; padding: 0 7px;
  background: var(--kbd); color: var(--ink); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 6px;
  font: 500 13px/1 var(--mono);
}
.rw-or { padding: 0 2px; color: var(--muted); font-size: 13px; }

/* Options */
.rw-settings div { padding: 18px 0; border-top: 1px solid var(--line-2); }
.rw-settings div:last-child { border-bottom: 1px solid var(--line-2); }
.rw-settings dt { color: var(--ink); font: 700 19px/1.3 var(--serif); }
.rw-settings dd { margin-top: 6px; font-size: 16px; }

/* Privacy */
.rw-checks { display: grid; gap: 12px; }
.rw-checks li {
  position: relative; padding: 14px 16px 14px 50px;
  background: var(--sheet); border: 1px solid var(--line); border-radius: 12px; color: var(--ink);
}
.rw-checks li::before { content: ""; position: absolute; left: 16px; top: 16px; width: 22px; height: 22px; border-radius: 50%; background: var(--blue-soft); }
.rw-checks li::after {
  content: ""; position: absolute; left: 24px; top: 20px; width: 6px; height: 11px;
  border: solid var(--blue-text); border-width: 0 2px 2px 0; transform: rotate(45deg);
}

/* Get it */
.rw-get { padding: 104px 0 72px; text-align: center; }
.rw-get img { width: 72px; height: 72px; margin: 0 auto; }
.rw-get h2 { margin-top: 22px; font-size: clamp(32px, 4.6vw, 46px); }
.rw-get p { margin: 12px 0 28px; }

/* Policy pages */
.rw-doc { display: grid; grid-template-columns: 210px minmax(0, 720px); gap: 72px; padding-top: 56px; padding-bottom: 40px; }
.rw-toc nav { position: sticky; top: 92px; }
.rw-toc p { color: var(--muted); font: 600 12px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.rw-toc ol { margin-top: 14px; border-left: 1px solid var(--line-2); }
.rw-toc a { display: block; margin-left: -1px; padding: 5px 0 5px 14px; border-left: 2px solid transparent; color: var(--ink-2); font-size: 14.5px; text-decoration: none; }
.rw-toc a:hover { color: var(--ink); border-left-color: var(--marker); }
.rw-toc a[aria-current] { color: var(--ink); border-left-color: var(--marker); font-weight: 600; }
.rw-doc-head h1 { margin-top: 10px; font-size: clamp(38px, 5.4vw, 56px); line-height: 1.05; }
.rw-dated { margin-top: 14px; color: var(--muted); font: 500 13.5px/1.4 var(--mono); }
.rw-short { margin-top: 36px; padding: 22px 26px; background: var(--blue-soft); border-radius: 14px; }
.rw-short h2 { font-size: 20px; }
.rw-short ul { display: grid; gap: 8px; margin-top: 12px; }
.rw-short li { position: relative; padding-left: 26px; color: var(--ink); }
.rw-short li::before { content: ""; position: absolute; left: 0; top: .72em; width: 14px; height: 3px; border-radius: 2px; background: var(--marker); }
.rw-article section { margin-top: 44px; }
.rw-article section h2 { font-size: 25px; }
.rw-article section p { margin-top: 12px; line-height: 1.7; }
.rw-article section ul { margin-top: 12px; padding-left: 22px; list-style: disc; }
.rw-article section li { margin-top: 8px; padding-left: 4px; }
.rw-article section li::marker { color: var(--blue-text); }
#warranty p, #liability p:first-of-type { font-size: 15px; letter-spacing: .01em; }

/* Footer */
.rw-footer { max-width: var(--wrap); margin: 0 auto; padding: 30px var(--gutter) 44px; border-top: 1px solid var(--line); font-size: 14.5px; }
.rw-footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; }
.rw-made { display: flex; align-items: center; gap: 10px; color: var(--ink-2); }
.rw-made img { width: 20px; height: 20px; }
.rw-footer a { color: var(--ink); text-decoration: none; }
.rw-footer a:hover { color: var(--blue-text); }
.rw-footer ul { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.rw-fine { margin-top: 18px; color: var(--muted); font-size: 13px; }

@media (max-width: 900px) {
  .rw-doc { grid-template-columns: minmax(0, 1fr); padding-top: 40px; }
  .rw-toc { display: none; }
  .rw-two { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 680px) {
  .rw-nav { flex-wrap: wrap; column-gap: 12px; }
  .rw-nav ul { order: 3; width: 100%; gap: 4px 20px; }
  .rw-theme-item { margin-left: auto; }
  .rw-hero { padding-top: 44px; }
  .rw-ctas > * { width: 100%; }
  .rw-compose { margin-top: 40px; }
  .rw-compose { padding: 0; }
  .rw-stage { padding: 0 var(--gutter) 24px; }
  .rw-stage::before { inset: 32px 0 0; border-radius: 0; }
  .rw-body { padding: 16px 18px 22px; min-height: 0; }
  .rw-section { padding: 72px 0; }
  .rw-cards, .rw-keys { grid-template-columns: minmax(0, 1fr); }
  .rw-short { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rw-caret { animation: none; }
  .rw-btn { transition: none; }
  .rw-btn:hover { transform: none; }
}
