/* The app's layout on top of the oddly's tokens. Phone first: one column,
   the measure caps it on anything wider. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }

body {
  margin: 0;
  min-height: 100dvh;
  padding: max(1.25rem, env(safe-area-inset-top)) var(--gutter) max(2rem, env(safe-area-inset-bottom));
  background: var(--bg);
  color: var(--fg);
  font-family: var(--body);
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

.bar, main { max-width: var(--measure); }

.bar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 3rem;
}

.bar form { margin: 0; }

.name {
  font-family: var(--display);
  font-size: 1.15rem;
  text-decoration: none;
}

h1 {
  font-family: var(--display);
  font-size: clamp(2.5rem, 11vw, 4rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  font-weight: 400;
  margin: 0 0 1.25rem;
}

p {
  font-size: clamp(1.05rem, 2.6vw, 1.2rem);
  margin: 0 0 1.5rem;
  text-wrap: pretty;
}

/* Labels rather than sentences. */
.meta {
  font-family: var(--meta);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  opacity: 0.6;
}

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }

.stack { display: grid; gap: 1.25rem; }
.stack label { display: grid; gap: 0.35rem; }

/* 16px or larger, or iOS zooms the page when a field is focused. */
input {
  font: inherit;
  font-size: max(1rem, 16px);
  color: inherit;
  background: transparent;
  border: 0;
  border-bottom: 1px solid currentColor;
  border-radius: 0;
  padding: 0.4rem 0;
}

input:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }

button {
  font: inherit;
  color: var(--bg);
  background: var(--fg);
  border: 0;
  border-radius: 0;
  padding: 0.75rem 1.25rem;
  justify-self: start;
  cursor: pointer;
}

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

/* A button that reads as a link: sign out sits in the header as text. */
button.link {
  color: inherit;
  background: none;
  padding: 0;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.error { font-family: var(--meta); font-size: 0.9rem; }
