/* Self-hosted instead of loaded from fonts.googleapis.com — the mockup's
   choice of typefaces, latin-subset only (the site's content is English). */
@font-face { font-family: 'Zen Old Mincho'; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/zen-old-mincho-normal-500-7460b7e4.woff2") format('woff2'); }
@font-face { font-family: 'Zen Old Mincho'; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/zen-old-mincho-normal-700-6c7e0d61.woff2") format('woff2'); }
@font-face { font-family: 'Bodoni Moda'; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/bodoni-moda-normal-500-0818bd4a.woff2") format('woff2'); }
@font-face { font-family: 'Bodoni Moda'; font-style: italic; font-weight: 500; font-display: swap; src: url("/assets/bodoni-moda-italic-500-a76c5ad2.woff2") format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/cormorant-garamond-normal-500-0b6541cf.woff2") format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/cormorant-garamond-normal-600-0b6541cf.woff2") format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-style: italic; font-weight: 500; font-display: swap; src: url("/assets/cormorant-garamond-italic-500-d3604db8.woff2") format('woff2'); }
@font-face { font-family: 'Newsreader'; font-style: italic; font-weight: 400; font-display: swap; src: url("/assets/newsreader-italic-400-0b0e0d9c.woff2") format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/ibm-plex-mono-normal-400-d803141a.woff2") format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/ibm-plex-mono-normal-500-3f7bbac1.woff2") format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/ibm-plex-mono-normal-600-b71798d4.woff2") format('woff2'); }

:root{
  --bg:#17160f;
  --panel:#060605;
  --panel-2:#0d0c09;
  --ink:#f2f1ec;
  --ink-dim:#b8b6ac;
  --border:#f2f1ec;
  --rule:#3a382f;
  --nav-bg:rgba(23,22,15,.92);
  --mat:#f2f1ec;
  --title:'Zen Old Mincho',serif;
  --display:'Bodoni Moda',Georgia,serif;
  --body:'Cormorant Garamond',Georgia,serif;
  --quote-face:'Newsreader',Georgia,serif;
  --mono:'IBM Plex Mono',ui-monospace,'SF Mono',Menlo,monospace;
}
/* dark is the base theme above; light applies by system preference or explicit toggle */
@media (prefers-color-scheme: light){
  :root:not([data-theme="light"]){
    --bg:#f2f1ec; --panel:#ffffff; --panel-2:#f2f1ec;
    --ink:#111111; --ink-dim:#555555; --border:#111111; --rule:#cccccc;
    --nav-bg:rgba(242,241,236,.92);
  }
}
:root[data-theme="light"]{
  --bg:#f2f1ec; --panel:#ffffff; --panel-2:#f2f1ec;
  --ink:#111111; --ink-dim:#555555; --border:#111111; --rule:#cccccc;
  --nav-bg:rgba(242,241,236,.92);
}
:root[data-theme="dark"]{
  --bg:#17160f; --panel:#060605; --panel-2:#0d0c09;
  --ink:#f2f1ec; --ink-dim:#b8b6ac; --border:#f2f1ec; --rule:#3a382f;
  --nav-bg:rgba(23,22,15,.92);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
html, body { margin: 0; background: var(--bg); }
body, nav, .card, .box, .quote-card, .btn, a { transition: background-color .25s ease, color .25s ease, border-color .25s ease; }
#intro, #guidelines, #submit, #contact, #legal { scroll-margin-top: 90px; }
body { color: var(--ink); font-family: var(--body); }
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--ink-dim); }
p { margin: 0 0 22px; }
p:last-child { margin-bottom: 0; }

.tone { background-image: radial-gradient(var(--ink) 1px, transparent 1.4px); background-size: 7px 7px; }

nav {
  position: sticky; top: 0; z-index: 5;
  background: var(--nav-bg); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--rule);
}
nav .bar {
  max-width: 1440px; margin: 0 auto; padding: 18px 48px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px;
}
nav .word { font-family: var(--display); font-style: italic; font-size: 1.4rem; color: var(--ink); }
nav ul { list-style: none; display: flex; gap: 24px; margin: 0; padding: 0; flex-wrap: wrap; }
nav a { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-dim); border-bottom: 1px solid transparent; }
nav a:hover { color: var(--ink); border-bottom-color: var(--ink); }
nav .right { display: flex; align-items: center; gap: 20px; }

.theme-toggle {
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--rule); background: transparent; color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; line-height: 1; padding: 0; cursor: pointer;
}
.theme-toggle:hover { border-color: var(--ink); color: var(--ink); }

.page { width: 1440px; max-width: 100%; margin: 0 auto; padding: 48px; }
.grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; align-items: stretch; }
.grid + .grid { margin-top: 14px; }
.grid-row2 { grid-template-columns: 1fr 1.3fr; }

.card {
  border: 3px solid var(--border); padding: 56px; background: var(--panel);
}
.eyebrow { font-family: var(--mono); font-size: 13px; letter-spacing: 3px; color: var(--ink-dim); }
.title { font-family: var(--title); font-weight: 700; font-size: 118px; line-height: 0.95; color: var(--ink); margin-top: 24px; margin-bottom: 44px; }

.copy { font-size: 20px; line-height: 1.75; max-width: 640px; color: var(--ink); font-weight: 500; }
.copy em { color: var(--ink); font-style: italic; }
.copy a { text-decoration: underline; }

.meta { display: flex; gap: 40px; margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--rule); font-family: var(--mono); font-size: 12px; letter-spacing: .04em; color: var(--ink-dim); flex-wrap: wrap; }
.meta b { display: block; margin-top: 4px; font-size: 14px; color: var(--ink); letter-spacing: .02em; font-family: var(--mono); font-weight: 500; }

.actions { display: flex; gap: 16px; margin-top: 36px; flex-wrap: wrap; }
.btn { font-family: var(--mono); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; padding: 16px 30px; }
.btn.solid { background: var(--ink); color: var(--panel); }
.btn.solid:hover { background: var(--ink-dim); color: var(--panel); }
.btn.outline { border: 2px solid var(--ink); color: var(--ink); padding: 14px 28px; background: transparent; }
.btn.outline:hover { border-color: var(--ink-dim); color: var(--ink-dim); }

.side { display: flex; flex-direction: column; gap: 14px; }
.box { flex: 1; border: 3px solid var(--border); padding: 36px; display: flex; flex-direction: column; justify-content: center; background-color: var(--panel-2); }

.plates { display: flex; flex-direction: column; gap: 22px; }
.plate-frame { background: var(--mat); padding: 10px; }
.plate-frame img { display: block; width: 100%; filter: sepia(.25) contrast(1.05) brightness(.98); }

.plate-pair { display: flex; gap: 10px; }
.plate-pair > div { flex: 1; min-width: 0; }
.plate-pair .plate-frame img { aspect-ratio: 3 / 4; object-fit: cover; filter: grayscale(1) contrast(1.1) brightness(.95); }
.plate-cap { font-family: var(--mono); font-size: 10.5px; letter-spacing: .03em; color: #4a4842; margin-top: 8px; }

.quotes { display: flex; flex-direction: column; gap: 28px; }
.quote-card { background: var(--panel); padding: 20px 22px; }
.quote { font-family: var(--quote-face); font-style: italic; font-size: 19px; line-height: 1.7; color: var(--ink); }
.attrib { font-family: var(--mono); font-size: 12px; letter-spacing: 1px; color: var(--ink-dim); margin-top: 14px; text-transform: uppercase; }

.placeholder-note { font-family: var(--quote-face); font-style: italic; font-size: 18px; color: var(--ink-dim); margin-top: 22px; }

.guidelines-body { display: flex; flex-direction: column; gap: 40px; margin-top: 28px; }
.g-label { font-family: var(--mono); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-dim); margin: 0 0 18px; font-weight: 500; }
.guide-heading { font-family: var(--display); font-style: italic; font-weight: 500; font-size: 28px; color: var(--ink); margin: 0 0 18px; }
.copy-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 20px; font-size: 20px; line-height: 1.75; color: var(--ink); font-weight: 500; max-width: 640px; }
.copy-list li { padding-left: 22px; position: relative; }
.copy-list li::before { content: "—"; position: absolute; left: 0; color: var(--ink-dim); }

.legal-accordion summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; }
.legal-accordion summary::-webkit-details-marker { display: none; }
.legal-accordion summary::before { content: "›"; font-family: var(--mono); font-size: 26px; color: var(--ink-dim); width: 1em; display: inline-block; transform: rotate(90deg); transition: transform .15s ease; }
.legal-accordion .legal-heading { margin: 0; }
.legal-accordion summary:hover::before { color: var(--ink); }
.legal-accordion[open] summary::before { transform: rotate(-90deg); }
.legal-accordion .copy-list { margin-top: 20px; }

.submit-heading { font-family: var(--display); font-style: italic; font-size: 28px; color: var(--ink); margin-top: 18px; }
.submit-note { font-family: var(--body); font-size: 16px; line-height: 1.6; color: var(--ink-dim); max-width: 480px; margin-top: 14px; }
/* Never styled in the original mockup — the confirmation only inherited
   .submit-heading/.copy from its children. Giving it real spacing here. */
.submit-confirm { margin-top: 28px; max-width: 480px; }

.contact-block { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--rule); max-width: 480px; }
.contact-email { font-family: var(--body); font-size: 20px; font-weight: 500; letter-spacing: .02em; color: var(--ink); margin-top: 16px; cursor: text; }

.turnstile-block { margin-top: 28px; max-width: 480px; }

form { margin-top: 28px; display: flex; flex-direction: column; gap: 16px; max-width: 480px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-dim); }
.field input, .field textarea {
  font-family: var(--body); font-size: 16px; color: var(--ink); background: var(--panel-2);
  border: 1px solid var(--rule); padding: 10px 12px;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--ink); outline-offset: 1px; }
.field input[type="file"] { font-family: var(--mono); font-size: 13px; padding: 8px 0; border: none; }
button.btn { border: none; cursor: pointer; width: fit-content; }
button.btn:disabled { opacity: .4; cursor: not-allowed; }
.form-note { font-family: var(--mono); font-size: 11px; color: var(--ink-dim); }
.file-hint { font-family: var(--mono); font-size: 11px; color: var(--ink-dim); }
.field-error { font-family: var(--mono); font-size: 11px; color: #c0553f; }

.checkbox-group-label { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-dim); }
.checkbox-row { display: flex; gap: 20px; flex-wrap: wrap; }
.checkbox-label {
  display: flex; align-items: center; gap: 8px; font-family: var(--body); font-size: 15px; color: var(--ink);
  text-transform: none; letter-spacing: normal; cursor: pointer;
}
.checkbox-label input[type="checkbox"] {
  width: 16px; height: 16px; padding: 0; border: 1px solid var(--rule); background: var(--panel-2); accent-color: var(--ink);
}

/* Honeypot — visually hidden via positioning (not display:none, which some
   bots specifically check for and skip), never reachable by tab or a
   screen reader. */
.hp-field { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; overflow: hidden; }

.convert-prompt { border: 1px dashed var(--rule); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.convert-prompt p { margin: 0; font-family: var(--body); font-size: 15px; color: var(--ink); }

.converted-status { border: 1px solid var(--rule); padding: 12px 16px; font-family: var(--mono); font-size: 12px; color: var(--ink); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.link-btn { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; background: none; border: none; padding: 0; color: var(--ink-dim); text-decoration: underline; cursor: pointer; }
.link-btn:hover { color: var(--ink); }

.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.7); z-index: 20;
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.modal {
  background: var(--panel); border: 3px solid var(--border); padding: 36px;
  width: 100%; max-width: 1040px; max-height: 88vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 16px;
}
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.modal-close { background: none; border: none; color: var(--ink); font-size: 26px; line-height: 1; cursor: pointer; padding: 0; }
.modal-close:hover { color: var(--ink-dim); }

.convert-panes { display: flex; gap: 16px; flex-wrap: wrap; }
.convert-pane { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.convert-pane-label { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-dim); }
.convert-textarea {
  width: 100%; min-height: 380px; resize: vertical;
  font-family: var(--mono); font-size: 13px; line-height: 1.6; color: var(--ink);
  background: var(--panel-2); border: 1px solid var(--rule); padding: 14px;
}
.convert-textarea:focus { outline: 2px solid var(--ink); outline-offset: 1px; }
.convert-preview {
  min-height: 380px; max-height: 380px; overflow-y: auto;
  font-family: var(--body); font-size: 17px; line-height: 1.65; color: var(--ink);
  background: var(--panel-2); border: 1px solid var(--rule); padding: 14px 18px;
}
.convert-preview p { margin: 0 0 16px; }
.convert-preview p:last-child { margin-bottom: 0; }
.convert-preview em { font-style: italic; }
.convert-preview strong { font-weight: 700; }
.convert-preview h1, .convert-preview h2, .convert-preview h3 { font-family: var(--display); font-style: italic; font-weight: 500; margin: 0 0 12px; }
.convert-preview blockquote { margin: 0 0 16px; padding-left: 16px; border-left: 2px solid var(--rule); color: var(--ink-dim); }
.modal-actions { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.modal-error { font-family: var(--mono); font-size: 12px; color: #c0553f; }

/* Admin (no design mockup existed for this — kept in the same visual
   language as the public page rather than left unstyled). */
.admin-page { max-width: 1000px; margin: 0 auto; padding: 48px; }
.admin-table { width: 100%; border-collapse: collapse; margin-top: 24px; }
.admin-table th, .admin-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--rule); font-size: 15px; }
.admin-table th { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-dim); }
.admin-toolbar { display: flex; gap: 20px; margin: 20px 0; flex-wrap: wrap; align-items: center; }
.admin-banner { font-family: var(--mono); font-size: 13px; color: var(--ink-dim); }
.flash { font-family: var(--mono); font-size: 13px; padding: 10px 14px; border: 1px solid var(--rule); margin-top: 16px; }

/* No layout media query existed in the mockup at all (only the theme one
   above) — the whole page was a fixed two-column grid with no fallback for
   narrow viewports. This collapses everything to one column and scales
   down the largest fixed sizes, without changing anything above 860px. */
@media (max-width: 860px) {
  .page, .admin-page { padding: 20px; }
  nav .bar { padding: 14px 20px; }
  /* minmax(0, 1fr), not bare 1fr: a grid track's automatic minimum size is
     based on its content's min-content width unless told otherwise, so a
     wide-enough child (the Turnstile widget, here) can still force the
     track past the viewport even though it's nominally "1fr" — a classic
     CSS Grid "blowout". minmax(0, ...) removes that content-based floor. */
  .grid, .grid-row2 { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 28px; }
  .title { font-size: clamp(48px, 14vw, 118px); margin-top: 16px; margin-bottom: 28px; }
  .meta { gap: 24px; }
  .modal { padding: 20px; }
  .convert-panes { flex-direction: column; }
  .convert-textarea, .convert-preview { min-height: 220px; max-height: none; }
  .admin-table { display: block; overflow-x: auto; }
}
