:root {
  --ink: #151515;
  --paper: #f4f5f6;
  --white: #ffffff;
  --yellow: #f5df2b;
  --muted: #676767;
  --line: #d7d8da;
  --success: #d9ff74;
  --danger: #ffdad5;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { background: var(--paper); color: var(--ink); font-family: var(--sans); }

body { margin: 0; min-height: 100vh; }

button, textarea, a { font: inherit; }

button, a { -webkit-tap-highlight-color: transparent; }

.site-header {
  min-height: 86px;
  padding: 22px clamp(20px, 4vw, 56px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 5px solid #35363a;
  background: var(--paper);
}

.brand, .header-label {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .04em;
  text-decoration: none;
}

.brand { display: inline-flex; align-items: center; gap: 11px; }

.brand-mark { width: 18px; height: 27px; background: var(--ink); transform: skew(-24deg); display: inline-block; }

.notice-bar {
  min-height: 61px;
  padding: 17px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  text-align: center;
  background: var(--yellow);
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .025em;
}

.notice-bar span { font-size: 25px; line-height: 1; }

main { width: min(100%, 1040px); margin: 0 auto; padding: 0 24px 80px; }

.hero { padding: clamp(54px, 9vw, 100px) 0 58px; max-width: 830px; }

.eyebrow, label, .post-index {
  margin: 0 0 20px;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .06em;
}

h1 { margin: 0; max-width: 810px; font-size: clamp(46px, 7.7vw, 82px); line-height: .99; letter-spacing: -.055em; font-weight: 480; }

.lede { margin: 34px 0 0; max-width: 710px; font-size: clamp(19px, 2.3vw, 25px); line-height: 1.45; letter-spacing: -.02em; }

.extract-form { margin-top: 48px; }

label { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 11px; }

label span { color: var(--muted); font-size: 11px; }

textarea {
  width: 100%;
  min-height: 132px;
  padding: 19px 20px;
  resize: vertical;
  border: 2px solid var(--ink);
  border-radius: 0;
  outline: none;
  background: var(--white);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.5;
  box-shadow: none;
}

textarea:focus { box-shadow: 7px 7px 0 var(--yellow); }

.primary-button, .copy-button, .secondary-button {
  border: 2px solid var(--ink);
  border-radius: 0;
  cursor: pointer;
  font-family: var(--mono);
  font-weight: 800;
  letter-spacing: .035em;
  text-decoration: none;
}

.primary-button {
  width: 100%;
  min-height: 64px;
  margin-top: 14px;
  padding: 16px 23px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  background: var(--ink);
  color: var(--white);
  font-size: 16px;
}

.primary-button:hover, .primary-button:focus-visible { background: #2c2c2c; }
.primary-button:disabled { cursor: wait; opacity: .68; }
.button-icon { font-size: 14px; }

.form-status { min-height: 24px; margin: 13px 0 0; font-family: var(--mono); font-size: 13px; }

.results { min-width: 0; display: grid; gap: 28px; }

.post-card { min-width: 0; max-width: 100%; padding: clamp(22px, 4vw, 38px); border: 2px solid var(--ink); background: var(--white); box-shadow: 10px 10px 0 var(--ink); }

.post-card.is-error { background: var(--danger); }

.post-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.post-index { margin-bottom: 9px; }
.post-title { margin: 0; max-width: 670px; font-size: clamp(23px, 3vw, 34px); line-height: 1.12; letter-spacing: -.035em; font-weight: 540; }
.post-meta { margin: 11px 0 0; color: var(--muted); font-family: var(--mono); font-size: 13px; }
.source-link { flex: 0 0 auto; color: var(--ink); font-family: var(--mono); font-size: 12px; font-weight: 800; text-decoration-thickness: 2px; text-underline-offset: 4px; }

.slide-strip { min-width: 0; max-width: 100%; margin: 27px 0 20px; display: flex; gap: 10px; overflow-x: auto; padding-bottom: 7px; scroll-snap-type: x proximity; }
.slide-thumb { position: relative; flex: 0 0 clamp(110px, 20vw, 176px); aspect-ratio: 3 / 4; overflow: hidden; background: #e5e5e5; scroll-snap-align: start; }
.slide-thumb img { width: 100%; height: 100%; display: block; object-fit: cover; }
.slide-number { position: absolute; top: 8px; left: 8px; min-width: 31px; height: 31px; padding: 0 7px; display: grid; place-items: center; border: 2px solid white; border-radius: 999px; background: rgba(0,0,0,.78); color: white; font-family: var(--mono); font-size: 13px; font-weight: 900; }

.copy-button { width: 100%; min-width: 0; min-height: 78px; padding: 18px 24px; display: flex; align-items: center; justify-content: center; gap: 15px; background: var(--yellow); color: var(--ink); font-size: clamp(15px, 2.2vw, 20px); line-height: 1.25; text-align: center; box-shadow: 6px 6px 0 var(--ink); }
.copy-label { min-width: 0; overflow-wrap: anywhere; }
.copy-button:hover, .copy-button:focus-visible { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--ink); }
.copy-button:active { transform: translate(4px, 4px); box-shadow: 2px 2px 0 var(--ink); }
.copy-button.is-copied { background: var(--success); }
.copy-button:disabled { cursor: wait; opacity: .7; }
.copy-icon { font-size: 24px; }
.copy-help { margin: 14px 0 0; color: var(--muted); text-align: center; font-family: var(--mono); font-size: 12px; }

.modal { position: fixed; inset: 0; z-index: 10; overflow-y: auto; padding: 24px; background: rgba(0,0,0,.78); }
.modal[hidden] { display: none; }
.modal-card { position: relative; width: min(100%, 760px); margin: 24px auto; padding: clamp(24px, 5vw, 44px); background: var(--paper); }
.modal-card h2 { margin: 0; font-size: clamp(28px, 5vw, 46px); line-height: 1.02; letter-spacing: -.04em; }
.modal-card p:not(.eyebrow) { line-height: 1.5; }
.modal-card img { width: 100%; max-height: 55vh; margin-top: 18px; display: block; object-fit: contain; background: #111; }
.modal-close { position: absolute; top: 13px; right: 15px; border: 0; background: transparent; cursor: pointer; font-size: 34px; }
.modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 15px; }
.modal-actions .primary-button { margin: 0; }
.secondary-button { min-height: 64px; padding: 16px; display: grid; place-items: center; background: var(--white); color: var(--ink); }

@media (max-width: 620px) {
  .site-header { min-height: 68px; padding: 16px 18px; }
  .brand, .header-label { font-size: 13px; }
  .brand-mark { width: 14px; height: 22px; }
  .notice-bar { min-height: 50px; font-size: 11px; gap: 8px; }
  main { padding: 0 16px 60px; }
  .hero { padding: 48px 0 38px; }
  .lede { margin-top: 25px; }
  .extract-form { margin-top: 34px; }
  label { align-items: flex-end; }
  label span { max-width: 120px; text-align: right; }
  .post-card { box-shadow: 6px 6px 0 var(--ink); }
  .post-head { display: block; }
  .source-link { display: inline-block; margin-top: 17px; }
  .copy-button { min-height: 72px; padding: 15px 12px; }
  .copy-icon { flex: 0 0 auto; }
  .modal { padding: 10px; }
  .modal-card { margin: 10px auto; }
  .modal-actions { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: no-preference) {
  .post-card { animation: rise .28s ease both; }
  @keyframes rise { from { opacity: 0; transform: translateY(10px); } }
}
