:root {
  --bg: #faf9f7;
  --text: #1a1a1a;
  --muted: #8a8a84;
  --line: #e4e2dd;
  --card: #ffffff;
  --err: #b3402a;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121210;
    --text: #ecebe7;
    --muted: #85847d;
    --line: #2a2a26;
    --card: #1b1b18;
    --err: #e07a5f;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Instrument Sans", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  padding: 0 16px 80px;
  max-width: 680px;
  margin: 0 auto;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
code, pre, .meta, .mark, nav, label, .check, h2 {
  font-family: "Space Mono", monospace;
}

/* ---- header ---- */

.top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 48px 0 32px;
}

.mark { font-size: 14px; text-decoration: none; letter-spacing: -0.02em; }

nav { display: flex; gap: 20px; font-size: 12px; align-items: baseline; }
nav a { text-decoration: none; color: var(--muted); }
nav a:hover { color: var(--text); }

.inline { display: inline; }

/* ---- buttons & inputs ---- */

button {
  font: 500 14px/1 "Instrument Sans", system-ui, sans-serif;
  background: var(--text);
  color: var(--bg);
  border: 0;
  border-radius: 6px;
  padding: 11px 16px;
  cursor: pointer;
  white-space: nowrap;
}

button.link {
  background: none;
  color: var(--muted);
  padding: 4px 2px;
  font: 12px "Space Mono", monospace;
}
button.link:hover:not(:disabled) { color: var(--text); }
button.link:disabled { opacity: 0.3; cursor: default; }
button.danger:hover { color: var(--err) !important; }

input:not([type=checkbox]) {
  font: 15px "Instrument Sans", system-ui, sans-serif;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  width: 100%;
  min-width: 0;
}
input:focus { outline: 2px solid var(--text); outline-offset: -1px; border-color: transparent; }

.error { color: var(--err); font-size: 14px; margin-bottom: 24px; }
.muted { color: var(--muted); }
.empty { padding: 24px 0; }

/* ---- project list ---- */

.projects { list-style: none; border-top: 1px solid var(--line); }
.projects li { border-bottom: 1px solid var(--line); }

.projects a {
  display: grid;
  gap: 2px;
  padding: 18px 0;
  text-decoration: none;
}

.projects .title { font-size: 20px; font-weight: 600; letter-spacing: -0.015em; }
.projects .desc { color: var(--muted); font-size: 15px; }
.projects .meta { color: var(--muted); font-size: 11px; margin-top: 4px; }
.projects a:hover .title { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }

/* ---- login ---- */

.login { margin-top: 48px; max-width: 360px; }
.projects + .login { margin-top: 64px; }
.login label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.login-row { display: flex; gap: 8px; }

/* ---- edit ---- */

.edit-list { list-style: none; border-top: 1px solid var(--line); }
.edit-list li { border-bottom: 1px solid var(--line); }

.edit-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 16px 0;
}
.edit-row .wide, .edit-row .row-actions, .edit-row h2 { grid-column: 1 / -1; }

.row-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.row-actions button:not(.link) { padding: 8px 14px; }
.check { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin-right: auto; }

.add { margin-top: 40px; }
.add h2 { font-size: 12px; font-weight: 400; color: var(--muted); }

.panel h1 { font-size: 20px; font-weight: 600; margin-bottom: 8px; }
pre { background: var(--card); border: 1px solid var(--line); padding: 12px; border-radius: 6px; margin-top: 12px; font-size: 13px; }

@media (max-width: 520px) {
  .edit-row { grid-template-columns: 1fr; }
}

/* ---- launcher (5 Dec 2026) ---- */
.group { margin-bottom: 40px; }
.group h2 { font-size: 11px; font-weight: 400; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.apps { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 26px 12px; }
.apps a { display: flex; flex-direction: column; align-items: center; gap: 9px; text-decoration: none; }
.tile { width: 64px; height: 64px; border-radius: 15px; overflow: hidden; display: grid; place-items: center; background: #111; color: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.08); transition: transform .15s ease, box-shadow .15s ease; }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile:has(img) { background: transparent; }
.tile img[src$="tack.png"] { transform: scale(1.22); }   /* macOS icon art has built-in margin */
.tile .mono { font: 500 26px/1 "Instrument Sans", system-ui, sans-serif; letter-spacing: -0.02em; }
.apps a:hover .tile { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(0,0,0,.12); }
.apps a:active .tile { transform: scale(.96); }
.apps .name { font-size: 13px; font-weight: 500; text-align: center; letter-spacing: -0.005em; }
@media (prefers-color-scheme: dark) { .tile { box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); } }
select { font: 13px "Instrument Sans", system-ui, sans-serif; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; }
@media (max-width: 520px) { .apps { grid-template-columns: repeat(4, 1fr); gap: 22px 6px; } .tile { width: 58px; height: 58px; border-radius: 13px; } .apps .name { font-size: 12px; } }
