@font-face {
  font-family: Fraunces;
  src: url("/media/fraunces.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
:root {
  color-scheme: light;
  --linen: #f7eee1;
  --page: #fdf8ef;
  --ink: #382824;
  --muted: #66524b;
  --wine: #683835;
  --wine-dark: #4b2526;
  --rule: #cbb8a6;
  --display: Fraunces, Georgia, serif;
  font: 16px/1.53 system-ui, sans-serif;
  color: var(--ink);
  background: var(--linen);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
p, h1, h2, h3, figure, blockquote { margin: 0; }
h1, h2, h3 { font-family: var(--display); line-height: 1.08; font-weight: 575; letter-spacing: -.033em; }
a { color: inherit; text-underline-offset: .21em; }
a:hover { text-decoration-thickness: 2px; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #ab553d; outline-offset: 3px; }
.band { width: min(1190px, calc(100% - 76px)); margin-inline: auto; }
.skip { position: fixed; z-index: 5; top: 8px; left: 10px; padding: 9px 13px; background: var(--page); color: var(--ink); transform: translateY(-155%); }
.skip:focus { transform: none; }

.top { color: #fff7ed; background: var(--wine-dark); }
.top .band { min-height: 61px; display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.wordmark { font-family: var(--display); display: inline-flex; align-items: center; gap: 9px; font-size: 1.21rem; text-decoration: none; font-weight: 550; }
.stamp { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1px solid #d4a293; font: 580 18px/1 var(--display); }
.top nav { display: flex; gap: clamp(13px, 3vw, 26px); }
.top nav a { display: inline-flex; min-height: 43px; align-items: center; font-size: .84rem; font-weight: 670; text-decoration: none; }
.top nav a:hover { text-decoration: underline; }
.top :focus-visible { outline-color: #ffe8bd; }

.opening { background: #f9eee0; border-bottom: 1px solid var(--rule); }
.opening-text { padding-block: clamp(39px, 5.4vw, 74px) 31px; text-align: center; }
.opening h1 { font-size: clamp(4.1rem, 7.55vw, 7.7rem); line-height: .95; font-weight: 620; letter-spacing: -.036em; color: var(--wine-dark); }
.opening-text > p { max-width: 43ch; margin: 22px auto 15px; color: var(--muted); font-size: clamp(1.04rem, 1.53vw, 1.21rem); }
.opening-actions { display: flex; justify-content: center; align-items: center; gap: 10px 21px; flex-wrap: wrap; }
.button, .quiet, .quiet-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 45px; font-size: .9rem; font-weight: 730; line-height: 1.15; text-align: center; }
.button { border: 1px solid var(--wine); border-radius: 4px; padding: 9px 13px; text-decoration: none; }
.primary { color: #fff8ec; background: var(--wine); }
.primary:hover:not(:disabled) { background: var(--wine-dark); }
.outline { background: transparent; color: var(--wine-dark); }
.outline:hover:not(:disabled) { background: #f0e2d5; }
.button:disabled { cursor: default; border-color: #b5a799; color: #64594f; background: #eee5d8; }
.quiet-button { background: none; border: 0; padding-inline: 0; text-decoration: underline; text-underline-offset: .2em; color: var(--wine-dark); }
.quiet { color: var(--wine-dark); }
.tray { max-width: 1000px; }
.tray img { display: block; width: 100%; height: clamp(150px, 22vw, 298px); object-fit: cover; object-position: 50% 50%; }

.compose { padding-block: 47px 52px; scroll-margin-top: 7px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 17px; }
.section-title h2, .example-list h2 { font-size: clamp(2.3rem, 4vw, 3.65rem); color: var(--wine-dark); }
.section-title p { color: var(--muted); font-size: .9rem; }
.writer { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(15px, 3vw, 36px); align-items: start; }
.desk { min-width: 0; background: var(--page); border: 1px solid var(--rule); border-radius: 6px; padding: 18px 19px 15px; }
.desk label { display: block; font-size: .86rem; font-weight: 730; margin-bottom: 5px; }
.desk label span { color: var(--muted); font-weight: 500; }
.desk :is(input, select, textarea) { display: block; width: 100%; min-height: 43px; padding: 7px 9px; border: 1px solid #a89482; border-radius: 4px; background: #fffdf7; color: var(--ink); }
.desk textarea { line-height: 1.43; resize: vertical; }
.paired { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.prompts { margin-block: 12px 15px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.prompts summary { font-family: var(--display); font-size: 1.02rem; font-weight: 650; color: var(--wine-dark); cursor: pointer; padding: 10px 0; }
.prompt-body { display: grid; gap: 5px; padding: 4px 0 12px; }
.prompt-body :is(textarea, select) { margin-bottom: 5px; }
.cue { color: var(--muted); font-size: .86rem; margin-bottom: 4px; }
.prompt-actions, .tools { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 13px; }
.settings { margin-block: 12px; }
#writer-status { min-height: 1.35em; color: var(--muted); font-size: .82rem; margin-top: 7px; }
#manual-label { margin-top: 7px; }
.preview { background: #e9d7c5; border-radius: 6px; border: 1px solid #c8aa8e; padding: 13px 16px 15px; min-width: 0; }
.preview-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding-bottom: 10px; }
.preview-head h3 { color: var(--wine-dark); font-size: 1.31rem; }
.preview-head span, .print-tip { color: #584239; font-size: .83rem; }
.preview-sheet { width: min(100%, 355px); aspect-ratio: 5/7; margin-inline: auto; box-shadow: 0 6px 18px #42282424; }
.print-tip { margin-top: 9px; }

.paper {
  --stock-ink: #743b39;
  --stock-rule: #b98576;
  --paper-color: #fffcf4;
  width: 100%;
  height: 100%;
  container-type: inline-size;
  background: var(--paper-color);
  color: #302623;
  border: 1px solid var(--stock-rule);
}
.paper[data-stock="blue"] { --stock-ink: #273e72; --stock-rule: #7e8aac; --paper-color: #fafbff; }
.paper[data-stock="plain"] { --stock-ink: #292620; --stock-rule: #8a8173; --paper-color: #fff; }
.paper-inner { display: flex; flex-direction: column; width: 100%; height: 100%; padding: 7.7cqw 8.7cqw 7.5cqw; }
.paper-title { display: flex; align-items: center; gap: 2.8cqw; border-bottom: 1px solid var(--stock-rule); padding-bottom: 3.3cqw; margin-bottom: 5cqw; flex: none; }
.paper-title h3 { color: var(--stock-ink); font-size: 9.6cqw; font-weight: 600; line-height: 1; }
.seal { width: 3.4cqw; aspect-ratio: 1; border: 1px solid var(--stock-ink); border-radius: 50%; flex: none; }
.paper-to, .paper-message, .paper-sign { font: 400 4.6cqw/1.43 Georgia, serif; overflow-wrap: anywhere; }
.paper-to { flex: none; margin-bottom: 3.7cqw; }
.paper-message { flex: 0 1 auto; min-height: 0; overflow: hidden; white-space: pre-wrap; }
.paper-message[data-empty="true"] { color: #604e44; font-style: italic; }
.paper-sign { flex: none; padding-top: 4.0cqw; }
.paper-sign span { display: block; }
.paper-sign span:empty { display: none; }
#print-view { position: absolute; left: -10000px; top: 0; width: 5in; height: 7in; visibility: hidden; pointer-events: none; }
#print-warning { display: none; }

.example-list { border-top: 1px solid var(--rule); padding-block: 22px 60px; }
.example-list ul { list-style: none; padding: 0; margin: 15px 0 0; border-top: 1px solid var(--rule); }
.example-list li { border-bottom: 1px solid var(--rule); }
.example-list li a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 4px; text-decoration: none; }
.example-list li a:hover strong { text-decoration: underline; }
.example-list strong { display: block; color: var(--wine-dark); font-family: var(--display); font-size: 1.24rem; font-weight: 620; line-height: 1.19; }
.example-list small { display: block; color: var(--muted); margin-top: 3px; font-size: .88rem; }
.example { max-width: 1030px; padding-block: 27px 58px; }
.back { display: inline-flex; min-height: 43px; align-items: center; font-weight: 700; font-size: .87rem; margin-bottom: 11px; }
.example-head { margin-bottom: 23px; }
.example h1 { font-size: clamp(2.9rem, 6.4vw, 6.1rem); color: var(--wine-dark); max-width: 17ch; }
.example-head p { color: var(--muted); margin-top: 10px; font-size: 1.08rem; }
.example-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(13px, 4vw, 46px); align-items: start; }
.sample-note { background: var(--page); padding: 17px 21px; border-block: 1px solid #9b6e5e; font: 400 1.24rem/1.54 Georgia, serif; }
.sample-note p + p { margin-top: 9px; }
.example-reading h2 { color: var(--wine-dark); font-size: 1.44rem; margin-bottom: 4px; }
.example-reading p { margin-bottom: 13px; }
.example-reading .button { margin-top: 4px; }
.example-source { color: var(--muted); font-size: .84rem; margin-top: 19px; }
.foot { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 6px 14px; border-top: 1px solid var(--rule); padding-block: 14px 25px; color: var(--muted); font-size: .86rem; }
.foot a { color: var(--wine-dark); font-weight: 700; }

@media (max-width: 760px) {
  .band { width: calc(100% - 34px); }
  .top .band { min-height: 58px; }
  .wordmark { font-size: 1.01rem; gap: 5px; }
  .stamp { width: 25px; height: 25px; font-size: 15px; }
  .top nav { gap: 11px; }
  .top nav a { font-size: .75rem; }
  .opening-text { padding-block: 37px 23px; }
  .opening h1 { font-size: clamp(2.95rem, 10.7vw, 5.4rem); letter-spacing: -.036em; line-height: .96; }
  .opening-text > p { margin-block: 15px 10px; }
  .tray img { height: clamp(144px, 36vw, 191px); }
  .compose { padding-block: 30px 40px; }
  .section-title { display: block; margin-bottom: 10px; }
  .section-title p { margin-top: 3px; }
  .writer, .example-grid { grid-template-columns: minmax(0, 1fr); }
  .desk { padding: 12px 11px; }
  .print-tip { font-size: .8rem; }
  .example { padding-block: 15px 45px; }
}
@media (max-width: 360px) {
  .top .band { gap: 7px; }
  .top nav { gap: 8px; }
  .wordmark { font-size: .91rem; }
}
@page { margin: .52in; }
@media print {
  :root, body { background: white !important; }
  body.studio > :not(#print-view) { display: none !important; }
  #print-view { position: static; visibility: visible; margin: 0 auto; break-inside: avoid; }
  #print-view .paper { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  body.studio:not(.print-ready) #print-view .paper { display: none; }
  body.studio:not(.print-ready) #print-warning { display: block; }
}
