/* Signature · Mono Editorial. All visual rules are isolated from Light and Dark. */
@font-face {
  font-family: '0815 Editorial'; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url('./fonts/CormorantGaramond.woff2') format('woff2');
}
@font-face {
  font-family: '0815 Script'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('./fonts/GreatVibes.woff2') format('woff2');
}
html[data-theme="signature"] {
  color-scheme: dark;
  --surface-page: #171716;
  --surface-paper: #252523;
  --surface-input: #30302d;
  --surface-soft: #363633;
  --text-primary: #eeece4;
  --text-muted: #b7b7ae;
  --border-subtle: #4c4c47;
  --border-control: #92928a;
  --accent: #eeece4;
  --accent-soft: #454540;
  --accent-hover: #d9d7ce;
  --color-danger: #d5c9bd;
  --color-danger-hover: #e6dad0;
  --display-font: '0815 Editorial', Georgia, serif;
  --signature-script: '0815 Script', cursive;
  --radius-control: 4px;
  --radius-surface: 5px;
  --content-width: 920px;
  --motion-duration: 140ms;
  --shadow-overlay: 0 3px 8px rgb(0 0 0 / .25), 0 14px 36px rgb(0 0 0 / .2);
}
html[data-theme="signature"] .app-header { min-height: 96px; }
html[data-theme="signature"] .brand-button { font-size: 2.25rem; font-weight: 600; letter-spacing: -.035em; }
html[data-theme="signature"] .focus-title {
  font-size: clamp(1.75rem, 3vw, 2.125rem); font-weight: 600; line-height: 1.08; letter-spacing: .015em;
}
html[data-theme="signature"] .signature-heading-script { display: none; }
html[data-theme="signature"] .app-header[data-section="notes"] {
  grid-template-rows: 48px auto auto; row-gap: 0; padding-bottom: 1.5rem;
}
html[data-theme="signature"] .app-header[data-section="notes"] #backButton { grid-column: 1; grid-row: 1; }
html[data-theme="signature"] .app-header[data-section="notes"] .header-menu-wrap { grid-column: 3; grid-row: 1; }
html[data-theme="signature"] .app-header[data-section="notes"] .focus-title {
  grid-column: 1 / -1; grid-row: 2; text-align: center; margin-top: .75rem;
  font-size: clamp(3.125rem, 7vw, 4rem); font-weight: 600; line-height: .95;
  text-transform: uppercase; letter-spacing: -.04em;
}
html[data-theme="signature"] .app-header[data-section="notes"] .signature-heading-script {
  display: block; grid-column: 1 / -1; grid-row: 3; justify-self: center;
  font-family: var(--signature-script); font-size: clamp(3rem, 6vw, 3.625rem);
  font-weight: 400; line-height: 1.1; margin-top: -.45rem; padding-left: 1.25rem;
  color: var(--text-primary); pointer-events: none;
}
html[data-theme="signature"] .home-accordion:first-of-type > summary {
  font-size: clamp(2.125rem, 4vw, 2.5rem); font-weight: 600; letter-spacing: -.025em;
  min-height: 72px; padding: .75rem 0; line-height: 1.1;
}
html[data-theme="signature"] .home-accordion > summary { font-size: 1rem; font-weight: 400; min-height: 64px; }
html[data-theme="signature"] .note-tile { padding: 1.5rem 0 2rem; gap: .75rem; }
html[data-theme="signature"] .note-tile::before { display: none; }
html[data-theme="signature"] .note-tile strong { font-family: var(--display-font); font-weight: 500; margin: 0; max-width: 32ch; }
html[data-theme="signature"] .note-tile strong.note-brief { font-size: clamp(2.375rem, 4.5vw, 3rem); line-height: 1.15; max-width: 23ch; letter-spacing: -.025em; }
html[data-theme="signature"] .note-tile strong.note-prose { font-size: 1.625rem; line-height: 1.4; }
html[data-theme="signature"] .note-eyebrow { text-transform: uppercase; font-size: .875rem; letter-spacing: .12em; }
html[data-theme="signature"] .helper-tile,
html[data-theme="signature"] #nowRows .helper-tile {
  min-height: 146px; padding: 1.125rem; background: var(--surface-soft); border: 1px solid #62625b;
  border-top-color: #85857c; border-radius: 5px; gap: 1.5rem; box-shadow: 0 3px 8px rgb(0 0 0 / .14);
}
html[data-theme="signature"] .helper-tile::after { display: none; }
html[data-theme="signature"] .helper-tile strong { font-size: 1.75rem; line-height: 1.1; font-weight: 600; padding: 0; letter-spacing: -.01em; }
html[data-theme="signature"] .helper-tile span { color: #cecec3; }
html[data-theme="signature"] .focus-view { padding-top: 1.5rem; }
html[data-theme="signature"] #readHost:has(> .notes-day) { max-width: 712px; }
html[data-theme="signature"] .notes-day > .section-title,
html[data-theme="signature"] .read-person-group > .section-title {
  display: flex; gap: 1rem; align-items: center; margin: 0 0 1.125rem;
  font-family: var(--interface-font); font-size: .875rem; line-height: 1.5; font-weight: 500;
  text-transform: uppercase; letter-spacing: .12em; color: var(--text-primary);
}
html[data-theme="signature"] .notes-day > .section-title::after {
  content: ''; height: 1px; flex: 1; background: var(--border-subtle);
}
html[data-theme="signature"] .notes-day + .notes-day,
html[data-theme="signature"] .read-person-group + .read-person-group { margin-top: 3rem; }
html[data-theme="signature"] .notes-day .read-list li + li,
html[data-theme="signature"] .notes-day li:has(.note-prose) + li,
html[data-theme="signature"] .notes-day li + li:has(.note-prose) { margin-top: .75rem; }
html[data-theme="signature"] .note-read-button {
  grid-template-columns: 2.75rem minmax(0, 1fr); gap: 1rem; align-items: baseline;
  padding: 1.125rem 1.25rem; border: 1px solid var(--border-subtle); border-radius: 4px;
  background: var(--surface-paper); color: var(--text-primary);
}
html[data-theme="signature"] .note-read-content { gap: .625rem; }
html[data-theme="signature"] .note-copy { font-size: 1.625rem; font-weight: 500; line-height: 1.4; max-width: 40ch; letter-spacing: 0; }
html[data-theme="signature"] .note-copy.note-brief { font-size: 1.875rem; line-height: 1.25; max-width: 28ch; }
html[data-theme="signature"] .note-copy.note-prose { font-size: 1.5rem; line-height: 1.5; max-width: 46ch; }
html[data-theme="signature"] .note-read-context { letter-spacing: .015em; color: var(--text-muted); }
/* One recent thought receives the light paper plane; no saturated accent surface. */
html[data-theme="signature"] .notes-day:first-of-type li:first-child .note-read-button,
html[data-theme="signature"] .note-detail {
  --text-primary: #252522; --text-muted: #61615a; --surface-paper: #e8e6de;
  --surface-soft: #dcdad2; --border-subtle: #c6c4ba; --accent: #252522;
  --color-danger: #45453e; --color-danger-hover: #252522;
  background: var(--surface-paper); color: var(--text-primary); border-color: #d0cec5;
  box-shadow: 0 5px 20px rgb(0 0 0 / .18);
}
html[data-theme="signature"] .notes-day:first-of-type li:first-child .note-copy.note-brief {
  font-size: clamp(2.125rem, 4vw, 2.5rem); line-height: 1.2; max-width: 25ch;
}
html[data-theme="signature"] .note-detail { margin: 0; padding: 2rem; max-width: 640px; border-radius: 5px; }
html[data-theme="signature"] .note-detail > .note-text { margin-bottom: 1.75rem; }
html[data-theme="signature"] .note-detail > .note-text.note-brief { font-size: clamp(2.5rem, 5vw, 3rem); line-height: 1.1; max-width: 22ch; }
html[data-theme="signature"] .note-detail > .note-text.note-prose { font-size: 1.625rem; line-height: 1.45; }
html[data-theme="signature"] .note-dates { margin-left: 0; }
html[data-theme="signature"] .note-context-summary { margin: 1.75rem 0 0; padding-top: 1rem; border-top: 1px solid var(--border-subtle); }
html[data-theme="signature"] .note-context-summary .note-eyebrow { text-transform: none; font-weight: 500; letter-spacing: .02em; }
html[data-theme="signature"] .note-actions { margin-top: 2rem; }
html[data-theme="signature"] .note-edit textarea { max-width: none; padding: .75rem; border: 1px solid var(--border-control); border-radius: 4px; background: var(--surface-paper); }
html[data-theme="signature"] .note-edit textarea:focus-visible { outline: 3px solid var(--text-primary); outline-offset: 4px; box-shadow: none; }
html[data-theme="signature"] #painAreaForm legend,
html[data-theme="signature"] #painEntryForm legend { font-size: clamp(2.5rem, 5vw, 3.25rem); line-height: 1.08; font-weight: 500; max-width: 24ch; letter-spacing: -.02em; }
html[data-theme="signature"] .pain-question-hint { font-size: .875rem; }
html[data-theme="signature"] .pain-signature-value { display: flex; align-items: baseline; gap: 1rem; margin: 0 0 1.5rem; }
html[data-theme="signature"] .pain-value-number { font-family: var(--display-font); font-size: 4.75rem; font-weight: 500; line-height: 1; font-variant-numeric: lining-nums tabular-nums; }
html[data-theme="signature"] .pain-signature-value > span { font-size: .875rem; color: var(--text-muted); }
html[data-theme="signature"] .pain-number { position: relative; min-height: 54px; padding: .5rem 0; border: 1px solid var(--border-control); border-radius: 4px; background: var(--surface-soft); }
html[data-theme="signature"] .pain-number input { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; margin: 0; opacity: 0; cursor: pointer; }
html[data-theme="signature"] .pain-number span { font-family: var(--interface-font); font-size: 1.25rem; }
html[data-theme="signature"] .pain-number:has(input:checked) { background: var(--text-primary); border-color: var(--text-primary); color: var(--surface-page); }
html[data-theme="signature"] .pain-choice:focus-within { outline: 3px solid var(--text-primary); outline-offset: 4px; }
html[data-theme="signature"] .pain-areas .pain-choice { border-bottom: 1px solid var(--border-control); }
html[data-theme="signature"] .pain-confirmation-title::before { background: var(--border-control); }
html[data-theme="signature"] .settings-block summary { font-family: var(--display-font); font-weight: 600; font-size: 1.625rem; }
html[data-theme="signature"] .action-footer { background: var(--surface-page); }
html[data-theme="signature"] .action-footer button span:last-child { letter-spacing: .04em; }
html[data-theme="signature"] .danger { color: var(--surface-page); }
@media (hover: hover) {
  html[data-theme="signature"] .helper-tile:hover:not(:disabled),
  html[data-theme="signature"] #nowRows .helper-tile:hover:not(:disabled) { background: #42423d; border-color: var(--border-control); }
  html[data-theme="signature"] .note-read-button:hover:not(:disabled) { background: #30302d; color: var(--text-primary); }
  html[data-theme="signature"] .notes-day:first-of-type li:first-child .note-read-button:hover:not(:disabled) { background: #f1efe7; color: var(--text-primary); }
  html[data-theme="signature"] .note-read-button:hover .note-copy { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .15em; }
  html[data-theme="signature"] .note-tile:hover:not(:disabled) { color: var(--text-primary); }
  html[data-theme="signature"] .pain-number:hover { background: #454540; }
  html[data-theme="signature"] .pain-number:has(input:checked):hover { background: var(--accent-hover); }
}
@media (max-width: 560px) {
  html[data-theme="signature"] .app-header { min-height: 80px; }
  html[data-theme="signature"] .focus-view { padding-top: 1.25rem; }
  html[data-theme="signature"] .helper-tile,
  html[data-theme="signature"] #nowRows .helper-tile { min-height: 140px; padding: 1rem; }
  html[data-theme="signature"] .note-read-button { padding: 1rem; grid-template-columns: minmax(0, 1fr); gap: .625rem; }
  html[data-theme="signature"] .notes-day:first-of-type li:first-child .note-read-button { grid-template-columns: minmax(0, 1fr); gap: .625rem; padding: 1.25rem; }
  html[data-theme="signature"] .note-detail { padding: 1.5rem; }
}
@media (max-width: 360px) {
  html[data-theme="signature"] .note-read-button { grid-template-columns: minmax(0, 1fr); gap: .625rem; }
}
@media (prefers-reduced-motion: reduce) {
  html[data-theme="signature"] *, html[data-theme="signature"] *::before,
  html[data-theme="signature"] *::after { transition: none !important; animation: none !important; }
  html[data-theme="signature"] button:active,
  html[data-theme="signature"] .pain-choice:active { transform: none !important; }
}
@media (forced-colors: active) {
  html[data-theme="signature"] .pain-number:has(input:checked) { border: 3px solid Highlight; }
  html[data-theme="signature"] .pain-number input { opacity: 1; position: static; width: 20px; height: 20px; }
}
