/* Task Concierge — dark, mobile-first, matches the Foundation PWA family. */
:root {
  --bg: #11161d;
  --panel: #1a212b;
  --panel-2: #202a36;
  --border: #2c3846;
  --text: #e8edf3;
  --muted: #93a1b1;
  --dim: #6b7888;
  --accent: #34c08b;
  --accent-press: #2aa377;
  --header: #15202b;
  --danger: #e0667a;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  padding-bottom: env(safe-area-inset-bottom);
}

/* ===== header ===== */
.app-header {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: var(--header);
  border-bottom: 1px solid var(--border);
}
.app-header h1 { margin: 0; font-size: 1.15rem; letter-spacing: .3px; }
.icon-btn {
  background: none; border: none; font-size: 1.3rem; cursor: pointer;
  padding: 4px 6px; border-radius: 8px;
}
.icon-btn:active { background: var(--panel-2); }

/* ===== layout ===== */
.app-main { max-width: 640px; margin: 0 auto; padding: 14px 14px 40px; }
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 16px;
}
.step-title { margin: 0 0 8px; font-size: 1rem; display: flex; align-items: center; gap: 8px; }
.step-no {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); color: #08130e; font-size: .85rem; font-weight: 700;
  flex: none;
}
.lede { margin: 0 0 12px; color: var(--muted); font-size: .92rem; }
.hint { color: var(--dim); font-size: .85rem; margin: 8px 0 0; }
.muted { color: var(--muted); font-weight: 400; font-size: .9em; }
.dim { color: var(--dim); }

/* ===== inputs ===== */
textarea, input[type="text"], input[type="password"], select {
  width: 100%;
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
}
textarea { resize: vertical; }
textarea:focus, input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }

.speak-row { display: flex; gap: 10px; align-items: stretch; }
.speak-row textarea { flex: 1; }
.mic-btn {
  flex: none; width: 64px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--panel-2); font-size: 1.6rem; cursor: pointer;
}
.mic-btn.listening { background: var(--danger); animation: pulse 1.2s infinite; }
.mic-btn:disabled { opacity: .4; cursor: not-allowed; }
@keyframes pulse { 50% { opacity: .65; } }

.opts-row { display: flex; gap: 10px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.opts-row input[type="text"] { flex: 1; min-width: 110px; }
.opts-row select { flex: 1; min-width: 150px; }
.field-label { font-size: .85rem; color: var(--muted); }

/* ===== buttons ===== */
.btn {
  border: none; border-radius: 10px; padding: 10px 16px;
  font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap;
  text-decoration: none; display: inline-block; text-align: center;
}
.btn-primary { background: var(--accent); color: #08130e; }
.btn-primary:active { background: var(--accent-press); }
.btn-primary:disabled { opacity: .5; cursor: wait; }
.btn-ghost { background: var(--panel-2); color: var(--text); border: 1px solid var(--border); }
.btn-sm { padding: 7px 12px; font-size: .85rem; }
.file-btn { cursor: pointer; }

.status { min-height: 1.2em; color: var(--accent); font-size: .88rem; margin: 10px 0 0; }

/* ===== results ===== */
.results { margin-bottom: 16px; }
.summary-chip {
  background: var(--panel-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; font-size: .92rem;
}
.platform-card {
  display: flex; gap: 12px;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 14px; padding: 14px; margin-bottom: 10px;
}
.rank-no {
  flex: none; width: 28px; height: 28px; border-radius: 50%;
  background: var(--panel-2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .9rem;
}
.platform-body { flex: 1; min-width: 0; }
.platform-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.platform-body p { margin: 6px 0 10px; font-size: .88rem; }
.link-row { display: flex; gap: 8px; flex-wrap: wrap; }

.fit { font-size: .75rem; padding: 2px 8px; border-radius: 999px; font-weight: 700; }
.fit-great { background: #1d4634; color: #6fe3b0; }
.fit-good  { background: #1d3a46; color: #6fc6e3; }
.fit-fair  { background: #46401d; color: #e3d36f; }
.fit-poor  { background: #461d27; color: #e36f8a; }
.cost { margin-left: auto; color: var(--muted); font-size: .85rem; }
.score {
  background: var(--accent); color: #08130e; font-weight: 700;
  font-size: .8rem; padding: 2px 8px; border-radius: 999px;
}

/* ===== settings dialog ===== */
.settings-dlg {
  background: var(--panel); color: var(--text);
  border: 1px solid var(--border); border-radius: 14px;
  width: min(92vw, 420px); padding: 18px;
}
.settings-dlg::backdrop { background: rgba(0,0,0,.6); }
.settings-dlg h2 { margin: 0 0 12px; font-size: 1.05rem; }
.settings-dlg input { margin: 4px 0 10px; }
.dlg-actions { justify-content: flex-end; }

.footnote { color: var(--dim); font-size: .8rem; margin-top: 22px; }
