/* ============================================================
   HUSH — case study
   ------------------------------------------------------------
   1  Hush UI (scoped copy of the extension's own base.css and
      popup.css, light theme)
   2  Simulated browser + article
   3  Hero
   4  Interactive demonstration
   5  Three steps graphic
   6  Interface shots, Safari limits, closing mark
   7  Responsive + reduced motion
   ============================================================ */

/* ------------------------------------------------------------
   1. HUSH UI — from hush/src/ui/base.css + popup.css
   ------------------------------------------------------------ */
.hush-ui {
  --bg: #ffffff;
  --bg-2: #f5f5f7;
  --bg-3: #ebebef;
  --fg: #000000;
  --fg-2: #6e6e73;
  --fg-3: #a1a1a6;
  --line: rgba(0, 0, 0, 0.08);
  --line-2: rgba(0, 0, 0, 0.14);
  --accent: #fa5000;
  --switch-on: #000000;
  --knob: #ffffff;
  --radius: 10px;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 13px;
  line-height: 1.4;
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "tnum" 1;
}
.hush-ui * { box-sizing: border-box; }
.hush-ui .popup {
  width: 312px;
  padding: 14px 16px 12px;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border-radius: 12px;
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.12), 0 18px 50px rgba(0, 0, 0, 0.14), 0 3px 10px rgba(0, 0, 0, 0.06);
}
.hush-ui .top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.hush-ui .brand { display: flex; align-items: center; gap: 7px; font-weight: 600; font-size: 13.5px; letter-spacing: -0.01em; }
.hush-ui .mark { width: 18px; height: 18px; color: var(--fg); }
.hush-ui .icon-btn { width: 26px; height: 26px; border-radius: 6px; color: var(--fg-2); display: grid; place-items: center; }
.hush-ui .icon-btn svg { width: 17px; height: 17px; }
.hush-ui .site {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; background: var(--bg-2); border-radius: var(--radius);
}
.hush-ui .site-text { min-width: 0; }
.hush-ui .host { font-size: 15px; font-weight: 600; letter-spacing: -0.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hush-ui .status { display: flex; align-items: center; gap: 6px; color: var(--fg-2); font-size: 12px; margin-top: 2px; }
.hush-ui .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); display: inline-block; transition: background-color 200ms ease; }
.hush-ui .dot.off { background: var(--fg-3); }

/* macOS-style switch */
.hush-ui .switch { position: relative; display: inline-block; width: 46px; height: 28px; flex: 0 0 auto; }
.hush-ui .switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.hush-ui .switch .track {
  position: absolute; inset: 0; border-radius: 14px; background: var(--bg-3);
  transition: background 180ms ease; box-shadow: inset 0 0 0 0.5px var(--line-2);
}
.hush-ui .switch .track::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22), 0 0 0 0.5px rgba(0, 0, 0, 0.04);
  transition: transform 200ms cubic-bezier(0.3, 0.7, 0.4, 1);
}
.hush-ui .switch input:checked + .track { background: var(--switch-on); }
.hush-ui .switch input:checked + .track::after { transform: translateX(18px); background: var(--knob); }
.hush-ui .switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }

.hush-ui .page-count { text-align: center; padding: 22px 0 18px; }
.hush-ui .big { font-size: 46px; font-weight: 300; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; transition: color 200ms ease; }
.hush-ui .popup:not(.is-on) .big { color: var(--fg-3); }
.hush-ui .big-label { color: var(--fg-2); font-size: 12px; margin-top: 6px; }
.hush-ui .split { display: flex; justify-content: center; gap: 14px; margin-top: 12px; font-size: 11.5px; color: var(--fg-2); }
.hush-ui .split b { color: var(--fg); font-weight: 600; margin-right: 3px; }
.hush-ui .key { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; }
.hush-ui .key.ads { background: var(--accent); }
.hush-ui .key.trk { background: var(--fg); }
.hush-ui .key.hid { background: var(--fg-3); }

.hush-ui .actions { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.hush-ui .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 34px; width: 100%; padding: 0 12px; border-radius: 7px; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--bg); color: var(--fg);
  font: 500 12.5px "Helvetica Neue", Helvetica, Arial, sans-serif;
  transition: background 120ms ease, border-color 120ms ease, transform 80ms ease;
}
.hush-ui .btn:hover { background: var(--bg-2); }
.hush-ui .btn:active { transform: scale(0.98); }
.hush-ui .btn[aria-pressed='true'] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.hush-ui .btn svg { width: 14px; height: 14px; }
.hush-ui .btn:focus-visible,
.hush-ui .link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hush-ui .link { background: none; border: 0; padding: 0; cursor: pointer; color: var(--fg-2); font: 12px "Helvetica Neue", Helvetica, Arial, sans-serif; }
.hush-ui .link:hover { color: var(--fg); }
.hush-ui .link[hidden] { display: none; }
.hush-ui .foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line);
  font-size: 11px; color: var(--fg-3);
}
.hush-ui .private { display: inline-flex; align-items: center; gap: 4px; }
.hush-ui .private svg { width: 10px; height: 10px; }
@keyframes hush-tick { from { transform: translateY(3px); opacity: 0.4; } }
.hush-ui .bump { animation: hush-tick 220ms ease-out; }

/* ------------------------------------------------------------
   2. SIMULATED BROWSER + ARTICLE (fictional site)
   ------------------------------------------------------------ */
.hb {
  position: relative;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.14), 0 24px 70px rgba(0, 0, 0, 0.1);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.hb__bar {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 46px;
  padding: 0 16px;
  background: #f3f3f4;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}
.hb__lights { display: flex; gap: 8px; }
.hb__lights i { width: 12px; height: 12px; border-radius: 50%; background: #d9d9dc; }
.hb__nav { display: flex; gap: 14px; }
.hb__nav i { width: 8px; height: 8px; border-left: 1.6px solid #9a9a9f; border-bottom: 1.6px solid #9a9a9f; transform: rotate(45deg); }
.hb__nav i + i { transform: rotate(-135deg); opacity: 0.5; }
.hb__url {
  flex: 1;
  max-width: 460px;
  margin: 0 auto;
  height: 28px;
  border-radius: 8px;
  background: #e6e6e9;
  font-size: 12.5px;
  line-height: 28px;
  text-align: center;
  color: #3a3a3c;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 12px;
}
.hb__ext { position: relative; width: 22px; height: 22px; flex: none; }
.hb__ext svg { width: 22px; height: 22px; display: block; }
.hb__ext b {
  position: absolute;
  right: -7px;
  bottom: -5px;
  min-width: 15px;
  height: 15px;
  padding: 0 3px;
  border-radius: 8px;
  background: #fa5000;
  color: #fff;
  font-size: 9.5px;
  line-height: 15px;
  font-weight: 600;
  text-align: center;
}
.hb__ext b[hidden] { display: none; }
.hb__page { position: relative; }

.rr { padding: 22px 34px 30px; color: #1b1b1b; }
.rr__mast {
  padding: 4px 0 14px;
  margin-bottom: 22px;
  border-bottom: 1px solid #e7e7e7;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 22px;
  letter-spacing: -0.01em;
}
.rr__kicker { font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: #8a8a8a; margin-bottom: 8px; }
.rr__title { font-family: Georgia, serif; font-size: 34px; line-height: 1.08; font-weight: 400; letter-spacing: -0.02em; margin-bottom: 10px; }
.rr__dek { font-family: Georgia, serif; font-size: 16px; line-height: 1.45; color: #555; margin-bottom: 18px; }
.rr__img { aspect-ratio: 16 / 7; background: linear-gradient(135deg, #dcd7cf, #c9c2b6); margin-bottom: 18px; }
.rr__p { font-family: Georgia, serif; font-size: 15px; line-height: 1.65; margin-bottom: 14px; color: #262626; }
.rr__cols { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 32px; align-items: start; }
.rr__related p { font-family: Georgia, serif; font-size: 14px; padding: 9px 0; border-top: 1px solid #ececec; }

/* Ads: loud on purpose. Each sits in a slot that can empty and close. */
.ad-slot { display: grid; grid-template-rows: 1fr; margin-bottom: 18px; transition: grid-template-rows 700ms var(--ease), margin 700ms var(--ease); }
.ad-slot__inner { min-height: 0; overflow: hidden; position: relative; }
.ad {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  color: #fff;
  font-size: 13px;
  line-height: 1.35;
  transition: opacity 260ms ease, filter 260ms ease;
}
.ad b { font-size: 18px; letter-spacing: 0.04em; }
.ad em { margin-left: auto; padding: 7px 12px; border-radius: 4px; background: #fff; color: #111; font-style: normal; font-weight: 600; font-size: 12px; white-space: nowrap; }
.ad__tag { position: absolute; top: 4px; right: 6px; font-size: 9px; letter-spacing: 0.06em; opacity: 0.8; }
.ad--leader { height: 86px; background: linear-gradient(90deg, #1d1b4b, #4b1fa8); }
.ad--video { height: 180px; flex-direction: column; justify-content: center; text-align: center; background: #101010; }
.ad__play { width: 0; height: 0; border-left: 22px solid #fff; border-top: 14px solid transparent; border-bottom: 14px solid transparent; margin-bottom: 4px; }
.ad--box { height: 250px; flex-direction: column; justify-content: center; text-align: center; background: linear-gradient(160deg, #00a86b, #007a8a); }
.ad--box em { margin: 8px 0 0; }
.ad--native { display: block; padding: 14px 0 0; color: #1b1b1b; background: none; border-top: 1px solid #e7e7e7; }
.ad--native .ad__tag { position: static; display: block; margin-bottom: 10px; color: #8a8a8a; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; }
.ad__cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.ad__cards span { font-family: Georgia, serif; font-size: 13px; line-height: 1.35; }
.ad__cards i { display: block; aspect-ratio: 4 / 3; margin-bottom: 8px; background: linear-gradient(135deg, #f2c94c, #eb5757); }
.ad__cards span:nth-child(2) i { background: linear-gradient(135deg, #56ccf2, #2f80ed); }
.ad__cards span:nth-child(3) i { background: linear-gradient(135deg, #6fcf97, #27ae60); }
.ad--sticky { height: 52px; background: #f7d046; color: #1a1a1a; }
.ad--sticky em { background: #1a1a1a; color: #fff; }

/* Network log under the page */
.hb__net {
  list-style: none;
  padding: 10px 16px 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.07);
  background: #fafafa;
  font: 11px/1.9 ui-monospace, 'SF Mono', Menlo, monospace;
  color: #6e6e73;
}
.hb__net li { display: flex; justify-content: space-between; gap: 16px; transition: color 300ms ease; }
.hb__net li em { font-style: normal; }
.hb__net li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb__net li.is-blocked { color: #fa5000; }
.hb__net li.is-blocked span { text-decoration: line-through; text-decoration-thickness: 1px; }

/* ------------------------------------------------------------
   3. HERO
   ------------------------------------------------------------ */
.hush-hero { background: var(--uc-plate); }
.hush-hero__stage { position: absolute; inset: 0; overflow: hidden; }
.hb--hero {
  position: absolute;
  left: 9%;
  top: 13%;
  width: 78%;
  min-height: 110%;
}
.hb--hero .rr { padding: 34px 56px; }
.hb--hero .rr__title { font-size: clamp(30px, 3.6vw, 52px); }
.hb--hero .rr__dek { font-size: clamp(14px, 1.3vw, 19px); max-width: 34em; }
.hb--hero .rr__p { font-size: clamp(13px, 1.1vw, 16px); max-width: 38em; }
.hb--hero .rr__img { aspect-ratio: 16 / 4.6; }
.hush-ui--hero {
  position: absolute;
  right: 9%;
  top: 13%;
  margin-top: 54px;
  transform: scale(var(--hush-pop-scale, 1.2));
  transform-origin: top right;
}

/* ------------------------------------------------------------
   4. INTERACTIVE DEMONSTRATION
   ------------------------------------------------------------ */
.hush-demo {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 312px;
  gap: 48px;
  align-items: start;
  padding: 56px;
  background: var(--uc-plate);
}
.hush-ui--demo { position: sticky; top: calc(var(--nav-h) + 32px); }
.hush-demo__hint {
  margin-top: 16px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--uc-fg-2);
  transition: opacity 300ms ease;
}

/* Turning on: ads empty first, then their slots close */
.hush-demo .ad-slot.is-emptied .ad { opacity: 0; }
.hush-demo .ad-slot.is-emptied .ad-slot__inner { background: #f1f1f1; }
.hush-demo .ad-slot.is-closed { grid-template-rows: 0fr; margin-bottom: 0; }
.hush-demo .ad-slot.is-hidden .ad { opacity: 0; }
.hush-demo .ad-slot.is-hidden { grid-template-rows: 0fr; margin-bottom: 0; }
.hush-demo .hb__page { transition: opacity 160ms ease; }
.hush-demo.is-reloading .hb__page { opacity: 0.15; }

/* Picker mode, styled after hush/src/content/picker.js */
.hush-demo.is-picking .hb__page { cursor: crosshair; }
.hush-pick-hl {
  position: absolute;
  pointer-events: none;
  border: 1.5px solid #fa5000;
  background: rgba(250, 80, 0, 0.1);
  border-radius: 3px;
  transition: all 60ms ease-out;
  z-index: 5;
}
.hush-pick-tag {
  position: absolute;
  pointer-events: none;
  z-index: 6;
  padding: 4px 6px;
  border-radius: 4px;
  background: #000;
  color: #fff;
  font: 500 11px/1 "Helvetica Neue", Helvetica, Arial, sans-serif;
  white-space: nowrap;
}
.hush-picked { display: none !important; }

/* ------------------------------------------------------------
   5. THREE STEPS GRAPHIC
   ------------------------------------------------------------ */
.hush-layers {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: var(--uc-gap);
  row-gap: 64px;
}
.hush-layer { display: flex; flex-direction: column; }
.hush-layer__num { font-size: var(--uc-small); color: var(--uc-accent); }
.hush-layer__word {
  margin-top: 4px;
  font-size: var(--uc-display);
  line-height: 1;
  letter-spacing: -0.03em;
  font-weight: var(--fw-regular);
}
.hush-layer__desc { margin-top: 16px; max-width: 360px; font-size: var(--uc-body); line-height: 1.52; color: var(--uc-fg-2); min-height: 4.6em; }
.hush-layer__art {
  margin-top: 40px;
  aspect-ratio: 4 / 3;
  background: var(--uc-plate);
  display: grid;
  place-items: center;
  padding: 32px;
}

.hl-reqs {
  list-style: none;
  width: 100%;
  max-width: 300px;
  font: 12px/2.1 ui-monospace, 'SF Mono', Menlo, monospace;
  color: var(--uc-fg-2);
}
.hl-reqs li { position: relative; padding-left: 18px; border-bottom: 1px solid var(--uc-rule); }
.hl-reqs li::before { content: ''; position: absolute; left: 0; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--uc-fg-3); }
.hl-reqs li.is-blocked { color: var(--uc-accent); text-decoration: line-through; text-decoration-thickness: 1px; }
.hl-reqs li.is-blocked::before { background: var(--uc-accent); }

.hl-page {
  width: 100%;
  max-width: 260px;
  padding: 20px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.hl-line { display: block; height: 6px; background: #e3e3e1; }
.hl-line--title { height: 12px; width: 70%; background: #cfcfcd; margin-bottom: 4px; }
.hl-line--short { width: 60%; }
.hl-sponsored {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 18px 8px 8px;
  border: 1.5px dashed var(--uc-accent);
  background: rgba(250, 80, 0, 0.06);
}
.hl-sponsored span { position: absolute; left: 8px; top: 4px; font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--uc-accent); }
.hl-sponsored i { aspect-ratio: 4 / 3; background: rgba(250, 80, 0, 0.18); }
.hl-gap {
  position: relative;
  height: 46px;
  border-top: 1px dashed var(--uc-fg-3);
  border-bottom: 1px dashed var(--uc-fg-3);
  transition: height 900ms var(--ease);
}
.hl-gap::before,
.hl-gap::after {
  content: '';
  position: absolute;
  left: 50%;
  width: 7px;
  height: 7px;
  margin-left: -4px;
  border-left: 1.5px solid var(--uc-accent);
  border-top: 1.5px solid var(--uc-accent);
}
.hl-gap::before { top: 8px; transform: rotate(225deg); }
.hl-gap::after { bottom: 8px; transform: rotate(45deg); }
.hush-layer:hover .hl-gap { height: 6px; }
.hush-layer:hover .hl-sponsored { opacity: 0; }
.hl-sponsored { transition: opacity 500ms var(--ease); }
.hush-layer:hover .hl-reqs li.is-blocked { opacity: 0.35; }
.hl-reqs li { transition: opacity 400ms var(--ease); }

/* ------------------------------------------------------------
   6. INTERFACE SHOTS, SAFARI LIMITS, CLOSING MARK
   ------------------------------------------------------------ */
.hush-ui-grid { row-gap: 48px; align-items: start; }
.hush-shot { display: flex; flex-direction: column; gap: 16px; }
.hush-shot--popup { grid-column: 1 / span 4; }
.hush-shot--settings { grid-column: 5 / span 8; }
.hush-shot__plate {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 5;
  padding: 12%;
  background: #161617;
  overflow: hidden;
}
.hush-shot__plate img { width: 100%; height: auto; border-radius: 10px; transition: transform var(--dur-3) var(--uc-ease); }
.hush-shot__plate--crop { aspect-ratio: 8 / 5; padding: 0; place-items: start center; }
.hush-shot__plate--crop img { width: 78%; margin-top: 6%; border-radius: 0; }
.hush-shot:hover .hush-shot__plate img { transform: scale(1.015); }

.hush-limits { margin-top: -32px; }
.hush-limits div {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--uc-gap);
  padding: 22px 0;
  border-bottom: 1px solid var(--uc-rule);
}
.hush-limits dt { grid-column: 1 / span 5; font-size: var(--uc-body); line-height: 1.45; }
.hush-limits dd { grid-column: 7 / span 6; font-size: var(--uc-small); line-height: 1.55; color: var(--uc-fg-2); }

.hush-close-mark {
  display: grid;
  place-items: center;
  aspect-ratio: 3 / 2;
  background: var(--uc-plate);
}
.hush-close-mark svg { width: 22%; height: auto; }

/* ------------------------------------------------------------
   7. RESPONSIVE + REDUCED MOTION
   ------------------------------------------------------------ */
@media (max-width: 1100px) {
  .hush-demo { grid-template-columns: minmax(0, 1fr); padding: 32px; }
  .hush-ui--demo { position: static; justify-self: center; }
  .rr__cols { grid-template-columns: minmax(0, 1fr) 180px; }
}
@media (max-width: 1023px) {
  .hush-layers { grid-template-columns: minmax(0, 1fr); }
  .hush-layer__desc { min-height: 0; }
  .hush-shot--popup { grid-column: 1 / span 5; }
  .hush-shot--settings { grid-column: 6 / span 7; }
}
@media (max-width: 767px) {
  .hb--hero { left: 5%; top: 10%; width: 120%; }
  .hb--hero .rr { padding: 22px 26px; }
  .hush-ui--hero { right: 5%; top: 28%; transform: scale(0.62); }
  .hush-demo { padding: 0; background: none; gap: 24px; }
  .hush-ui--demo { order: -1; width: 100%; }
  .hush-ui--demo .popup { width: 100%; }
  .hush-ui--demo .totals { display: none; }
  .rr { padding: 16px 18px 20px; }
  .rr__title { font-size: 26px; }
  .rr__cols { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .rr__side .rr__related { display: none; }
  .ad--box { height: 140px; }
  .ad__cards { grid-template-columns: repeat(2, 1fr); }
  .ad__cards span:nth-child(3) { display: none; }
  .hb__url { font-size: 11px; }
  .hb__nav { display: none; }
  .hush-shot--popup,
  .hush-shot--settings { grid-column: 1 / -1; }
  .hush-limits div { row-gap: 8px; }
  .hush-limits dt,
  .hush-limits dd { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  .ad-slot, .ad, .hb__page, .hl-gap, .hl-sponsored, .hl-reqs li, .hush-shot__plate img { transition: none !important; }
  .hush-ui .bump { animation: none; }
}

/* Popup scale by width */
@media (min-width: 1700px) { .hush-hero { --hush-pop-scale: 1.35; } }
@media (max-width: 1280px) { .hush-hero { --hush-pop-scale: 1; } }
@media (max-width: 1023px) { .hush-hero { --hush-pop-scale: 0.8; } }
