/* Mira: same build as Q. White page, black bold caps, numbered rows with hairlines,
   one big thing per page. Mira's own logo, colours and font replace the tokens below
   when they arrive (Underlag/Mira-design). */
:root {
  --bg: #ffffff;
  --ink: #000000;
  --mute: #8a8a8a;
  --line: #e2e2e2;
  --accent: #000000;   /* Mira's colour goes here */
  --warn: #e00000;
  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --gutter: max(24px, env(safe-area-inset-left, 0px));
  color-scheme: light;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 700 13px/1.45 var(--font);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

header {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: baseline; gap: 28px; flex-wrap: wrap;
  padding: calc(env(safe-area-inset-top, 0px) + 22px) var(--gutter) 14px;
  background: var(--bg);
}
.logo { font-size: 20px; letter-spacing: -0.01em; }
.logo img { height: 22px; width: auto; display: block; }
nav { display: flex; gap: 20px; }
nav a { color: var(--mute); }
nav a.on { color: var(--ink); }

main {
  padding: 28px var(--gutter) calc(env(safe-area-inset-bottom, 0px) + 80px);
  max-width: 820px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 14px;
}

a, button, label.btn {
  color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit;
  text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer;
}
a:hover, button:hover, label.btn:hover { opacity: 0.55; }
button:disabled { color: var(--mute); cursor: default; opacity: 1; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
p { margin: 0; }
[hidden] { display: none !important; }

.grey, .label { color: var(--mute); }
.label { font-size: 11px; letter-spacing: 0.14em; margin-top: 22px; }
.small { font-size: 11px; }
.plain { text-transform: none; letter-spacing: 0.01em; font-weight: 400; }
.warn { color: var(--warn); }
.num { font-variant-numeric: tabular-nums; }

.big { font-size: clamp(64px, 16vw, 120px); line-height: 0.9; letter-spacing: -0.04em; margin: 0; }
.title { font-size: 15px; margin: 0; }
.date { font-size: clamp(40px, 10vw, 72px); line-height: 0.92; letter-spacing: -0.03em; margin: 0; }
.lede { max-width: 46ch; }

.row { display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: baseline; }
.actions { margin-top: 6px; }
.actions .on { color: var(--ink); }

/* Numbered rows with hairlines */
.rows { list-style: none; margin: 0; padding: 0; counter-reset: row; width: 100%; }
.rows > li {
  counter-increment: row;
  display: grid; grid-template-columns: 30px 1fr auto; gap: 2px 12px; align-items: baseline;
  padding: 11px 0; border-top: 1px solid var(--line);
}
.rows > li:last-child { border-bottom: 1px solid var(--line); }
.rows > li::before { content: counter(row, decimal-leading-zero); color: var(--mute); font-size: 11px; font-variant-numeric: tabular-nums; }
.rows .main { min-width: 0; overflow-wrap: anywhere; }
.rows .sub { display: block; color: var(--mute); font-size: 12px; text-transform: none; letter-spacing: 0.01em; font-weight: 400; margin-top: 2px; }
.rows .end { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; display: flex; gap: 14px; justify-content: flex-end; }
.rows > li.off .main > :first-child { color: var(--mute); }
.rows > li.done .main > :first-child { text-decoration: line-through; color: var(--mute); }
.rows.plainrows > li { grid-template-columns: 1fr auto; }
.rows.plainrows > li::before { content: none; }

/* Forms */
.form { display: grid; grid-template-columns: 1fr; gap: 16px; width: 100%; max-width: 560px; justify-items: stretch; }
.form > button, .form > .row { justify-self: start; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field > span { color: var(--mute); font-size: 11px; letter-spacing: 0.14em; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.three { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
input[type="text"], input[type="date"], input[type="number"], input[type="password"], textarea, select {
  font: inherit; letter-spacing: 0.01em; text-transform: none; color: var(--ink);
  border: 0; border-bottom: 1px solid var(--ink); border-radius: 0; padding: 6px 0;
  width: 100%; background: transparent; -webkit-appearance: none; appearance: none;
}
textarea { resize: vertical; min-height: 5.5em; font-weight: 400; }
input::placeholder, textarea::placeholder { color: var(--mute); }
input:focus, textarea:focus, select:focus { outline: none; border-bottom-width: 2px; }

.drop {
  width: 100%; padding: 36px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink);
  display: flex; flex-direction: column; gap: 6px; cursor: pointer;
}
body.dragging .drop { background: var(--ink); color: var(--bg); }

.shot { max-width: min(100%, 360px); border: 1px solid var(--line); display: block; }
.mail { border-top: 1px solid var(--ink); padding-top: 20px; width: 100%; }
.error { color: var(--warn); max-width: 52ch; }
.dots::after { content: ""; animation: dots 1.4s steps(4) infinite; }
@keyframes dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }

@media (max-width: 560px) {
  header { gap: 18px; }
  nav { gap: 16px; }
  .three { grid-template-columns: 1fr 1fr; }
  .rows .end { flex-direction: column; gap: 4px; align-items: flex-end; }
}
