@import url("fonts.css");

/* Same palette as intervall.io: near black on white, inverted when the system
   asks for dark. */
:root {
  --black: #111;
  --white: #fff;
  --muted: #6f6f6f;
  --line: #e0e0e0;
  --accent: #ff5900;
}

@media (prefers-color-scheme: dark) {
  :root {
    --black: #ededed;
    --white: #111;
    --muted: #8c8c8c;
    --line: #2b2b2b;
  }
}

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

body {
  font: 400 15px/24px "Source Code Pro", ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--black);
  background: var(--white);
  -webkit-text-size-adjust: 100%;
}

.wrapper {
  max-width: 46rem;
  min-height: 100vh;
  margin-inline: auto;
  padding: 40px 48px;
  display: flex;
  flex-direction: column;
}

/* ── Header ─────────────────────────────────────────────────────────────── */

header {
  margin-bottom: 56px;
}

header a {
  display: inline-block;
  color: var(--black);
}

.logo {
  height: 18px;
  width: auto;
  display: block;
}

main {
  flex: 1 0 auto;
}

/* ── Type ───────────────────────────────────────────────────────────────── */

h1 {
  font-size: 24px;
  font-weight: 600;
  line-height: 32px;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.lead {
  color: var(--muted);
  margin-bottom: 40px;
}

h2 {
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}

/* Sections are separated by a hairline, never boxed in. */
section {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  margin-top: 40px;
}

section:first-of-type {
  margin-top: 0;
}

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

/* ── App list ───────────────────────────────────────────────────────────── */

.app {
  display: block;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}

.app:last-child {
  border-bottom: 0;
}

.app .name {
  font-weight: 600;
}

.app .desc {
  color: var(--muted);
  margin-left: 8px;
}

.app:hover .name {
  color: var(--accent);
}

/* ── Forms ──────────────────────────────────────────────────────────────── */

form {
  max-width: 22rem;
}

label {
  display: block;
  font-size: 12px;
  line-height: 16px;
  color: var(--muted);
  margin-bottom: 8px;
}

input {
  width: 100%;
  font: inherit;
  color: var(--black);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 8px 12px;
  margin-bottom: 24px;
}

input:focus {
  outline: none;
  border-color: var(--black);
}

button {
  font: inherit;
  font-weight: 600;
  color: var(--white);
  background: var(--black);
  border: 0;
  padding: 8px 24px;
  cursor: pointer;
}

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

.error {
  color: var(--accent);
  margin-bottom: 24px;
}

/* ── Footer ─────────────────────────────────────────────────────────────── */

footer {
  flex-shrink: 0;
  margin-top: 80px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  line-height: 20px;
  color: var(--muted);
}

footer .actions {
  margin-bottom: 8px;
}

footer a {
  color: var(--muted);
}

footer a:hover {
  color: var(--accent);
}

a {
  color: var(--black);
}

@media (max-width: 34rem) {
  .wrapper {
    padding: 32px 24px;
  }

  header {
    margin-bottom: 40px;
  }
}
