/* Mike 2.0 mobile, its first feature Notes: cover screen first (260 to 280 CSS pixels wide), the inner screen (about 590 by 740) adds the
   list and the open note side by side from 520 pixels up. Mike 2.0 green on black. */
@font-face { font-family: "Mike Inter"; src: url("fonts/inter-800-latin.woff2") format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }
:root {
  --bg: #000; --panel: #0a110a; --panel-2: #112011; --text: #c9f5c9; --muted: #7fb07f; --line: #1f3d1f;
  --accent: #39ff14; --accent-text: #021402; --glow: rgba(57, 255, 20, .45); --soft: #0f2c0f; --warn-bg: #2a2208; --warn-line: #8a6a10; --warn-text: #ffd36b;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 15px/1.4 var(--font); }
body { overscroll-behavior: none; -webkit-tap-highlight-color: transparent; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

.app { height: 100%; display: flex; flex-direction: column; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
.abar { flex: none; display: flex; align-items: center; gap: 6px; padding: 6px 8px 6px 12px; border-bottom: 1px solid var(--line); min-height: 52px; }
.ttl { flex: 1; min-width: 0; margin: 0; font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* the Mike 2.0 logo, as the console draws it: the word over the 2.0 capsule, whose light is a small phone here */
.logo { --s: .4; display: inline-flex; flex-direction: column; align-items: flex-end; color: var(--accent); line-height: 1; vertical-align: middle; }
.logo .word { font: 800 calc(64px * var(--s)) / .9 "Mike Inter", var(--font); letter-spacing: calc(-2px * var(--s)); text-shadow: 0 0 calc(6px * var(--s)) var(--glow); }
.logo .cap { display: inline-flex; align-items: center; gap: calc(8px * var(--s)); margin-top: calc(8px * var(--s)); font: 700 calc(26px * var(--s)) / 1 var(--font);
  padding: calc(5px * var(--s)) calc(15px * var(--s)) calc(6px * var(--s)) calc(12px * var(--s)); border-radius: 999px;
  border: max(1px, calc(1.6px * var(--s))) solid color-mix(in srgb, var(--accent) 55%, transparent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.logo .phone { position: relative; flex: none; width: calc(10px * var(--s)); height: calc(17px * var(--s)); border-radius: calc(3px * var(--s));
  border: max(1px, calc(2.4px * var(--s))) solid var(--accent); box-shadow: 0 0 calc(8px * var(--s)) var(--glow); }
.logo .phone::after { content: ""; position: absolute; left: 50%; bottom: calc(1.2px * var(--s)); width: calc(3px * var(--s)); height: max(1px, calc(1.6px * var(--s))); margin-left: calc(-1.5px * var(--s)); background: var(--accent); border-radius: 1px; }
.logo.breathe .cap { animation: capglow 2.4s ease-in-out infinite; }
.logo.breathe .phone { animation: breathe 2.4s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .3; } }
@keyframes capglow { 50% { box-shadow: 0 0 calc(18px * var(--s)) var(--glow); border-color: var(--accent); } }
@media (prefers-reduced-motion: reduce) { .logo.breathe .cap, .logo.breathe .phone { animation: none; } }

/* the loading screen: the logo on black, its capsule breathing, until the notes are read */
.splash { position: fixed; inset: 0; z-index: 50; background: var(--bg); display: flex; align-items: center; justify-content: center; transition: opacity .35s ease; }
.splash .logo { --s: 1.45; }
.splash.gone { opacity: 0; pointer-events: none; }
.feature { margin: 2px 2px 10px; font-size: 18px; font-weight: 700; }
.ibtn { flex: none; border: 0; background: none; font-size: 19px; width: 44px; height: 44px; border-radius: 22px; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.ibtn:active { background: var(--panel-2); }
.mbtn { flex: none; border: 1px solid var(--line); background: var(--panel-2); border-radius: 22px; min-height: 44px; padding: 0 16px; font-weight: 600; }
.mbtn.go { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.mbtn.small { min-height: 40px; padding: 0 12px; font-size: 13.5px; }
.mbtn:disabled { opacity: .5; }
.link { border: 0; background: none; color: var(--accent); font-weight: 700; min-height: 40px; padding: 0 6px; }

.banners:empty { display: none; }
.banners { padding: 8px 12px 0; }
.banner { display: flex; gap: 8px; align-items: center; border: 1px solid var(--line); background: var(--panel); border-radius: 12px; padding: 6px 6px 6px 11px; font-size: 13px; margin-bottom: 6px; }
.banner .grow { flex: 1; min-width: 0; }
.banner.warn { border-color: var(--warn-line); background: var(--warn-bg); color: var(--warn-text); }
.banner.warn .link { color: var(--warn-text); }

.panes { flex: 1; min-height: 0; display: flex; }
.pane { min-width: 0; overflow-y: auto; }
.pane::-webkit-scrollbar { width: 0; }
.list-pane { flex: 1; padding: 10px 12px 24px; }
.note-pane { flex: 1; display: none; flex-direction: column; }
.app.at-note .list-pane { display: none; }
.app.at-note .note-pane { display: flex; }

.search { margin-bottom: 8px; }
.search input { width: 100%; min-height: 44px; border: 1px solid var(--line); background: var(--panel); border-radius: 12px; padding: 0 12px; }
.cap-box { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.cap-box:focus-within { border-color: var(--muted); }
.cap-box textarea { display: block; width: 100%; border: 0; background: none; resize: none; font-size: 16px; line-height: 1.4; padding: 0; min-height: 88px; outline: none; }
.cap-box textarea::placeholder { color: var(--muted); }
.cap-row { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.cap-row .grow { flex: 1; min-width: 0; font-size: 12px; color: var(--muted); }

.sec { font-size: 12px; font-weight: 400; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 14px 2px 6px; }
.nlist { list-style: none; margin: 0; padding: 0; }
.nlist li { display: flex; align-items: center; gap: 6px; border-bottom: 1px solid var(--line); }
.nlist .open { flex: 1; min-width: 0; text-align: left; border: 0; background: none; padding: 10px 6px; min-height: 52px; border-radius: 10px; }
.nlist .open b { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nlist .open span { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nlist li.on .open { background: var(--soft); }
.nlist .restore { margin-right: 2px; }
.empty { text-align: center; color: var(--muted); padding: 26px 10px; font-size: 14px; }

.note-empty { margin: auto; color: var(--muted); padding: 20px; text-align: center; }
.note-wrap { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.editor { flex: 1; min-height: 0; width: 100%; border: 0; background: none; resize: none; padding: 14px 14px 10px; font-size: 16px; line-height: 1.5; outline: none; }
.note-bar { flex: none; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; padding: 8px 10px 12px; border-top: 1px solid var(--line); }
.note-bar .grow { flex: 1; }
.status { font-size: 12px; color: var(--muted); }

.menu { position: fixed; top: 52px; right: 8px; z-index: 20; min-width: 220px; max-width: calc(100vw - 16px); background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 6px; box-shadow: 0 10px 30px #000c; }
.menu button { display: block; width: 100%; text-align: left; border: 0; background: none; min-height: 44px; padding: 0 12px; border-radius: 10px; }
.menu button:active, .menu button:focus-visible { background: var(--panel-2); }
.menu-foot { font-size: 11.5px; color: var(--muted); padding: 6px 12px 4px; border-top: 1px solid var(--line); margin-top: 4px; }

.toast-m { position: fixed; left: 12px; right: 12px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 30; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 6px 6px 6px 12px; font-size: 13.5px; display: flex; gap: 8px; align-items: center; max-width: 420px; margin: 0 auto; }
.toast-m .grow { flex: 1; min-width: 0; }

/* Today: the brief of what is due, a tab beside Notes */
.tabs { flex: none; display: flex; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabs button { flex: 1; min-width: 0; border: 0; background: none; min-height: 48px; padding: 0 2px; font-weight: 600; font-size: 13px; white-space: nowrap; color: var(--muted); }
.tabs button.on { color: var(--accent); box-shadow: inset 0 2px 0 var(--accent); }
.today-pane, .week-pane { display: none; }
.app.at-today .list-pane, .app.at-today .note-pane { display: none; }
.app.at-today .today-pane { display: block; flex: 1; padding: 10px 12px 24px; }
.sub { margin: -8px 2px 6px; font-size: 13px; color: var(--muted); }
.hint { font-size: 12.5px; color: var(--muted); margin: 8px 2px; }
.blist, .wlist { list-style: none; margin: 0; padding: 0; }
.blist li { display: flex; align-items: center; gap: 4px; border-bottom: 1px solid var(--line); }
.blist .open { flex: 1; min-width: 0; text-align: left; border: 0; background: none; padding: 9px 4px; min-height: 52px; }
.blist .open b { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.blist .open span { display: block; font-size: 12.5px; color: var(--muted); }
.blist li.over .open span { color: var(--warn-text); }
.ck { flex: none; width: 44px; height: 44px; border: 0; background: none; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.ck::before { content: ""; width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--muted); }
.blist li.over .ck::before { border-color: var(--warn-text); }
.ck:active::before { background: var(--accent); border-color: var(--accent); }
.wlist li { display: flex; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--line); font-size: 14px; }
.wlist li b { flex: none; width: 40px; color: var(--muted); font-weight: 600; }
.wlist li span { min-width: 0; }

/* what a note carries */
.tags { flex: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 8px; }
.tag { font-size: 12px; border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 3px 9px; }
.tag.acc { border-color: var(--accent); color: var(--accent); }

/* the sheet from the bottom: a note's actions and their small forms */
.dim { position: fixed; inset: 0; z-index: 40; background: #000a; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; max-height: 86vh; overflow-y: auto; background: var(--panel); border: 1px solid var(--line); border-bottom: 0;
  border-radius: 18px 18px 0 0; padding: 6px 14px calc(14px + env(safe-area-inset-bottom)); max-width: 560px; margin: 0 auto; }
.sheet .grab { width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 4px auto 8px; }
.sheet h3 { margin: 2px 2px 10px; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chips { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.chipb { min-height: 52px; border: 1px solid var(--line); background: var(--panel-2); border-radius: 14px; font-weight: 600; font-size: 14px; text-align: left; padding: 0 12px; }
.chipb.on { border-color: var(--accent); color: var(--accent); }
.field { display: block; margin: 0 0 10px; }
.field > span { display: block; font-size: 12.5px; color: var(--muted); margin: 0 2px 4px; }
.field input, .field select { width: 100%; min-height: 44px; border: 1px solid var(--line); background: var(--bg); border-radius: 10px; padding: 0 10px; color-scheme: dark; }
.pair { display: flex; gap: 8px; }
.pair .num { flex: 0 0 76px; width: 76px; }
.pair select { flex: 1; min-width: 0; }
.check { display: flex; align-items: center; gap: 8px; min-height: 44px; font-size: 14px; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }
.sheet-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.sheet-row .grow { flex: 1; }

/* the Calendar tab: the month, the chosen day, what is coming up */
.cal-pane, .cal-side { display: none; }
.app.at-cal .list-pane, .app.at-cal .note-pane { display: none; }
.app.at-cal .cal-pane { display: block; flex: 1; padding: 6px 10px 24px; }
.cal-head { display: flex; align-items: center; gap: 2px; }
.cal-head .feature { flex: 1; margin: 0; text-align: center; font-size: 16px; }
.mon { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; margin: 2px 0 8px; }
.mon .h { font-size: 11px; color: var(--muted); padding: 2px 0; }
.mon .d { position: relative; border: 0; background: none; min-height: 38px; border-radius: 10px; font-size: 13.5px; padding: 0 0 6px; }
.mon .d.out { color: var(--muted); opacity: .5; }
.mon .d.today { background: var(--accent); color: var(--accent-text); font-weight: 700; }
.mon .d.sel { box-shadow: inset 0 0 0 2px var(--accent); }
.mon .d i { position: absolute; left: 50%; bottom: 4px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--accent); }
.mon .d i.was { background: var(--muted); }
.mon .d.today i { background: var(--accent-text); }
.cal-row { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 2px; }
.blist li.past .open b { color: var(--muted); font-weight: 600; }
.ck.done::before { background: var(--line); border-color: var(--line); }
.blist .kicon { flex: none; width: 36px; text-align: center; font-size: 18px; }
.blist div.open { padding: 9px 4px; }

/* the search: month chips and month headings */
.mchips { display: flex; gap: 6px; overflow-x: auto; padding: 8px 0 2px; scrollbar-width: none; }
.mchips::-webkit-scrollbar { display: none; }
.mchips button { flex: none; border: 1px solid var(--line); background: var(--panel); border-radius: 999px; min-height: 34px; padding: 0 12px; font-size: 12.5px; }
.mchips button.on { border-color: var(--accent); color: var(--accent); }
.nlist li.grp { display: block; border: 0; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding: 12px 2px 4px; }

/* the reminders sheet */
.textbox { margin: 0 0 10px; }
.textbox input, .textbox textarea { width: 100%; min-height: 44px; border: 1px solid var(--line); background: var(--bg); border-radius: 10px; padding: 8px 10px; }
.textbox .pair { margin-bottom: 8px; }
.textbox .pair input { flex: 1; min-width: 0; }
.textbox textarea { resize: none; }
.row-off { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13.5px; color: var(--muted); margin: 4px 2px 8px; }
.badge { font-size: 11px; border: 1px solid var(--warn-line); color: var(--warn-text); border-radius: 999px; padding: 1px 8px; }

/* the inner screen and anything wider: the list and the open note side by side */
#new { display: none; }
@media (min-width: 520px) {
  #new { display: inline-flex; align-items: center; }
  .list-pane { flex: 0 0 240px; border-right: 1px solid var(--line); padding: 8px 10px 24px; }
  .note-pane { display: flex; }
  .app.at-note .list-pane { display: block; }
  #capture { display: none; }
  .sec { margin-top: 4px; }
  .editor { padding: 16px 20px 10px; }
  .tags { padding: 0 20px 8px; }
  .app.at-today .today-pane { flex: 0 0 300px; border-right: 1px solid var(--line); padding: 8px 12px 24px; }
  .app.at-today .week-pane { display: block; flex: 1; padding: 8px 16px 24px; }
  .app.at-cal .cal-pane { flex: 0 0 320px; border-right: 1px solid var(--line); padding: 6px 12px 24px; }
  .app.at-cal .cal-side { display: block; flex: 1; padding: 8px 16px 24px; }
  .note-bar { padding: 8px 16px 14px; }
}
@media (min-width: 900px) { .list-pane { flex-basis: 320px; } }

/* ---------- Settings (#/settings) ---------- */
.set-pane { display: none; }
.app.at-settings .list-pane, .app.at-settings .note-pane, .app.at-settings .today-pane, .app.at-settings .week-pane,
.app.at-settings .cal-pane, .app.at-settings .cal-side { display: none; }
.app.at-settings .set-pane { display: block; flex: 1; padding: 6px 12px 28px; max-width: 640px; }
.srow { display: flex; gap: 10px; align-items: center; width: 100%; min-height: 52px; padding: 8px 4px; border: 0; border-bottom: 1px solid var(--line); background: none; color: inherit; text-align: left; font: inherit; }
.srow .g { flex: 1; min-width: 0; }
.srow b { display: block; font-size: 15px; font-weight: 600; }
.srow span { display: block; font-size: 12.5px; color: var(--muted); }
.srow select { flex: none; max-width: 52%; min-height: 40px; font: inherit; font-size: 14px; color: var(--text); background: var(--panel-2, var(--panel)); border: 1px solid var(--line); border-radius: 10px; padding: 0 8px; }
.srow .chev { flex: none; width: auto; font-size: 20px; color: var(--muted); }
.link-row { cursor: pointer; }
.sw { flex: none; width: 46px; height: 28px; border-radius: 14px; border: 0; background: var(--line); position: relative; padding: 0; cursor: pointer; }
.sw::after { content: ""; position: absolute; top: 4px; left: 4px; width: 20px; height: 20px; border-radius: 50%; background: var(--muted); transition: left .15s; }
.sw.on { background: color-mix(in srgb, var(--accent) 50%, transparent); }
.sw.on::after { left: 22px; background: var(--accent); }

/* a test build says so on every screen (test.json, written only by the test deploy) */
.testbar { flex: none; margin: 6px 10px 0; padding: 7px 10px; border-radius: 10px; font-size: 12px; font-weight: 600; background: #0b2a3a; color: #9fe3ff; border: 1px solid #1d5a78; }
.testbar.fail { background: #2a0c0c; color: #ffb0b0; border-color: #8a2a2a; }

/* text size (Settings, Look): the panes and the sheet grow, the bars keep their size */
.app[data-text="large"] .pane > *, .app[data-text="large"] .sheet > * { zoom: 1.12; }
.app[data-text="larger"] .pane > *, .app[data-text="larger"] .sheet > * { zoom: 1.25; }
