/* Gallery page for the email pack. The emails themselves carry their own inline styles. */
:root {
  --brand: #4f46e5;
  --accent: #f59e0b;
  --bg: #f4f3f0;
  --surface: #ffffff;
  --text: #1f2937;
  --muted: #5b6472;
  --line: #e5e3de;
  --radius: 16px;
  --font-display: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
*,*::before,*::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.6 var(--font-body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: 16px; top: -60px; padding: 10px 16px; background: var(--brand); color: #fff; border-radius: 8px; font-weight: 700; text-decoration: none; z-index: 10; }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: 24px; }
code { padding: 1px 6px; border-radius: 6px; background: color-mix(in srgb, var(--brand) 9%, transparent); font-size: .88em; }

.btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 10px; background: var(--brand); color: #fff; font-weight: 700; text-decoration: none; transition: transform .2s; }
.btn:hover { transform: translateY(-1px); }
.top { border-bottom: 1px solid var(--line); background: var(--surface); }
.top-in { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; text-decoration: none; letter-spacing: -.02em; }
.mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--brand); color: #fff; }
.pill { padding: 3px 10px; border-radius: 99px; background: color-mix(in srgb, var(--accent) 22%, transparent); color: #92400e; font-size: .75rem; font-weight: 700; letter-spacing: 0; }

.intro { padding-block: 64px 40px; max-width: 900px; margin-left: 0; }
@media (min-width: 1248px) { .intro { margin-left: calc((100vw - 1200px) / 2); } }
h1 { font: 800 clamp(2.1rem, 5vw, 3.4rem)/1.08 var(--font-display); letter-spacing: -.035em; }
.lead { margin-top: 18px; max-width: 680px; font-size: 1.12rem; color: var(--muted); }
.facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.facts li { padding: 6px 12px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); font-size: .85rem; font-weight: 600; }

.viewer { display: grid; grid-template-columns: 260px 1fr; gap: 24px; align-items: start; }
.list { display: grid; gap: 8px; position: sticky; top: 16px; }
.list a { display: grid; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; transition: border-color .2s, box-shadow .2s; }
.list a span { color: var(--muted); font-size: .85rem; }
.list a:hover { border-color: color-mix(in srgb, var(--brand) 40%, transparent); }
.list a.is-active { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.stage { min-width: 0; border-radius: 20px; border: 1px solid var(--line); background: var(--surface); overflow: hidden; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px; border-bottom: 1px solid var(--line); }
.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--bg); }
.seg button { min-height: 36px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font: 600 .85rem var(--font-body); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.open { margin-left: auto; font-size: .88rem; font-weight: 600; color: var(--brand); text-decoration: none; }
.open:hover { text-decoration: underline; }
.frame-wrap { display: flex; justify-content: center; padding: 24px 12px; background: repeating-linear-gradient(45deg, transparent 0 12px, color-mix(in srgb, var(--line) 50%, transparent) 12px 13px), var(--bg); }
.frame-wrap iframe { width: 100%; max-width: 600px; height: 1500px; border: 0; border-radius: 12px; background: var(--bg); box-shadow: 0 20px 50px -30px rgba(0,0,0,.4); transition: max-width .35s cubic-bezier(.2,.8,.2,1); }
.frame-wrap.is-mobile iframe { max-width: 360px; }

.notes { padding-block: 72px; }
h2 { font: 800 1.8rem/1.2 var(--font-display); letter-spacing: -.02em; margin-bottom: 24px; }
.note-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.note-grid article { padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.note-grid h3 { font-size: 1.02rem; margin-bottom: 6px; }
.note-grid p { color: var(--muted); font-size: .93rem; }
.foot { padding-block: 28px 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; }

@media (max-width: 900px) {
  .viewer { grid-template-columns: 1fr; }
  .list { position: static; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); overflow-x: auto; padding-bottom: 6px; }
  .note-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .wrap { padding-inline: 16px; }
  .note-grid { grid-template-columns: 1fr; }
  .open { margin-left: 0; }
  .frame-wrap { padding: 12px 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
