:root {
  --page: #f5f5f3;
  --panel: #ededeb;
  --card: #e7e7e4;
  --ink: #171717;
  --muted: #686864;
  --line: #d6d6d2;
  --soft-line: #e4e4e1;
  --accent: #ff4f2e;
  --sidebar: 292px;
  --sans: Inter, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { color-scheme: light dark; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--page);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 10;
  width: var(--sidebar);
  padding: 22px 22px 18px;
  background: var(--panel);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.sidebar-top { display: grid; gap: 28px; }
.sidebar-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wordmark {
  width: max-content;
  font-size: 16px;
  line-height: 1;
  font-weight: 750;
  letter-spacing: -.05em;
  text-decoration: none;
}
.sidebar-intro { max-width: 210px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.sidebar-nav { display: grid; gap: 28px; }
.sidebar-nav section { display: grid; gap: 2px; }
.sidebar-nav h2 { margin: 0 0 9px; color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.sidebar-nav a {
  min-height: 30px;
  padding: 6px 8px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  text-decoration: none;
  font-size: 12px;
}
.sidebar-nav a:hover, .sidebar-nav a:focus-visible, .sidebar-nav a.is-active { background: #dddeda; }
.sidebar-nav a span { color: var(--muted); font-variant-numeric: tabular-nums; }
.sidebar-footer { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .04em; }
.sidebar-footer p { margin: 0; }

.content { min-height: 100vh; margin-left: var(--sidebar); }
.content-header {
  min-height: 156px;
  padding: 28px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
}
.content-header h1 { margin: 0; font-size: clamp(30px, 3vw, 42px); font-weight: 600; letter-spacing: -.045em; line-height: 1; }
.header-copy { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.4; }
.signup-trigger,
.signup-row button {
  min-height: 34px;
  padding: 8px 12px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: var(--ink);
  color: var(--page);
  font: 600 11px/1 var(--sans);
  cursor: pointer;
}
.signup-trigger { flex: 0 0 auto; }
.signup-trigger:hover,
.signup-row button:hover { opacity: .82; }
.signup-trigger:disabled,
.signup-row button:disabled { cursor: wait; opacity: .55; }

dialog {
  width: min(460px, calc(100vw - 32px));
  margin: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--page);
  color: var(--ink);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .18);
}
dialog::backdrop { background: rgba(17, 17, 17, .48); }
.dialog-head {
  min-height: 48px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dialog-eyebrow { margin: 0; font-size: 10px; font-weight: 700; letter-spacing: .04em; }
.dialog-close {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font: 20px/1 var(--sans);
  cursor: pointer;
}
.dialog-close:hover { background: var(--panel); color: var(--ink); }
.dialog-copy { padding: 26px 26px 18px; }
.dialog-copy h2 { margin: 0; font-size: 28px; line-height: 1; letter-spacing: -.04em; }
.dialog-copy p { margin: 9px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
#signup-form { padding: 0 26px 26px; }
#signup-form > label { display: block; margin: 0 0 7px; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.signup-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; }
.signup-row input {
  min-width: 0;
  min-height: 38px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel);
  color: var(--ink);
  font: 13px/1 var(--sans);
}
.signup-row input::placeholder { color: var(--muted); }
.signup-row button { min-height: 38px; }
.honeypot-wrap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-note { margin: 9px 0 0; color: var(--muted); font-size: 10px; line-height: 1.4; }
.signup-status { min-height: 17px; margin: 10px 0 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
.signup-status[data-state="success"] { color: var(--ink); font-weight: 600; }
.signup-status[data-state="error"] { color: #a33125; }

.ideas { padding-bottom: 70px; }
.results-line {
  padding: 17px 28px 14px;
  border-bottom: 1px solid var(--soft-line);
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.results-line p { margin: 0; }
.idea-grid { padding: 0 28px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 16px; }
.idea-card { min-width: 0; padding-top: 28px; }
.idea-open { display: block; text-decoration: none; }
.idea-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: 3px;
  background: var(--card);
  display: grid;
  place-items: center;
}
.idea-frame img { width: 100%; height: 100%; display: block; object-fit: cover; }
.frame-number { font-size: clamp(64px, 10vw, 150px); font-weight: 500; line-height: .8; letter-spacing: -.07em; }
.entry-status {
  position: absolute;
  top: 9px;
  right: 9px;
  min-height: 22px;
  padding: 5px 7px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--page) 92%, transparent);
  color: var(--muted);
  font: 10px ui-monospace, SFMono-Regular, Menlo, monospace;
  text-transform: uppercase;
}
.view-label {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 7px 9px;
  border-radius: 4px;
  background: rgba(20,20,20,.9);
  color: #fff;
  font-size: 10px;
  opacity: 0;
  transform: translateY(4px);
  transition: 180ms ease;
}
.idea-open:hover .view-label, .idea-open:focus-visible .view-label { opacity: 1; transform: none; }
.card-copy { padding-top: 10px; display: grid; grid-template-columns: auto 1fr; column-gap: 10px; }
.card-index { margin: 2px 0 0; color: var(--muted); font: 9px ui-monospace, SFMono-Regular, Menlo, monospace; }
.card-copy h2 { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: -.015em; line-height: 1.25; }

.idea-detail {
  min-height: calc(100vh - 156px);
  padding: 28px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 18px;
  align-content: end;
  background: var(--card);
}
.detail-index { align-self: start; margin: 8px 0 0; color: var(--muted); font: 10px ui-monospace, SFMono-Regular, Menlo, monospace; }
.idea-detail h1 { margin: 0; font-size: clamp(64px, 12vw, 180px); line-height: .86; letter-spacing: -.065em; font-weight: 500; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

@media (prefers-color-scheme: dark) {
  :root {
    --page: #171717;
    --panel: #202020;
    --card: #292929;
    --ink: #f5f5f3;
    --muted: #b4b4af;
    --line: #373737;
    --soft-line: #303030;
  }
  .sidebar-nav a:hover, .sidebar-nav a:focus-visible, .sidebar-nav a.is-active { background: #30302f; }
  .signup-status[data-state="error"] { color: #ff9a8d; }
}

@media (max-width: 980px) and (min-width: 761px) {
  :root { --sidebar: 230px; }
  .sidebar { padding-inline: 18px; }
  .idea-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
  :root { --sidebar: 0px; }
  .sidebar { position: static; width: auto; min-height: auto; padding: 16px 16px 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar-top { display: block; }
  .sidebar-intro, .sidebar-footer, .sidebar-nav { display: none; }
  .content { margin-left: 0; }
  .content-header { min-height: 132px; padding: 24px 16px; gap: 16px; flex-wrap: wrap; }
  .header-copy { max-width: 300px; }
  .signup-trigger { align-self: flex-start; }
  .results-line { padding: 15px 16px 12px; }
  .idea-grid { padding: 0 16px; grid-template-columns: minmax(0, 1fr); }
  .idea-card { padding-top: 16px; }
  .view-label { display: none; }
  .idea-detail { min-height: calc(100vh - 193px); padding: 24px 16px; grid-template-columns: 36px minmax(0, 1fr); }
  .idea-detail h1 { font-size: clamp(52px, 16vw, 78px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}
