/* ===========================================================
 *  mauraverse v2
 *  No dashboards. No surveillance. No theater.
 *  Just a page made for a friend.
 * =========================================================== */

:root {
  /* warm earthen palette — quieter than v1 */
  --paper:        #FBF7F0;
  --paper-warm:   #F4EEE3;
  --paper-deep:   #ECE3D2;

  --ink:          #2A2826;
  --ink-soft:     #5C5852;
  --muted:        #908A80;
  --whisper:      #BCB5A8;

  --line:         #E0D8CB;
  --line-soft:    #ECE6DA;

  --sage:         #6B8A6E;       /* used sparingly */
  --sage-deep:    #4A6E4C;
  --terra:        #B87B6A;       /* used sparingly */
  --terra-deep:   #8E5A4B;

  --good:         #4A8C6A;
  --warn:         #B88B45;

  /* type scale */
  --t-tiny:    13px;
  --t-meta:    15px;
  --t-body:    18px;
  --t-lede:    21px;
  --t-h4:      22px;
  --t-h3:      26px;
  --t-h2:      30px;
  --t-h1:      36px;

  /* spacing */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 20px; --s-6: 24px; --s-8: 32px; --s-10: 40px;
  --s-12: 48px; --s-16: 64px;

  --r-sm: 6px; --r-md: 10px; --r-lg: 14px;
  --maxw: 680px;
  --gutter: 22px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:      #1A1815;
    --paper-warm: #14120F;
    --paper-deep: #0E0C0A;
    --ink:        #F0EAE0;
    --ink-soft:   #C8C0B3;
    --muted:      #8B8579;
    --whisper:    #5C574F;
    --line:       #2D2A26;
    --line-soft:  #232017;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
button, input, select, textarea {
  font: inherit; color: inherit; background: transparent; border: 0;
}
button { cursor: pointer; }
img, svg { max-width: 100%; height: auto; display: block; }

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: 'Atkinson Hyperlegible', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: var(--t-body);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--ink);
  font-variation-settings: "opsz" 144;
}
h2 { font-size: var(--t-h2); margin-bottom: var(--s-3); }
h3 { font-size: var(--t-h4); margin-bottom: var(--s-2); }

p { margin: 0 0 var(--s-3); color: var(--ink-soft); }

a {
  color: var(--ink);
  border-bottom: 1px solid var(--whisper);
  text-decoration: none;
  transition: border-color 120ms ease;
}
a:hover { border-bottom-color: var(--ink); }
.quiet-link {
  color: var(--muted);
  border-bottom-style: dotted;
  font-size: var(--t-meta);
}
.quiet-link:hover { color: var(--ink); border-bottom-color: var(--ink); }

.mono {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.92em;
}

/* ----- layout ----- */
.page {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: var(--s-8) var(--gutter) var(--s-16);
}

@media (min-width: 720px) {
  .page { padding-top: var(--s-12); }
}

/* ----- header ----- */
.page-label {
  font-family: 'Fraunces', serif;
  font-size: var(--t-meta);
  font-style: italic;
  color: var(--terra);
  margin: 0 0 var(--s-8);
  letter-spacing: 0.01em;
}

/* ----- the note (above the fold, the whole first screen) ----- */
.note {
  margin-bottom: var(--s-12);
}
.note p {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: var(--t-h4);
  line-height: 1.45;
  color: var(--ink);
  margin: 0 0 var(--s-3);
  font-variation-settings: "opsz" 96;
}
.note p:first-child {
  font-size: var(--t-h2);
  font-style: italic;
  color: var(--terra-deep);
  margin-bottom: var(--s-4);
}
.note .sig {
  font-style: italic;
  color: var(--muted);
  font-size: var(--t-body);
  margin-top: var(--s-4);
}

/* ----- generic block ----- */
.block {
  margin-bottom: var(--s-12);
}
.block + .block {
  padding-top: var(--s-8);
  border-top: 1px solid var(--line-soft);
}
.block-prompt {
  font-size: var(--t-meta);
  color: var(--muted);
  margin-bottom: var(--s-5);
  line-height: 1.5;
}

/* ----- drop me stuff ----- */
.drop-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-2);
  margin-bottom: var(--s-3);
}
.drop-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: var(--s-4) var(--s-2);
  background: var(--paper-warm);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  color: var(--ink);
  font-size: var(--t-meta);
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  min-height: 80px;
  transition: background 120ms ease;
}
.drop-btn:hover {
  background: var(--paper-deep);
  border-color: var(--whisper);
}
.drop-btn { border-bottom-color: var(--line); }
.drop-icon { font-size: 24px; line-height: 1; }
input[type="file"] { display: none; }

.drop-textarea {
  width: 100%;
  min-height: 80px;
  padding: var(--s-3) var(--s-4);
  background: var(--paper-warm);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  font-family: inherit;
  font-size: var(--t-body);
  resize: vertical;
}
.drop-textarea:focus {
  outline: 2px solid var(--sage);
  outline-offset: -1px;
  border-color: var(--sage);
}
.drop-saved {
  font-size: var(--t-tiny);
  color: var(--good);
  margin-top: var(--s-1);
  height: 16px;
  opacity: 0;
  transition: opacity 200ms ease;
}
.drop-saved.show { opacity: 1; }
.drop-footnote {
  font-size: var(--t-meta);
  color: var(--muted);
  margin-top: var(--s-4);
  line-height: 1.5;
}

/* ----- facts table ----- */
.facts {
  margin: 0;
}
.fact-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-1);
  padding: var(--s-3) 0;
  border-bottom: 1px dashed var(--line-soft);
}
.fact-row:last-child { border-bottom: 0; }
.fact-row dt {
  font-size: var(--t-tiny);
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.fact-row dd {
  margin: 0;
  font-size: var(--t-body);
  color: var(--ink);
  line-height: 1.5;
}
.fact-row dd strong {
  color: var(--terra-deep);
  font-weight: 600;
}
@media (min-width: 600px) {
  .fact-row {
    grid-template-columns: 200px 1fr;
    gap: var(--s-4);
    align-items: baseline;
  }
}

/* ----- work checklist ----- */
.work-group {
  margin-bottom: var(--s-6);
}
.work-group h3 {
  display: flex;
  align-items: baseline;
  gap: var(--s-3);
  margin-bottom: var(--s-3);
  font-size: var(--t-h4);
  color: var(--ink);
}
.work-group h3 .when {
  font-family: 'JetBrains Mono', monospace;
  font-size: var(--t-tiny);
  color: var(--terra-deep);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: color-mix(in oklab, var(--terra) 15%, transparent);
  padding: 2px 8px;
  border-radius: var(--r-sm);
}
.checklist {
  margin: 0;
}
.checklist li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: var(--s-2);
  padding: var(--s-2) 0;
  font-size: var(--t-body);
  line-height: 1.5;
  align-items: baseline;
}
.checklist li .mark {
  font-family: 'JetBrains Mono', monospace;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.2;
}
.checklist li.status-done {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: var(--whisper);
  text-decoration-thickness: 1px;
}
.checklist li.status-done .mark { color: var(--good); }
.checklist li.status-doing .mark { color: var(--terra); }
.checklist li.status-todo .mark { color: var(--whisper); }

/* ----- drafts (collapsible) ----- */
.draft {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  margin-bottom: var(--s-2);
  background: var(--paper);
  overflow: hidden;
}
.draft summary {
  list-style: none;
  cursor: pointer;
  padding: var(--s-3) var(--s-4);
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--t-body);
  color: var(--ink);
}
.draft summary::-webkit-details-marker { display: none; }
.draft summary::after {
  content: "↓";
  margin-left: auto;
  color: var(--muted);
  font-size: 13px;
  transition: transform 200ms ease;
}
.draft[open] summary::after { transform: rotate(180deg); }
.draft-icon { font-size: 18px; line-height: 1; }
.draft-body {
  padding: 0 var(--s-4) var(--s-4);
  border-top: 1px dashed var(--line-soft);
  margin-top: var(--s-2);
  padding-top: var(--s-3);
}
.draft-meta {
  font-size: var(--t-meta);
  color: var(--ink-soft);
  margin-bottom: var(--s-3);
}
.draft-cta {
  margin: 0;
}

/* ----- ask blocks ----- */
.ask-from-michael {
  background: var(--paper-warm);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: var(--s-4);
  margin-bottom: var(--s-3);
}
.ask-q {
  font-size: var(--t-body);
  color: var(--ink);
  margin-bottom: var(--s-3);
  line-height: 1.5;
}
.ask-reply {
  width: 100%;
  min-height: 60px;
  padding: var(--s-2) var(--s-3);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-family: inherit;
  font-size: var(--t-meta);
  resize: vertical;
}
.ask-reply:focus {
  outline: 2px solid var(--sage);
  outline-offset: -1px;
}

.ask-area {
  width: 100%;
  min-height: 100px;
  padding: var(--s-3) var(--s-4);
  background: var(--paper-warm);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  font-family: inherit;
  font-size: var(--t-body);
  margin-bottom: var(--s-3);
}
.ask-area:focus {
  outline: 2px solid var(--sage);
  outline-offset: -1px;
}
.ask-status {
  margin-left: var(--s-3);
  font-size: var(--t-tiny);
  color: var(--muted);
}

/* ----- buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--t-meta);
  font-weight: 500;
  padding: var(--s-2) var(--s-5);
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--r-sm);
  min-height: 40px;
  border: 1px solid var(--ink);
  transition: background 120ms ease;
}
.btn:hover { background: var(--ink-soft); border-color: var(--ink-soft); }

/* ----- privacy (quiet block) ----- */
.block.quiet {
  background: var(--paper-warm);
  padding: var(--s-5);
  border-radius: var(--r-md);
  border-top: 1px solid var(--line-soft);
}
.block.quiet h3 {
  font-size: var(--t-body);
  color: var(--ink-soft);
  margin-bottom: var(--s-3);
  font-family: inherit;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.block.quiet p {
  font-size: var(--t-meta);
  color: var(--ink-soft);
  margin-bottom: var(--s-3);
  line-height: 1.55;
}
.quiet-meta {
  color: var(--muted) !important;
  font-style: italic;
  margin-bottom: 0 !important;
}

/* ----- footer ----- */
.page-foot {
  margin-top: var(--s-16);
  padding-top: var(--s-6);
  border-top: 1px solid var(--line-soft);
  text-align: center;
}
.foot-mark {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: var(--t-meta);
  color: var(--muted);
  margin-bottom: var(--s-2);
}
.foot-meta {
  font-size: var(--t-tiny);
  color: var(--whisper);
  margin: 0;
}

/* ----- accessibility ----- */
:focus-visible {
  outline: 2px solid var(--sage);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}
.skip-link {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  position: static;
  width: auto;
  height: auto;
  padding: var(--s-3);
  background: var(--sage-deep);
  color: var(--paper);
  text-decoration: none;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
