/* XSaver: ArticleSave's X sibling, so it shares ArticleSave's X palette: black and white, X blue for focus and progress, green for done. */
:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --subtle: #f7f9f9;
  --ink: #0f1419;
  --ink-2: #536471;
  --line: #eff3f4;
  --line-2: #cfd9de;
  --xb: #1d9bf0;
  --accent-ink: #1a8cd8;
  --grad: var(--xb);
  --btn: #0f1419;
  --btn-ink: #ffffff;
  --error: #f4212e;
  --ok: #00ba7c;
  --shadow-lg: 0 1px 2px rgba(15, 20, 25, .04), 0 12px 40px -12px rgba(15, 20, 25, .18);
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --surface: #000000;
    --subtle: #16181c;
    --ink: #e7e9ea;
    --ink-2: #71767b;
    --line: #2f3336;
    --line-2: #3e4144;
    --accent-ink: #4cb4f5;
    --btn: #eff3f4;
    --btn-ink: #0f1419;
    --shadow-lg: 0 0 0 1px #2f3336;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
b, strong { font-weight: 700; }
a { color: inherit; }
.page { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--ink-2); font-weight: 500; }

/* Touch vs pointer copy */
.when-coarse { display: none; }
@media (pointer: coarse) { .when-fine { display: none !important; } .when-coarse { display: inline; } }

/* Nav */
.nav {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: max(16px, env(safe-area-inset-top)) 0 16px;
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 19px; letter-spacing: -.02em; }
.mark svg { width: 32px; height: 32px; display: block; }
.mark rect { fill: var(--ink); }
.mark-page { fill: var(--bg); }
.mark-glyph { fill: none; stroke: var(--ink); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-cta, .sibling-pill {
  color: var(--ink); text-decoration: none; font-weight: 700; font-size: 15px;
  padding: 8px 16px; border: 1px solid var(--line-2); border-radius: 999px;
}
.nav-cta:hover, .sibling-pill:hover { background: var(--subtle); }
.sibling-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; color: var(--ink-2); }
.sibling-pill:hover { color: var(--ink); }
/* ArticleSave's own mark, in its own monochrome */
.mini-mark svg, .sibling-mark svg { display: block; }
.mini-mark svg { width: 22px; height: 22px; }
.mini-mark rect, .sibling-mark rect { fill: var(--ink); }
.mini-mark .mark-page, .sibling-mark .mark-page { fill: var(--bg); }
.mark-arrow { fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 479px) { .sibling-label { display: none; } .sibling-pill { padding: 6px; } .nav-cta { padding: 8px 14px; } }

/* Hero */
.hero { display: grid; gap: 48px; align-items: center; padding: 40px 0 64px; }
@media (min-width: 900px) { .hero { grid-template-columns: 1.12fr .88fr; padding: 64px 0 88px; gap: 56px; } }
.hero-copy { min-width: 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 20px;
  padding: 6px 12px 6px 10px; border: 1px solid var(--line); border-radius: 999px;
  color: var(--ink-2); font-size: 13px; font-weight: 600;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 22%, transparent); }
h1 {
  font-size: clamp(40px, 6.2vw, 62px); line-height: 1.03; letter-spacing: -.045em; font-weight: 800;
  margin: 0 0 18px;
}
h1 .soft { color: var(--ink-2); }
@media (min-width: 600px) { .nw { white-space: nowrap; } }
.lede { color: var(--ink-2); font-size: clamp(17px, 2.2vw, 19px); line-height: 1.5; margin: 0 0 28px; max-width: 32em; }


.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 56px; padding: 0 28px; border-radius: 999px;
  font: inherit; font-size: 17px; font-weight: 700; letter-spacing: -.01em;
  text-decoration: none; cursor: pointer; border: 1px solid transparent; white-space: nowrap;
  transition: transform .08s, opacity .15s, background .15s;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .4; pointer-events: none; }
.btn-sm { height: 44px; padding: 0 20px; font-size: 15px; }
.btn-xs { height: 36px; padding: 0 14px; font-size: 14px; }
.btn-primary { background: var(--btn); color: var(--btn-ink); }
.btn-primary:hover { opacity: .88; }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-outline:hover { background: var(--subtle); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { color: var(--ink); background: var(--subtle); }
.spinner {
  display: none; width: 18px; height: 18px; border-radius: 50%;
  border: 2.2px solid color-mix(in srgb, var(--btn-ink) 30%, transparent); border-top-color: var(--btn-ink);
  animation: spin .7s linear infinite;
}
.btn.busy { pointer-events: none; }
.btn.busy .btn-label { opacity: .7; }
.btn.busy .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.status { min-height: 1.5em; margin: 12px 4px 0; color: var(--ink-2); font-size: 15px; font-weight: 500; }
.status.error { color: var(--error); }

/* URL form: one pill with the input and the ink button inside */
.url-form {
  position: relative; display: flex; align-items: center; gap: 6px; max-width: 580px;
  padding: 6px; border-radius: 999px; background: var(--subtle); border: 1.5px solid var(--line-2);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.url-form:focus-within {
  border-color: transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--grad) border-box;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--xb) 16%, transparent);
}
.url-icon { display: grid; place-items: center; flex: none; width: 36px; height: 36px; margin-left: 6px; }
.url-icon svg { width: 20px; height: 20px; fill: none; stroke: var(--ink-2); stroke-width: 2; stroke-linecap: round; }
.url-form input {
  flex: 1; min-width: 0; height: 48px; border: 0; outline: 0; background: transparent; color: var(--ink);
  font: inherit; font-size: 17px; font-weight: 500;
}
.url-form input::placeholder { color: var(--ink-2); font-weight: 500; }
.url-form .btn-primary { height: 52px; padding: 0 26px; }
.paste-btn { flex: none; }
@media (max-width: 479px) {
  .url-form { flex-wrap: wrap; border-radius: 24px; padding: 6px 6px 8px; }
  .url-form input { flex: 1 1 0; }
  .url-form .btn-primary { flex: 1 0 100%; }
}

/* Hero visual: a post with a video and the Photos grid it lands in, fanned like the siblings' two pages */
.hero-visual { position: relative; display: flex; justify-content: center; align-items: flex-start; padding: 8px 0 36px; min-height: 400px; max-width: 100%; }
.sheet { margin: 0; position: relative; width: min(47%, 250px); min-width: 0; }
.sheet-body {
  position: relative; display: flex; flex-direction: column; gap: 8px; overflow: hidden;
  aspect-ratio: 210 / 297; padding: 16px 14px 16px; border-radius: 16px;
  background: #fff; border: 1px solid #e4e7eb; color: #1f252c;
  box-shadow: 0 2px 4px rgba(15,20,25,.06), 0 30px 60px -24px rgba(15,20,25,.4);
}
@media (prefers-color-scheme: dark) { .sheet-body { border-color: #2a2e34; } }
.bar { display: block; height: 6px; border-radius: 3px; background: #e6e9ed; }
.bar.short { width: 60%; }
.post-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.avatar { flex: none; width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(135deg, var(--xb), var(--ok)); }
.post-who { flex: 1; display: grid; gap: 5px; }
.bar-name { height: 7px; width: 70%; background: #1f252c; }
.x-glyph { font: 800 15px/1 Inter, sans-serif; color: #0f1419; }
.thumb {
  position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3.4; border-radius: 12px; margin-top: 4px;
  background: radial-gradient(120% 90% at 20% 15%, #3a6f96, transparent 60%), linear-gradient(160deg, #24313d, #0f1419 70%), #0f1419;
}
.play { width: 38px; height: 38px; border-radius: 50%; background: var(--xb); position: relative; box-shadow: 0 0 0 5px rgba(255,255,255,.18); }
.play::after { content: ""; position: absolute; left: 15px; top: 11.5px; border-left: 12px solid #fff; border-top: 7.5px solid transparent; border-bottom: 7.5px solid transparent; }
.dur { position: absolute; left: 6px; bottom: 6px; padding: 1px 5px; border-radius: 4px; background: rgba(0,0,0,.72); color: #fff; font: 700 8.5px/1.4 Inter, sans-serif; }
.post-acts { display: flex; justify-content: space-between; padding: 2px 4px 0; }
.post-acts i { width: 14px; height: 6px; border-radius: 3px; background: #dfe3e8; }
.url-chip {
  margin-top: auto; padding: 7px 10px; border-radius: 999px; background: #f3f4f6; border: 1px solid #e4e7eb;
  font: 600 clamp(8.5px, 1vw, 10.5px)/1.3 var(--mono); color: #566170; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sheet-photos .sheet-body { padding: 16px 10px 14px; background: #fbfbfc; }
.photos-head { font: 800 clamp(13px, 1.5vw, 17px)/1 Inter, sans-serif; color: #0f1419; padding: 2px 4px 6px; letter-spacing: -.02em; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; }
.grid i { position: relative; aspect-ratio: 1; border-radius: 3px; background: #dfe4ea; }
.grid .g1 { background: linear-gradient(135deg, #f6c38b, #e98a5e); }
.grid .g2 { background: linear-gradient(135deg, #a8d8c9, #5fae9a); }
.grid .g3 { background: linear-gradient(135deg, #c9d3e6, #8a9cc4); }
.grid .g4 { background: linear-gradient(135deg, #e5d3f0, #b292d1); }
.grid .g5 { background: linear-gradient(135deg, #f3e3a2, #d9b44c); }
.grid .g6 { background: linear-gradient(135deg, #bfe2f6, #6bb4e0); }
.grid .g7 { background: linear-gradient(135deg, #d4dccf, #93a68a); }
.grid .g8 { background: linear-gradient(135deg, #f2c7cf, #d9879a); }
.grid .new { background: radial-gradient(120% 90% at 20% 15%, #3a6f96, transparent 60%), linear-gradient(160deg, #24313d, #0f1419 70%); outline: 2.5px solid var(--ok); outline-offset: 1px; }
.grid .new .dur { left: auto; right: 3px; bottom: 3px; font-size: 7.5px; }
.saved-toast {
  margin-top: auto; align-self: center; display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px 8px 9px; border-radius: 12px; background: rgba(28,30,34,.9); color: #fff;
  font: 700 clamp(9.5px, 1.1vw, 12px)/1 Inter, sans-serif;
}
.saved-toast svg { width: 15px; height: 15px; fill: none; stroke: var(--ok); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.sheet-post { transform: rotate(-5deg) translate(14px, 18px); z-index: 1; }
.sheet-photos { transform: rotate(4deg) translate(-14px, -4px); z-index: 2; }
.sheet figcaption { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 16px; font-size: 14px; font-weight: 700; }
.step-dot { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--btn); color: var(--btn-ink); font-size: 12px; font-weight: 800; }
.float-chip {
  position: absolute; z-index: 3; right: 2%; bottom: 30%;
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px 9px 10px; border-radius: 999px;
  background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 700;
  border: 1px solid var(--line); box-shadow: var(--shadow-lg);
}
.float-chip svg { width: 18px; height: 18px; fill: none; stroke: var(--ok); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
@media (prefers-reduced-motion: no-preference) {
  .sheet-photos { animation: float 6s ease-in-out infinite; }
  .float-chip { animation: float 6s ease-in-out -3s infinite; }
  @keyframes float { 50% { translate: 0 -8px; } }
}
@media (max-width: 899px) { .hero-visual { margin-top: 8px; min-height: 0; } }

/* Result: the post's author line, then one card per video */
section.result { padding: 32px 0 56px; scroll-margin-top: 70px; }
.post-meta { display: flex; align-items: flex-start; gap: 12px; max-width: 720px; margin-bottom: 18px; }
.post-meta .avatar { width: 40px; height: 40px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 17px; }
.post-meta .who { font-weight: 800; font-size: 16px; letter-spacing: -.01em; }
.post-meta .who span { color: var(--ink-2); font-weight: 500; margin-left: 4px; }
.post-meta .who a { color: inherit; text-decoration: none; }
.post-meta .who a:hover { text-decoration: underline; }
.post-meta p { color: var(--ink-2); font-size: 15px; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.videos { display: grid; gap: 20px; }
@media (min-width: 900px) { .videos.many { grid-template-columns: 1fr 1fr; } }
.vcard {
  display: grid; gap: 0; border-radius: 22px; overflow: hidden; border: 1px solid var(--line); background: var(--surface);
  box-shadow: var(--shadow-lg);
}
@media (min-width: 760px) { .videos:not(.many) .vcard { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); } }
.vwrap { position: relative; display: grid; place-items: center; background: #000; min-height: 200px; }
.vwrap video { display: block; width: 100%; height: 100%; max-height: min(70vh, 640px); object-fit: contain; background: #000; }
.vbadge {
  position: absolute; top: 12px; left: 12px; padding: 3px 9px; border-radius: 7px; pointer-events: none;
  background: rgba(0,0,0,.66); color: #fff; font: 800 11px/1.5 Inter, sans-serif; letter-spacing: .05em;
}
.vbody { display: flex; flex-direction: column; gap: 16px; padding: 22px; min-width: 0; }
.vtitle { font-size: 20px; letter-spacing: -.02em; margin: 0; }
.vfacts { display: flex; flex-wrap: wrap; gap: 6px; }
.fact { padding: 4px 10px; border-radius: 999px; background: var(--subtle); border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--ink-2); }
.fact.best { color: var(--accent-ink); border-color: color-mix(in srgb, var(--xb) 35%, transparent); background: color-mix(in srgb, var(--xb) 9%, transparent); }
.qlabel { display: grid; gap: 6px; font-size: 13px; font-weight: 700; color: var(--ink-2); text-transform: uppercase; letter-spacing: .05em; }
.qsel {
  height: 46px; padding: 0 40px 0 14px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  font: inherit; font-size: 16px; font-weight: 600; text-transform: none; letter-spacing: 0; -webkit-appearance: none; appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat;
}
.qsel:focus { outline: 0; border-color: var(--xb); box-shadow: 0 0 0 3px color-mix(in srgb, var(--xb) 18%, transparent); }
.save-btn { width: 100%; }
.save-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.save-btn.done { background: var(--ok); color: #fff; }
.save-btn.again { background: var(--grad); color: #fff; }
.prog { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; margin-top: -6px; }
.prog span { display: block; height: 100%; width: 0; background: var(--grad); transition: width .2s; }
.prog.indet span { width: 35%; animation: indet 1.1s ease-in-out infinite; }
@keyframes indet { from { transform: translateX(-100%); } to { transform: translateX(300%); } }
.vnote { color: var(--ink-2); font-size: 14px; min-height: 1.4em; margin-top: -4px; }
.vnote.error { color: var(--error); }
.vlinks { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: auto; font-size: 14px; }
.vlinks a, .vlinks button { color: var(--ink-2); font: inherit; font-weight: 600; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); }
.vlinks a:hover, .vlinks button:hover { color: var(--ink); }
.again-row { margin-top: 18px; }

.sibling-copy a { color: var(--ink); font-weight: 600; }


/* Sections */
section.result, section.steps, section.features, section.sibling, section.faq { padding: 64px 0; border-top: 1px solid var(--line); }
h2 { font-size: clamp(26px, 4vw, 34px); letter-spacing: -.035em; line-height: 1.15; font-weight: 800; margin: 0 0 28px; }
h3 { font-size: 17px; letter-spacing: -.01em; margin: 0 0 6px; font-weight: 700; }
p { margin: 0; }

.step-grid { display: grid; gap: 14px; }
@media (min-width: 760px) { .step-grid { grid-template-columns: repeat(3, 1fr); } }
.step { padding: 22px; border-radius: 20px; background: var(--subtle); }
.step p { color: var(--ink-2); font-size: 15px; }
.step b { color: var(--ink); }
.num {
  display: grid; place-items: center; width: 32px; height: 32px; margin-bottom: 16px; border-radius: 50%;
  background: var(--btn); color: var(--btn-ink); font-weight: 800; font-size: 15px;
}

.features { display: grid; gap: 28px 32px; }
@media (min-width: 640px) { .features { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .features { grid-template-columns: repeat(4, 1fr); } }
.feature p { color: var(--ink-2); font-size: 15px; }
.feature b { color: var(--ink); }
.ficon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 14px; border-radius: 12px; border: 1px solid var(--line); }
.ficon svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.sibling-card {
  display: grid; gap: 20px; align-items: center; padding: 28px; border-radius: 24px;
  background: var(--subtle); border: 1px solid var(--line);
}
@media (min-width: 760px) { .sibling-card { grid-template-columns: auto 1fr auto; gap: 28px; padding: 32px; } }
.sibling-mark svg { width: 56px; height: 56px; }
.sibling-kicker { color: var(--ink-2); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.sibling-copy h2 { font-size: clamp(22px, 3vw, 26px); margin: 0 0 8px; }
.sibling-copy p:last-child { color: var(--ink-2); max-width: 36em; }
.sibling-btn { height: 48px; font-size: 16px; justify-self: start; }

.faq { max-width: 760px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; justify-content: space-between; gap: 16px; align-items: center;
  padding: 18px 0; cursor: pointer; list-style: none; font-weight: 700; font-size: 17px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 10px; height: 10px; margin-right: 4px;
  border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: rotate(45deg) translateY(-3px);
  transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
.faq details p { padding: 0 0 18px; color: var(--ink-2); font-size: 16px; max-width: 40em; }
.faq details b { color: var(--ink); }

.foot {
  display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between;
  padding: 28px 0 max(36px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line);
  color: var(--ink-2); font-size: 13px;
}
.foot a { color: var(--ink); font-weight: 600; }
.brand.small { font-size: 15px; gap: 8px; }
.brand.small .mark svg { width: 24px; height: 24px; }

/* Once a video is showing, drop the illustration so the result sits right under the box */
.has-result .hero-visual { display: none; }
.has-result .hero { grid-template-columns: 1fr; padding-bottom: 24px; }
.has-result section.result { border-top: 0; padding-top: 8px; }
