/* Reset, typography, page chrome (topbar, section headings, footer). */

* {
  box-sizing: border-box;
}

/* The `hidden` attribute must always win. Elements like .login-screen set
   `display: flex`, which has equal specificity to the UA `[hidden]` rule and
   comes later, so without this the login screen stays visible even when
   hidden=true is set after sign-in. */
[hidden] {
  display: none !important;
}

body {
  background: var(--ground);
  color: var(--ink);
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.wrap {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 20px 64px;
}

/* ── slim topbar ─────────────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 20px;
  background: var(--surface2);
  border-bottom: 1px solid var(--line);
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.user-chip .linklike {
  color: var(--ink2);
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
}

header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 30px 0 8px;
  flex-wrap: wrap;
}

.spud {
  width: 58px;
  height: 58px;
  flex: none;
  filter: drop-shadow(0 4px 14px rgba(247, 107, 21, 0.35));
  animation: potato-bob 3.6s ease-in-out infinite;
  transform-origin: 50% 60%;
}

/* A little hot-potato life: gentle bob + wobble, like it's too hot to sit still. */
@keyframes potato-bob {
  0% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-5px) rotate(3deg); }
  100% { transform: translateY(0) rotate(-3deg); }
}

.spud:hover {
  animation-duration: 0.6s;
}

.brand h1 {
  margin: 0;
  font-size: clamp(26px, 4.6vw, 38px);
  font-weight: 850;
  letter-spacing: -0.015em;
  line-height: 1;
  text-wrap: balance;
}

.brand h1 .hotword {
  color: var(--hot);
}

.brand .eyebrow {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 7px;
}

.topchips {
  margin-left: auto;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ── section headings ────────────────────────────────────────────── */
h2 {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 38px 0 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

h2::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* ── grid ─────────────────────────────────────────────────────────── */
.grid {
  display: grid;
  gap: 12px;
}

.tiles {
  grid-template-columns: repeat(auto-fit, minmax(225px, 1fr));
}

.two {
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 760px) {
  .two {
    grid-template-columns: 1fr;
  }
}

footer {
  margin-top: 44px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

footer a,
footer button.linklike {
  color: var(--ink2);
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  letter-spacing: inherit;
  cursor: pointer;
  text-decoration: underline;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
