/* unsealday — warm, light, flat "calm report card" theme, inherited from the
   sibling product (aiheardofyou) per spec: same DM Sans, same flat-card/
   pill-button/large-radius recipe, same palette STRUCTURE — but a genuinely
   different accent so the two read as siblings, not a reskin. Sealing wax
   is thematically apt for a "sealed message" product: a deep, cool burgundy
   instead of the sibling's warm terracotta. Colors painted explicitly (one
   committed light theme, no dark variant). */

/* DM Sans — SIL Open Font License 1.1 (https://openfontlicense.org). Source:
   Google Fonts (fonts.google.com/specimen/DM+Sans), latin subset only,
   self-hosted (file copied from the sibling product's already-approved,
   already-downloaded copy — same asset, same license, no new download). */
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
  src: url("fonts/dmsans-variable-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #fdfcfa;
  --surface: #fffefb;
  --surface-raised: #f3edee;
  --border: rgba(122, 37, 64, 0.16);
  --border-strong: rgba(122, 37, 64, 0.34);
  --fg: #232224;
  --fg-muted: #5c565a;
  --fg-subtle: #6d6569;
  --accent: #7a2540;
  --accent-strong: #5e1c31;
  --accent-fg: #ffffff;
  --accent-soft: rgba(122, 37, 64, 0.07);
  --accent-soft-strong: rgba(122, 37, 64, 0.13);
  --danger-bg: #fbeae7;
  --danger-fg: #9a2e26;
  --danger-border: rgba(163, 39, 31, 0.3);
  --success-bg: #e2f2e8;
  --success-fg: #1f7a4d;
  --success-border: rgba(31, 122, 77, 0.3);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --radius-pill: 999px;
  --font: "DM Sans", "Segoe UI", -apple-system, BlinkMacSystemFont,
    "Helvetica Neue", Roboto, Arial, sans-serif, "Apple Color Emoji",
    "Segoe UI Emoji";
}

* {
  box-sizing: border-box;
}

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

html {
  background: var(--bg);
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 20px 16px 64px;
}

a {
  color: var(--accent);
  background-image: linear-gradient(var(--accent), var(--accent));
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 0% 1px;
  transition: background-size 0.2s ease;
}

a:hover,
a:focus-visible {
  background-size: 100% 1px;
}

.brand-mark,
.board-list a,
.guide-cta a.button {
  background-image: none;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---- Header / nav ---- */

header.site {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 14px 0;
  margin-left: -16px;
  margin-right: -16px;
  padding-left: 16px;
  padding-right: 16px;
  background: rgba(253, 252, 250, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

@supports not (backdrop-filter: blur(1px)) {
  header.site {
    background: var(--bg);
  }
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--fg);
}

.brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--accent-soft-strong);
  border: 1px solid var(--border-strong);
  color: var(--accent);
  font-weight: 800;
  font-size: 0.85rem;
}

.site-nav {
  display: flex;
  gap: 16px;
  font-size: 0.9rem;
  font-weight: 600;
}

.site-nav a {
  color: var(--fg-muted);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--accent);
}

/* ---- Hero ---- */

.hero {
  text-align: center;
  margin-bottom: 28px;
}

.hero-glow {
  position: relative;
}

.hero-glow::before {
  content: "";
  position: absolute;
  inset: -32px -16px auto -16px;
  height: 220px;
  background: radial-gradient(
    60% 100% at 50% 20%,
    var(--accent-soft-strong),
    transparent 72%
  );
  pointer-events: none;
}

.hero-glow > * {
  position: relative;
}

.hero.hero-left {
  text-align: left;
}

.hero h1 {
  font-size: clamp(2rem, 8vw, 2.9rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 0 0 14px;
  color: var(--fg);
}

.hero p {
  color: var(--fg-muted);
  font-size: 1.05rem;
  max-width: 60ch;
  margin: 0 auto;
}

.hero.hero-left p {
  margin: 0;
}

/* ---- Seal form ---- */

.seal-form {
  display: grid;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--fg-muted);
  transition: color 0.15s ease;
}

.field-hint {
  font-size: 0.76rem;
  color: var(--fg-subtle);
  margin: 0;
}

.field:focus-within label {
  color: var(--accent);
}

.field input,
.field textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--fg);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.field input {
  min-height: 48px;
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--fg-subtle);
}

.field input:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
  background: var(--surface);
}

.field-footer {
  display: flex;
  justify-content: flex-end;
  font-size: 0.78rem;
  color: var(--fg-subtle);
}

.field-public-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  margin-left: 8px;
}

.field-public-note.public {
  color: var(--accent);
  background: var(--accent-soft);
}

.field-public-note.sealed {
  color: var(--fg-muted);
  background: var(--surface-raised);
}

button {
  font-family: inherit;
}

#submit-btn {
  position: relative;
  overflow: hidden;
  min-height: 50px;
  padding: 14px 24px;
  border-radius: var(--radius-pill);
  border: none;
  background: var(--accent);
  color: var(--accent-fg);
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

#submit-btn:not(:disabled):hover {
  background: var(--accent-strong);
}

#submit-btn:not(:disabled):active {
  transform: translateY(1px);
}

#submit-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.hint {
  font-size: 0.82rem;
  color: var(--fg-subtle);
  margin: 0;
}

/* ---- Turnstile widget ---- */

.turnstile-wrap {
  display: flex;
  justify-content: center;
  min-height: 65px;
}

.turnstile-wrap .cf-turnstile {
  max-width: 100%;
}

/* ---- Banners ---- */

.banner {
  display: none;
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.banner.visible {
  display: block;
}

#error-banner.banner {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: var(--danger-fg);
}

#success-banner.banner {
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  color: var(--success-fg);
}

/* ---- Board tabs / list (shared by /board and the homepage preview) ---- */

.board-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}

.board-tab {
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  color: var(--fg-muted);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  background-image: none;
}

.board-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-fg);
}

.board-tab:not(.active):hover {
  background: var(--accent-soft);
}

.board-empty {
  color: var(--fg-muted);
  padding: 20px 0;
}

.board-list {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: grid;
  gap: 12px;
}

.board-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.board-card a {
  display: block;
  padding: 18px 20px;
  text-decoration: none;
}

.board-card:hover,
.board-card a:focus-visible {
  border-color: var(--border-strong);
  background: var(--accent-soft);
}

.board-card-title {
  margin: 0 0 4px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--fg);
}

.board-card-author {
  margin: 0 0 6px;
  font-size: 0.85rem;
  color: var(--fg-subtle);
}

.board-card-status {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
}

.board-card-meta {
  margin: 4px 0 0;
  font-size: 0.78rem;
  color: var(--fg-subtle);
}

.board-more {
  text-align: center;
}

.board-preview-empty {
  color: var(--fg-muted);
  font-size: 0.92rem;
}

/* ---- Seal detail page (functions/seal/[id].js) ---- */

.seal-view {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 24px;
}

.seal-eyebrow {
  margin: 0 0 6px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
}

.seal-title {
  margin: 0 0 6px;
  font-size: clamp(1.5rem, 6vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--fg);
}

.seal-author {
  margin: 0 0 16px;
  font-size: 0.92rem;
  color: var(--fg-subtle);
}

.seal-countdown {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: var(--radius-md);
  padding: 18px;
  text-align: center;
  margin-bottom: 16px;
}

.seal-locked-note {
  font-size: 0.88rem;
  color: var(--fg-muted);
  margin: 0 0 16px;
}

.seal-body {
  font-size: 1.05rem;
  color: var(--fg);
  white-space: pre-wrap;
  word-wrap: break-word;
  background: var(--surface-raised);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 16px;
}

.seal-meta {
  font-size: 0.8rem;
  color: var(--fg-subtle);
  margin: 0 0 16px;
}

.share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}

.share-actions button {
  min-height: 44px;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--fg);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.share-actions button:hover {
  background: var(--accent-soft);
}

.copy-status {
  font-size: 0.82rem;
  color: var(--fg-muted);
  min-height: 1.2em;
}

/* ---- Footer ---- */

footer.site {
  text-align: center;
  margin-top: 44px;
  font-size: 0.85rem;
  color: var(--fg-subtle);
}

footer.site a {
  color: var(--fg-muted);
}

noscript .noscript-note {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 20px;
  font-size: 0.9rem;
  color: var(--fg-muted);
}

section.block {
  margin-bottom: 30px;
}

section.block h2 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
  color: var(--fg);
}

section.block p {
  color: var(--fg);
}

/* ---- Wider viewports ---- */

@media (min-width: 640px) {
  .wrap {
    max-width: 720px;
    padding-top: 44px;
  }
}
