/*
 * Park My Brain. Dark always and still: the screen is looked at in the middle of the night, so there
 * is no light theme, no gradient, no glow and no motion anywhere. Navy page, soft off-white ink, one
 * dim amber accent. The colours are the coming-soon page's. Inter is self-hosted (fonts/OFL.txt).
 */

@font-face {
  font-family: "Inter";
  src: url("fonts/inter-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("fonts/inter-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0f1420;
  --surface: #151b29;
  --ink: #e6e9f0;
  --muted: #a9b1c2;
  --accent: #f0b86a;
  --accent-strong: #f6cb8f;
  --on-accent: #0f1420;
  --line: #273044;
  --gutter: 16px;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.125rem;
  line-height: 1.6;
  overflow-wrap: break-word;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

[hidden] {
  display: none !important;
}

.wrap {
  width: 100%;
  max-width: 40rem;
  margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}

h1,
p {
  margin: 0;
}

h1 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

h1:focus {
  outline: none;
}

/* Header */

.bar {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.bar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 1.0625rem;
  font-weight: 700;
}

.mark {
  flex: none;
  width: 1.75rem;
  height: 1.75rem;
  color: var(--accent);
}

/* Views */

main {
  flex: 1 0 auto;
  padding-top: 1.5rem;
  padding-bottom: 2rem;
}

.view {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.prompt {
  color: var(--muted);
}

textarea {
  width: 100%;
  min-height: 9rem;
  padding: 0.875rem 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  line-height: 1.5;
  resize: vertical;
}

textarea:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

button {
  font: inherit;
  cursor: pointer;
}

button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.park-button {
  min-height: 4.5rem;
  border: 0;
  border-radius: 18px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 1.375rem;
  font-weight: 700;
}

.park-button:hover {
  background: var(--accent-strong);
}

.park-button:disabled {
  cursor: progress;
  opacity: 0.7;
}

.quiet-button {
  align-self: flex-start;
  min-height: 3rem;
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: transparent;
  color: var(--accent);
  font-weight: 700;
}

.got-it {
  padding-top: 2rem;
  font-size: 1.625rem;
  line-height: 1.35;
}

.status {
  min-height: 1.6em;
  color: var(--muted);
}

/* Footer */

.foot {
  padding-bottom: 1.5rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* Tabs */

.tabs {
  display: flex;
  gap: 0.25rem;
}

.tab {
  min-height: 2.75rem;
  padding: 0.375rem 0.875rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 700;
}

.tab[aria-current="page"] {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

/* Parking Lot */

input[type="search"] {
  width: 100%;
  min-height: 3rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}

input[type="search"]:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.lot {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.thought {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.words {
  white-space: pre-wrap;
}

.when {
  color: var(--muted);
  font-size: 0.875rem;
}

.edit-box {
  min-height: 6rem;
  background: var(--bg);
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.small-button {
  min-height: 2.75rem;
  padding: 0.375rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-size: 0.9375rem;
}

.small-button.danger {
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 700;
}

.small-button:disabled {
  cursor: progress;
  opacity: 0.6;
}

.ask {
  flex-basis: 100%;
  color: var(--ink);
  font-size: 0.9375rem;
}

.empty {
  color: var(--muted);
}

/* Recording */

.recording {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.rec-time {
  color: var(--accent);
  font-size: 1.25rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* A voice note in the Parking Lot */

.voice {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.voice-label {
  color: var(--muted);
  font-size: 0.875rem;
}

audio {
  width: 100%;
  min-height: 2.75rem;
}

/* A copy for you, and the home screen hint */

h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.keep {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.hint {
  color: var(--muted);
  font-size: 0.9375rem;
}
