/*
 * After the Light Phone's own dashboard: a dark grey page, an underlined title at the top, big
 * quiet words in the middle, grey labels over white values, and buttons drawn as plain outlines.
 */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: dark;
  --bg: #222;
  --fg: #fff;
  --dim: #7a7a7a;
  --faint: #555;
  --line: #fff;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg); }
body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  text-align: center;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

/* The bar at the top: a way back on the left, the page's title underlined in the middle. */
.bar {
  display: grid;
  grid-template-columns: 3rem 1fr 3rem;
  grid-template-rows: 3rem;
  align-items: center;
  padding: calc(1rem + env(safe-area-inset-top)) 1rem 0;
}
.title {
  grid-column: 2;
  justify-self: center;
  margin: 0;
  font-size: 1.25rem;
  font-weight: 400;
  padding-bottom: 0.125rem;
  border-bottom: 2px solid var(--fg);
  white-space: nowrap;
}
.icon-button {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  padding: 0;
  background: none;
  border: 0;
  color: var(--fg);
  cursor: pointer;
}
.icon-button svg, .row-icon svg { display: block; }

main {
  flex: 1;
  width: 100%;
  max-width: 34rem;
  margin: 0 auto;
  padding: 2rem 1.5rem calc(3rem + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  justify-content: center;
}
main > [hidden] { display: none; }

h1 { font-size: 2.5rem; font-weight: 400; line-height: 1.15; margin: 0 0 1.5rem; letter-spacing: -0.02em; text-wrap: balance; }
p { font-size: 1.0625rem; line-height: 1.5; margin: 0 0 1rem; text-wrap: balance; }
.dim { color: var(--dim); }
.small { font-size: 0.9375rem; }
code { font-family: ui-monospace, Menlo, monospace; font-size: 0.9em; }
a { color: var(--fg); text-underline-offset: 0.2em; }

/* A grey label over a white value, as on Device Info. */
.field { margin: 0 0 2.5rem; }
.field:last-child { margin-bottom: 0; }
.label { display: block; font-size: 1.125rem; color: var(--dim); margin: 0 0 0.5rem; }
.value { font-size: 1.375rem; margin: 0; font-variant-numeric: tabular-nums; }

/* The arrival time on the trip page: as big as a narrow phone allows. */
.time {
  font-size: clamp(4rem, 22vw, 7.5rem);
  font-weight: 300;
  line-height: 1;
  margin: 0;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
}
.updated { font-size: 0.9375rem; color: var(--dim); margin: 0; font-variant-numeric: tabular-nums; }
.stale { color: var(--fg); }

/* Big words, one per line, as on the Light Phone's menus. */
.menu { list-style: none; padding: 0; margin: 0; }
.menu li { margin: 0; }
.big {
  font: inherit;
  font-size: clamp(2rem, 9vw, 2.75rem);
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--fg);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
}
.big.faint { color: var(--faint); }

/* Rows with a round icon beside them, as on View Notes: phones on the setup page. */
.rows { list-style: none; padding: 0; margin: 0 auto; text-align: left; display: inline-flex; flex-direction: column; gap: 1.75rem; max-width: 100%; }
.rows li { display: grid; grid-template-columns: 2.75rem 1fr; align-items: center; column-gap: 0.75rem; }
.rows .name { font-size: clamp(1.75rem, 8vw, 2.5rem); line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: -0.01em; }
.rows .meta { grid-column: 2; font-size: 0.875rem; color: var(--dim); margin-top: 0.25rem; }
.row-icon { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; padding: 0; background: none; border: 0; color: var(--fg); cursor: pointer; }
.add { margin: 2.5rem auto 0; }

/* Buttons are outlines with small lowercase words. */
.actions { display: flex; flex-direction: column; align-items: center; gap: 0.875rem; margin-top: 2.5rem; }
.button {
  font: inherit;
  font-size: 0.9375rem;
  min-width: 14rem;
  padding: 0.75rem 1.5rem;
  background: none;
  color: var(--fg);
  border: 2px solid var(--line);
  border-radius: 0;
  cursor: pointer;
  text-decoration: none;
  text-transform: lowercase;
}
.button:active { background: var(--fg); color: var(--bg); }
.button:disabled { opacity: 0.4; cursor: default; }
.link {
  font: inherit; font-size: 0.9375rem; color: var(--dim);
  background: none; border: 0; padding: 0.5rem; cursor: pointer;
  text-decoration: underline; text-underline-offset: 0.2em;
}

form { display: flex; flex-direction: column; align-items: center; margin: 0; }
input {
  font: inherit;
  font-size: 1.375rem;
  width: min(20rem, 100%);
  padding: 0.5rem 0;
  background: none;
  color: var(--fg);
  text-align: center;
  border: 0;
  border-bottom: 2px solid var(--faint);
  border-radius: 0;
}
input::placeholder { color: var(--faint); }
input:focus { outline: none; border-bottom-color: var(--fg); }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 4px; }
input:focus-visible { outline: none; }

.qr { background: #fff; padding: 0.75rem; width: min(17rem, 75vw); margin: 0 auto 1.5rem; }
.qr svg { display: block; width: 100%; height: auto; }
/* The way there in Driving, on a line of its own, kept whole between the arrows where it must wrap. */
.steps { text-wrap: balance; }
.steps span { display: inline-block; text-wrap: balance; }
.waiting { display: inline-flex; align-items: center; gap: 0.625rem; }
.waiting::before {
  content: '';
  width: 0.5rem; height: 0.5rem; border-radius: 50%;
  background: var(--fg);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.2; } }
@media (prefers-reduced-motion: reduce) { .waiting::before { animation: none; } }

.error { color: var(--fg); border: 2px solid var(--fg); padding: 0.75rem 1rem; margin: 2rem auto 0; max-width: 24rem; }
.offline { position: fixed; left: 0; right: 0; bottom: calc(1.5rem + env(safe-area-inset-bottom)); margin: 0; }
[hidden] { display: none !important; }
