
:root {
  --paper: #f3eee3;
  --paper-deep: #e7dece;
  --ink: #292b25;
  --muted: #716f63;
  --rust: #a6452d;
  --rust-dark: #793220;
  --sage: #506554;
  --hairline: rgba(55, 53, 43, .22);
  --display: 'Iowan Old Style', 'Baskerville', 'Palatino Linotype', Georgia, serif;
  --sans: 'Avenir Next', 'Gill Sans', 'Trebuchet MS', sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 320px; background: var(--paper); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--sans);
  background:
    radial-gradient(circle at 12% 18%, rgba(255,255,255,.7), transparent 29rem),
    radial-gradient(circle at 92% 82%, rgba(163,91,55,.09), transparent 34rem),
    var(--paper);
  position: relative;
}
.paper-grain {
  position: fixed;
  inset: 0;
  opacity: .19;
  pointer-events: none;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.19'/%3E%3C/svg%3E");
}
.masthead, main, footer { position: relative; z-index: 1; width: min(1180px, calc(100% - 64px)); margin-inline: auto; }
.masthead {
  min-height: 112px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid var(--ink);
  animation: arrive .7s ease both;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  width: max-content;
  color: var(--ink);
  font: 700 29px/1 var(--display);
  letter-spacing: -.8px;
  text-decoration: none;
}
.loom-mark { position: relative; width: 27px; height: 29px; display: inline-block; transform: rotate(-5deg); }
.loom-mark i { position: absolute; display: block; background: var(--rust); }
.loom-mark i:nth-child(1), .loom-mark i:nth-child(2) { width: 2px; height: 29px; top: 0; }
.loom-mark i:nth-child(1) { left: 7px; } .loom-mark i:nth-child(2) { right: 7px; }
.loom-mark i:nth-child(3), .loom-mark i:nth-child(4) { height: 2px; width: 27px; left: 0; }
.loom-mark i:nth-child(3) { top: 8px; } .loom-mark i:nth-child(4) { bottom: 8px; }
.masthead-note, .edition { margin: 0; font-size: 10px; letter-spacing: .17em; text-transform: uppercase; }
.masthead-note { color: var(--muted); }
.edition { justify-self: end; }
main {
  display: grid;
  grid-template-columns: minmax(0, 1.07fr) minmax(360px, .83fr);
  gap: clamp(48px, 8vw, 120px);
  padding: clamp(64px, 9vw, 116px) 0 88px;
  align-items: start;
}
.intro { padding-top: 11px; animation: arrive .8s .08s ease both; }
.kicker { display: flex; align-items: center; gap: 12px; margin: 0 0 29px; color: var(--rust); font-size: 11px; font-weight: 700; letter-spacing: .17em; text-transform: uppercase; }
.kicker span { border: 1px solid var(--rust); border-radius: 50%; width: 27px; height: 27px; display: grid; place-items: center; font-family: var(--display); font-style: italic; letter-spacing: 0; }
h1 { margin: 0; font: 400 clamp(56px, 6.5vw, 92px)/.96 var(--display); letter-spacing: -.055em; }
h1 em { color: var(--rust); font-weight: 400; }
.lede { max-width: 480px; margin: 37px 0 0; padding-left: 49px; color: #5b5c52; font: 18px/1.75 var(--display); position: relative; }
.lede::before { content: ''; position: absolute; left: 0; top: 13px; width: 28px; height: 1px; background: var(--rust); }
.margin-note { margin: 55px 0 0 clamp(0px, 8vw, 112px); display: flex; align-items: center; gap: 18px; transform: rotate(-3deg); color: var(--sage); }
.margin-note p { margin: 0; font: italic 16px/1.5 var(--display); }
.note-line { width: 52px; height: 1px; background: var(--sage); position: relative; }
.note-line::after { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--sage); position: absolute; right: 0; top: -2px; }
.pairing-card {
  background: rgba(255, 253, 247, .69);
  border: 1px solid var(--hairline);
  box-shadow: 10px 12px 0 rgba(85, 72, 52, .055), 0 24px 60px rgba(72, 59, 41, .07);
  padding: clamp(25px, 3.5vw, 43px);
  position: relative;
  animation: card-arrive .85s .16s ease both;
  backdrop-filter: blur(8px);
}
.pairing-card::before { content: ''; position: absolute; top: -7px; left: 32px; right: 32px; height: 13px; background: rgba(210, 191, 158, .45); transform: rotate(.5deg); z-index: -1; }
.card-topline { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-bottom: 20px; border-bottom: 1px solid var(--hairline); }
.card-topline h2 { margin: 0; font: italic 21px/1.2 var(--display); }
.status { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 9px; letter-spacing: .13em; text-transform: uppercase; }
.status i { width: 7px; height: 7px; border-radius: 50%; background: #a29a86; }
.status[data-state='ready'] { color: var(--sage); } .status[data-state='ready'] i { background: var(--sage); }
.status[data-state='closed'] { color: var(--rust); } .status[data-state='closed'] i { background: var(--rust); }
.panel { padding-top: 29px; }
.panel h3 { margin: 7px 0 15px; font: 400 31px/1.12 var(--display); letter-spacing: -.025em; }
.panel > p:not(.panel-number) { margin: 0 0 25px; color: var(--muted); font-size: 13px; line-height: 1.75; }
.panel-number { margin: 0; color: var(--rust); font-size: 9px; font-weight: 700; letter-spacing: .16em; }
.loading-panel { min-height: 216px; display: grid; place-content: center; justify-items: center; gap: 18px; color: var(--muted); }
.loading-panel p { margin: 0; font: italic 16px var(--display); }
.thread-loader { width: 58px; height: 24px; background: repeating-linear-gradient(90deg, transparent 0 8px, var(--rust) 8px 9px); position: relative; animation: breathe 1.6s ease-in-out infinite; }
.thread-loader::after { content: ''; position: absolute; left: 0; right: 0; top: 11px; height: 1px; background: var(--rust); }
.button { min-height: 48px; border: 0; padding: 13px 18px; display: inline-flex; justify-content: space-between; align-items: center; gap: 28px; font: 700 11px/1.2 var(--sans); letter-spacing: .035em; cursor: pointer; text-decoration: none; transition: transform .2s, background .2s, box-shadow .2s; }
.button:hover { transform: translateY(-2px); } .button:focus-visible { outline: 3px solid rgba(166,69,45,.3); outline-offset: 3px; }
.button:disabled { cursor: wait; opacity: .65; transform: none; }
.primary { width: 100%; color: #fffaf0; background: var(--rust); box-shadow: 4px 4px 0 rgba(80,40,25,.14); }
.primary:hover { background: var(--rust-dark); box-shadow: 5px 6px 0 rgba(80,40,25,.12); }
.secondary { background: transparent; color: var(--rust); border: 1px solid var(--rust); width: 100%; justify-content: center; }
.secondary:hover { background: rgba(166,69,45,.06); }
.quiet-note { border-left: 2px solid var(--sage); padding: 2px 0 2px 16px; display: grid; gap: 6px; margin-top: 27px; color: var(--sage); font-size: 11px; line-height: 1.55; }
.quiet-note strong { text-transform: uppercase; letter-spacing: .08em; font-size: 9px; }
.identity-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; }
.avatar { width: 49px; height: 55px; background: var(--sage); color: var(--paper); display: grid; place-items: center; font: italic 27px var(--display); clip-path: polygon(0 0,100% 3%,95% 100%,4% 96%); }
.identity-copy h3 { font-size: 24px; margin: 4px 0; }
.identity-copy #reader-email { margin: 0; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.text-link { color: var(--muted); font-size: 10px; text-underline-offset: 4px; }
.rule { height: 1px; background: var(--hairline); margin: 27px 0; }
h4 { margin: 0 0 11px; font: 400 23px/1.2 var(--display); }
.token-panel { margin-top: 26px; padding-top: 25px; border-top: 1px solid var(--hairline); animation: arrive .35s ease both; }
.warning { display: grid; grid-template-columns: auto 1fr; gap: 12px; padding: 15px; background: #efe1cc; color: #753d29; margin-bottom: 20px; }
.warning-mark { border: 1px solid currentColor; border-radius: 50%; width: 20px; height: 20px; display: grid; place-items: center; font: italic 14px var(--display); }
.warning p { margin: 0; font-size: 11px; line-height: 1.6; }
.warning strong { display: block; }
.token-panel label { display: block; color: var(--muted); margin-bottom: 8px; font-size: 9px; letter-spacing: .1em; text-transform: uppercase; }
textarea { display: block; resize: vertical; width: 100%; min-height: 86px; margin-bottom: 11px; padding: 13px; border: 1px solid var(--hairline); border-radius: 0; background: rgba(255,255,255,.55); color: var(--ink); font: 12px/1.6 ui-monospace, 'SFMono-Regular', Consolas, monospace; overflow-wrap: anywhere; }
textarea:focus { outline: 2px solid rgba(166,69,45,.25); border-color: var(--rust); }
.copy-status { min-height: 17px; margin: 8px 0 0; color: var(--sage); text-align: center; font-size: 10px; }
.error { padding: 12px; color: var(--rust-dark); background: rgba(166,69,45,.08); font-size: 12px; line-height: 1.5; }
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 31px 0 0; padding: 23px 0 0; border-top: 1px solid var(--hairline); }
.steps li { color: var(--muted); font-size: 9px; line-height: 1.5; }
.steps span { display: block; color: var(--rust); font: italic 17px var(--display); margin-bottom: 4px; }
footer { border-top: 1px solid var(--hairline); padding: 25px 0 31px; display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
footer p { margin: 0; } .footer-star { color: var(--rust); font-size: 14px; margin-right: 8px; }
@keyframes arrive { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes card-arrive { from { opacity: 0; transform: translate(10px, 18px) rotate(1deg); } to { opacity: 1; transform: translate(0) rotate(0); } }
@keyframes breathe { 50% { opacity: .35; transform: scaleX(.8); } }
@media (max-width: 850px) {
  .masthead { grid-template-columns: 1fr auto; } .masthead-note { display: none; }
  main { grid-template-columns: 1fr; gap: 55px; padding-top: 62px; }
  .intro { max-width: 650px; } h1 { font-size: clamp(55px, 11vw, 83px); }
  .lede { max-width: 520px; } .margin-note { display: none; }
  .pairing-card { width: min(100%, 570px); justify-self: end; }
}
@media (max-width: 520px) {
  .masthead, main, footer { width: min(100% - 34px, 1180px); }
  .masthead { min-height: 88px; } .wordmark { font-size: 25px; } .edition { font-size: 8px; letter-spacing: .08em; }
  main { padding: 45px 0 55px; gap: 40px; } h1 { font-size: clamp(48px, 14.5vw, 70px); }
  .lede { padding-left: 0; margin-top: 27px; font-size: 16px; } .lede::before { display: none; }
  .pairing-card { padding: 24px 20px; box-shadow: 6px 7px 0 rgba(85,72,52,.055); }
  .card-topline h2 { font-size: 18px; } .identity-row { grid-template-columns: auto 1fr; } .identity-row .text-link { grid-column: 2; }
  footer { flex-direction: column; line-height: 1.6; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
