/* kenzai-tasks — mobile first. Opened on an Android phone on mobile data,
   so: system fonts, no webfonts, no framework, generous tap targets. */

:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --ink: #16191d;
  --muted: #6b7280;
  --line: #e3e6ea;
  --accent: #1f6feb;
  --accent-ink: #ffffff;
  --danger: #c7362f;
  --warn: #9a6400;
  --ok: #1a7f52;
  --radius: 12px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1216;
    --card: #171b21;
    --ink: #e8eaed;
    --muted: #9aa3ad;
    --line: #262c34;
    --accent: #4b8bf5;
    --danger: #f2756c;
    --warn: #e0a33a;
    --ok: #4cc08a;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

header.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: .75rem;
  padding: .7rem 1rem;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
header.top .brand { font-weight: 650; letter-spacing: -.01em; }
header.top nav { margin-left: auto; display: flex; gap: .9rem; align-items: center; }
header.top nav a { color: var(--muted); font-size: .9rem; }
header.top nav a.active { color: var(--ink); font-weight: 600; }

main { max-width: 820px; margin: 0 auto; padding: 1rem 1rem 5rem; }

h1 { font-size: 1.3rem; margin: .2rem 0 1rem; letter-spacing: -.02em; }
h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em;
     color: var(--muted); margin: 1.6rem 0 .6rem; font-weight: 650; }
h2:first-of-type { margin-top: .4rem; }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1rem; margin-bottom: .9rem;
}

/* task rows — the whole row is the tap target */
ul.tasks { list-style: none; margin: 0; padding: 0; }
ul.tasks li { margin-bottom: .5rem; }
.task {
  display: block; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: .85rem .95rem;
  color: inherit; min-height: 54px;
}
.task:hover { text-decoration: none; border-color: var(--accent); }
.task .title { font-weight: 550; letter-spacing: -.01em; }
.task .meta { margin-top: .3rem; font-size: .83rem; color: var(--muted);
              display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.task.late { border-left: 3px solid var(--danger); }
.task.high .title::before { content: "⬤ "; color: var(--warn); font-size: .6em;
                            vertical-align: middle; }

.pill {
  display: inline-block; padding: .1rem .5rem; border-radius: 999px;
  font-size: .75rem; border: 1px solid var(--line); color: var(--muted);
  white-space: nowrap;
}
.pill.late { color: var(--danger); border-color: var(--danger); }
.pill.ok { color: var(--ok); border-color: var(--ok); }
.pill.warn { color: var(--warn); border-color: var(--warn); }

.empty { color: var(--muted); font-size: .92rem; padding: .3rem 0 .6rem; }

/* forms & buttons */
label { display: block; font-size: .85rem; color: var(--muted);
        margin: .8rem 0 .25rem; }
input, select, textarea, button {
  font: inherit; color: var(--ink);
}
input[type=text], input[type=password], input[type=date], input[type=email],
select, textarea {
  width: 100%; padding: .7rem .75rem; background: var(--bg);
  border: 1px solid var(--line); border-radius: 10px; min-height: 46px;
}
textarea { min-height: 90px; resize: vertical; }

button, .btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .4rem; min-height: 46px; padding: .6rem 1rem; border-radius: 10px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  cursor: pointer; font-weight: 550;
}
button:hover, .btn:hover { border-color: var(--accent); text-decoration: none; }
button.primary, .btn.primary {
  background: var(--accent); color: var(--accent-ink); border-color: var(--accent);
}
button.danger { color: var(--danger); }
button.block { width: 100%; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .9rem; }
.actions form { margin: 0; }

.fab {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 20;
  border-radius: 999px; padding: .85rem 1.3rem; font-weight: 600;
  background: var(--accent); color: var(--accent-ink);
  border: none; box-shadow: 0 6px 20px rgba(0,0,0,.22);
}

/* history */
.history { list-style: none; margin: .5rem 0 0; padding: 0; font-size: .87rem; }
.history li { padding: .45rem 0; border-top: 1px solid var(--line);
              color: var(--muted); }
.history li b { color: var(--ink); font-weight: 600; }

table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th, td { text-align: left; padding: .5rem .4rem; border-bottom: 1px solid var(--line);
         vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: .78rem;
     text-transform: uppercase; letter-spacing: .04em; }
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
              font-size: .82em; }

.note { background: var(--card); border: 1px solid var(--warn);
        border-left-width: 3px; border-radius: var(--radius);
        padding: .8rem .95rem; margin-bottom: .9rem; font-size: .9rem; }
.error { color: var(--danger); font-size: .9rem; margin-top: .5rem; }
.row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: flex-end; }
.row > * { flex: 1 1 180px; }
.muted { color: var(--muted); }
.count { font-size: .78rem; color: var(--muted); font-weight: 500; }
