/* Your Daily Edition — classic newspaper look */

:root {
  --ink: #1c1c1c;
  --ink-soft: #3a372f;
  --muted: #5c574e;
  --faint: #8a8376;
  --rule: #1c1c1c;
  --gold: #c08a3a;
  --gold-rule: #c9b07a;
  --gold-soft: #e8d7b0;
  --paper: #f6f1e6;
  --paper-deep: #efe8d8;
  --sheet: #fbf8f1;
  --line: #ddd6c6;
  --down: #b3261e;
  --up: #1a7a32;
  --shadow: 0 18px 50px rgba(28, 28, 28, 0.14);
  --serif: "Source Serif 4", "Source Serif Pro", "Libre Baskerville", Georgia, "Times New Roman", Times, serif;
  --display: "Playfair Display", Georgia, serif;
  --sc: "Playfair Display SC", "Playfair Display", Georgia, serif;
  --radius: 0;
  --page: 1120px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.55;
  background-color: var(--paper);
  background-image:
    radial-gradient(rgba(28, 28, 28, 0.028) 0.6px, transparent 0.7px),
    linear-gradient(180deg, #f8f4eb 0%, var(--paper) 220px);
  background-size: 3px 3px, 100% 100%;
  min-height: 100%;
}

::selection {
  background: #ead9b0;
  color: var(--ink);
}

img { max-width: 100%; height: auto; display: block; }

[hidden] { display: none !important; }

input::placeholder,
textarea::placeholder,
select:invalid {
  color: var(--faint);
  opacity: 1;
}

input::placeholder,
textarea::placeholder {
  font-style: italic;
}

a {
  color: var(--ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover { color: #6a4a18; }

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--ink);
  color: var(--paper);
  padding: 8px 12px;
  z-index: 100;
}

.skip:focus { top: 12px; }

/* —— Masthead —— */
.wrap {
  width: min(var(--page), calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  padding: 22px 0 0;
}

.toprule,
.bottomrule {
  border-top: 2.5px solid var(--rule);
  border-bottom: 0.7px solid var(--rule);
  height: 6px;
  line-height: 0;
  font-size: 0;
}

.bottomrule {
  margin-top: 8px;
}

.folio {
  text-align: center;
  font-family: var(--sc);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--ink-soft);
  padding: 10px 0 2px;
  margin: 0;
  text-transform: uppercase;
}

.folio .diamond {
  color: var(--gold);
  font-style: normal;
  letter-spacing: 0;
  padding: 0 0.7em;
}

.masthead {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(40px, 8vw, 78px);
  line-height: 0.95;
  text-align: center;
  letter-spacing: -0.015em;
  margin: 0;
  padding: 2px 0 0;
}

.mast-diamond {
  text-align: center;
  color: var(--gold);
  font-size: 14px;
  line-height: 1;
  margin: 6px 0 2px;
}

/* —— Hero —— */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
  padding: 52px 0 28px;
}

.kicker {
  font-family: var(--sc);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--gold);
  font-weight: 700;
  margin: 0 0 12px;
  text-transform: uppercase;
}

.hero h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(30px, 4.2vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
}

.lede {
  font-size: 1.08rem;
  line-height: 1.5;
  color: var(--ink-soft);
  margin: 0 0 28px;
  max-width: 38em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
}

.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sc);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 13px 22px;
  cursor: pointer;
  line-height: 1;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.btn:hover,
.btn:focus-visible {
  background: #2a2418;
  color: var(--paper);
  text-decoration: none;
}

.btn:active { transform: translateY(1px); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  background: var(--paper-deep);
  color: var(--ink);
}

.btn-gold {
  background: var(--gold);
  border-color: #a4732c;
  color: #1c1c1c;
}

.btn-gold:hover,
.btn-gold:focus-visible {
  background: #b57b2f;
  color: #1c1c1c;
}

.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  margin-top: 28px;
}

.btn-row .btn { min-width: 140px; }
.btn-row #next-btn { margin-left: auto; }

/* Sample pages */
.sample {
  position: relative;
  margin: 0 auto;
  width: min(100%, 420px);
  min-height: 460px;
}

.sample-back,
.sample-front {
  background: #fff;
  border: 1px solid #d5ccb8;
  box-shadow: var(--shadow);
}

.sample-back {
  position: absolute;
  inset: 18px 0 auto 28px;
  width: calc(100% - 18px);
  transform: rotate(3.2deg);
  z-index: 0;
}

.sample-front {
  position: relative;
  z-index: 1;
  width: calc(100% - 22px);
  transform: rotate(-1.2deg);
  transition: transform 0.35s ease;
}

.sample:hover .sample-front {
  transform: rotate(-0.4deg) translateY(-4px);
}

.sample figcaption {
  position: relative;
  z-index: 2;
  margin: 18px 0 0;
  font-family: var(--sc);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}

/* —— How it works —— */
.section-rule {
  border: 0;
  border-top: 1px solid var(--gold-rule);
  margin: 8px 0 0;
}

.how {
  padding: 36px 0 12px;
}

.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px 36px;
  padding: 28px 0 8px;
}

.how-item h3 {
  font-family: var(--display);
  font-size: 1.25rem;
  margin: 0 0 8px;
  font-weight: 700;
}

.how-item p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1rem;
}

.num {
  font-family: var(--sc);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--gold);
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}

/* —— Form —— */
.compose {
  padding: 36px 0 64px;
}

.compose-head {
  text-align: center;
  margin: 0 0 28px;
}

.compose-head h2 {
  font-family: var(--display);
  font-size: clamp(28px, 4vw, 40px);
  margin: 0 0 8px;
  font-weight: 700;
}

.compose-head p {
  margin: 0 auto;
  max-width: 36em;
  color: var(--muted);
}

.sheet {
  background: var(--sheet);
  border: 1px solid var(--line);
  box-shadow: 0 8px 30px rgba(28, 28, 28, 0.06);
  padding: 32px 40px 36px;
  max-width: 760px;
  margin: 0 auto;
  min-height: 420px;
  position: relative;
}

.sheet::before,
.sheet::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  height: 1px;
  background: var(--gold-rule);
}

.sheet::before { top: 10px; }
.sheet::after { bottom: 10px; }

/* Progress */
.progress {
  margin: 0 0 32px;
}

.progress-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}

.progress-label {
  font-family: var(--sc);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

.progress-count {
  font-family: var(--sc);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--faint);
  text-transform: uppercase;
}

.track {
  height: 3px;
  background: var(--gold-soft);
  position: relative;
}

.track-fill {
  height: 100%;
  background: var(--gold);
  width: 20%;
  transition: width 0.3s ease;
}

.steps-legend {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin-top: 10px;
  gap: 4px;
}

.steps-legend span {
  font-family: var(--sc);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  text-align: center;
}

.steps-legend span.is-done {
  color: var(--ink-soft);
}
.steps-legend span.is-current {
  color: var(--ink);
  font-weight: 700;
}

.step { display: none; }
.step.is-active { display: block; }

.q-title {
  font-family: var(--display);
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.2;
  margin: 0 0 8px;
  font-weight: 700;
}

.q-help {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 1.02rem;
}

.field {
  margin: 0 0 18px;
}

.field label,
.field-label {
  display: block;
  font-family: var(--sc);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0 0 6px;
  color: var(--ink-soft);
}

.req {
  color: var(--gold);
  margin-left: 4px;
}

input[type="text"],
input[type="email"],
select,
textarea {
  width: 100%;
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid #cfc6b4;
  padding: 11px 12px;
  outline: none;
  border-radius: 0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

textarea { min-height: 88px; resize: vertical; }

input:focus,
select:focus,
textarea:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(192, 138, 58, 0.28);
}

input.is-invalid,
select.is-invalid,
textarea.is-invalid {
  border-color: var(--down);
}

.error {
  display: none;
  color: var(--down);
  font-size: 0.9rem;
  margin: 6px 0 0;
}

.error.is-visible { display: block; }

.hint {
  margin: 6px 0 0;
  font-size: 0.92rem;
  color: var(--faint);
  font-style: italic;
}

/* Sections */
.section-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
}

.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 1px solid var(--line);
  background: #fff;
  padding: 11px 12px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.check:hover { border-color: #b9ae96; }

.check:has(input:checked) {
  border-color: var(--gold);
  background: #fbf6ea;
}

.check:has(input:focus-visible) {
  box-shadow: 0 0 0 3px rgba(192, 138, 58, 0.28);
}

.check input {
  margin-top: 3px;
  accent-color: var(--gold);
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.check span {
  font-size: 1rem;
  line-height: 1.35;
}

/* Time chips */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid #cfc6b4;
  background: #fff;
  padding: 9px 12px;
  cursor: pointer;
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1;
}

.chip:hover { border-color: #b9ae96; }

.chip:has(input:checked) {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.chip:has(input:focus-visible) {
  box-shadow: 0 0 0 3px rgba(192, 138, 58, 0.28);
}

.chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.format-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.format-card {
  display: block;
  border: 1px solid #cfc6b4;
  background: #fff;
  padding: 14px 14px 12px;
  cursor: pointer;
}

.format-card:hover { border-color: #b9ae96; }

.format-card:has(input:checked) {
  border-color: var(--gold);
  background: #fbf6ea;
}

.format-card:has(input:focus-visible) {
  box-shadow: 0 0 0 3px rgba(192, 138, 58, 0.28);
}

.format-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.format-card strong {
  display: block;
  font-family: var(--display);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.format-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.4;
}

.printer-box {
  margin-top: 14px;
  padding: 14px;
  border: 1px dashed var(--gold-rule);
  background: #fffdf8;
}

.printer-box .check {
  border: 0;
  background: transparent;
  padding: 0 0 10px;
}

.details-block {
  display: none;
}

.details-block.is-open { display: block; }

.details-empty {
  display: none;
  padding: 8px 0 6px;
  color: var(--muted);
  font-style: italic;
}

.details-empty.is-visible { display: block; }

/* Confirmation */
.confirm {
  display: none;
  text-align: left;
}

.confirm.is-visible { display: block; }

.confirm h2 {
  font-family: var(--display);
  font-size: clamp(28px, 4vw, 40px);
  margin: 8px 0 10px;
}

.confirm .lede { margin-bottom: 22px; }

.summary {
  border-top: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
  padding: 14px 0 8px;
  margin: 0 0 24px;
}

.summary dl {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 8px 20px;
  margin: 0;
}

.summary dt {
  font-family: var(--sc);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 3px;
}

.summary dd {
  margin: 0;
  font-size: 1.02rem;
}

.summary .paper-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.35rem;
}

.form-status {
  min-height: 1.2em;
  margin: 8px 0 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.form-status.is-error { color: var(--down); }

/* Footer */
.site-footer {
  padding: 0 0 40px;
}

.site-footer .wrap {
  padding-top: 16px;
}

.site-footer p {
  margin: 0;
  text-align: center;
  font-family: var(--sc);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.7;
}

/* —— Responsive —— */
@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 36px;
    padding-top: 36px;
  }

  .sample {
    width: min(100%, 340px);
    min-height: 380px;
  }

  .how-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .sheet {
    padding: 24px 20px 28px;
    min-height: 0;
  }

  .format-grid,
  .section-grid {
    grid-template-columns: 1fr;
  }

  .summary dl {
    grid-template-columns: 1fr;
    gap: 2px 0;
  }

  .summary dt { padding-top: 8px; }
  .summary dt:first-child { padding-top: 0; }

  .steps-legend span:nth-child(n+4) {
    letter-spacing: 0.08em;
  }
}

@media (max-width: 480px) {
  .wrap { width: min(var(--page), calc(100% - 28px)); }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-actions .btn { width: 100%; }

  .masthead { font-size: 42px; }

  .folio { font-size: 9px; letter-spacing: 0.14em; }

  .chip { padding: 10px 11px; font-size: 0.95rem; }

  .btn-row .btn { flex: 1 1 auto; min-width: 0; }

  .steps-legend span { font-size: 8px; letter-spacing: 0.06em; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sample-front,
  .track-fill,
  .btn { transition: none; }
}

/* New fields — custom section, custom time, printer help, example, notes */
.label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 6px;
}

.label-row label { margin-bottom: 0; }

.help-toggle {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  font-family: var(--sc);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  line-height: 1.3;
  text-align: right;
}

.help-toggle:hover,
.help-toggle:focus-visible {
  color: #6a4a18;
  outline: none;
}

.help-panel {
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px dashed var(--gold-rule);
  background: #fffdf8;
  font-size: 0.95rem;
  color: var(--ink-soft);
  line-height: 1.45;
}

.help-panel p { margin: 0 0 8px; }
.help-panel p:last-child { margin-bottom: 0; }
.help-panel ol {
  margin: 0 0 8px;
  padding-left: 1.25em;
}
.help-panel li { margin: 0 0 4px; }

.custom-time-field {
  margin-top: 14px;
  padding: 12px 14px 4px;
  border: 1px dashed var(--gold-rule);
  background: #fffdf8;
}

.custom-time-field[hidden] { display: none !important; }

input[type="time"] {
  width: auto;
  min-width: 11em;
  max-width: 100%;
}

.example-box {
  padding: 14px;
  border: 1px solid var(--line);
  background: #fff;
}

.example-box .check {
  border: 0;
  background: transparent;
  padding: 0;
}

#block-custom-section {
  margin-top: 16px;
}

#block-custom-section.is-open,
#block-market-timing.is-open { display: block; }

@media (max-width: 860px) {
  .label-row { flex-wrap: wrap; }
}

#section-grid .check:has(#customSectionCheck) {
  grid-column: 1 / -1;
}


/* Netlify Forms honeypot — hidden from people, present for bots */
.netlify-honeypot {
  position: absolute !important;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}


/* —— Edit / cancel pages —— */
.mast-link {
  color: inherit;
  text-decoration: none;
}
.mast-link:hover { color: inherit; text-decoration: none; }

.edit-page { padding-top: 36px; }

.changes-box { min-height: 160px; }

.optional {
  font-family: var(--serif);
  font-size: 0.85rem;
  letter-spacing: 0;
  text-transform: none;
  font-style: italic;
  color: var(--faint);
  font-weight: 400;
}

input[type="email"].is-readonly,
input[readonly].is-readonly {
  background: #f3efe4;
  color: var(--ink-soft);
}

.suggest-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.suggest-chip {
  appearance: none;
  display: inline-flex;
  align-items: center;
  border: 1px solid #cfc6b4;
  background: #fff;
  padding: 8px 12px;
  cursor: pointer;
  font-family: var(--serif);
  font-size: 0.95rem;
  line-height: 1.2;
  color: var(--ink);
  border-radius: 0;
}

.suggest-chip:hover,
.suggest-chip:focus-visible {
  border-color: var(--ink);
  outline: none;
  box-shadow: 0 0 0 3px rgba(192, 138, 58, 0.28);
}

.suggest-chip.is-used {
  border-color: var(--gold);
  background: #fbf6ea;
}

.edit-cancel-link {
  margin: 22px 0 0;
  text-align: center;
  font-size: 1rem;
  color: var(--muted);
}

.edit-page .sheet { min-height: 0; }

.footer-note {
  margin: 10px 0 0 !important;
  text-align: center;
  font-family: var(--serif) !important;
  font-size: 0.95rem !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  color: var(--muted);
  line-height: 1.45 !important;
}

.footer-note a { color: var(--ink); }
