/*
 * The landing, the sign in and the dashboard. Only what form.css does not
 * already carry — the tokens, the buttons, the cards and both themes come from
 * there, so a colour changed once changes everywhere.
 */

/* ---------- brand ---------- */

.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand.center { justify-content: center; margin-bottom: 18px; }

.brand .mark {
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 17px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 60%, #7c3aed));
}
.brand .brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.brand .brand-text b { font-size: 15px; font-weight: 700; }
.brand .brand-text span {
  font-size: 11.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pill-btn.solid {
  background: var(--accent);
  color: #fff;
  padding: 0 16px;
  min-height: 40px;
}

/* ---------- landing ---------- */

.landing-bar { gap: 8px; }

.landing-hero { padding: 7vh 4px 0; }
.landing-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(26px, 7vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.03em;
}
.landing-hero p {
  margin: 0 auto 24px;
  max-width: 52ch;
  color: var(--muted);
  font-size: clamp(14px, 3.6vw, 16.5px);
  line-height: 1.55;
}
.hero-cta { max-width: 320px; margin-left: auto; margin-right: auto; }

.points {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 8vh 0 4vh;
}
.point {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}
.point .ico {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 18px;
  margin-bottom: 10px;
}
.point b { display: block; margin-bottom: 5px; font-size: 15px; }
.point span:last-child { font-size: 13.5px; color: var(--muted); line-height: 1.5; }

.foot {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 22px 14px calc(22px + var(--safe-b));
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}
.foot .muted { opacity: 0.75; }

/* ---------- sign in ---------- */

.auth-card { max-width: 420px; margin: 6vh auto 0; }
.field.bare { padding: 0 0 14px; border: 0; }
.note { margin: 0 0 14px; font-size: 13.5px; color: var(--muted); line-height: 1.5; }

/* ---------- dashboard ---------- */

.greet { padding: 6px 2px 14px; }
.greet h2 { margin: 0 0 4px; font-size: clamp(20px, 5vw, 26px); letter-spacing: -0.02em; }
.greet p { margin: 0; color: var(--muted); font-size: 13.5px; }

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.mod {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  min-height: 88px;
  transition: transform 0.12s ease, border-color 0.12s ease;
}
.mod:active { transform: scale(0.985); }
.mod .ico {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 19px;
  background: var(--accent-soft);
  color: var(--accent);
}
.mod .body { min-width: 0; flex: 1; }
.mod .body b { display: block; font-size: 15.5px; margin-bottom: 3px; }
.mod .body span { display: block; font-size: 13px; color: var(--muted); line-height: 1.45; }
.mod .go { flex: none; align-self: center; color: var(--muted); font-size: 20px; }

.account h3 { margin: 0 0 12px; font-size: 14px; }
.kv {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
}
.kv:first-of-type { border-top: 0; }
.kv span { color: var(--muted); }
.kv b { font-weight: 600; text-align: right; overflow-wrap: anywhere; }

/* ---------- navigation ---------- */

.topnav { display: none; }

/*
 * The bar a thumb reaches without moving the hand. Below the fold on purpose,
 * inside the home indicator area, and it disappears entirely on a screen wide
 * enough to put the same links along the top.
 */
.bottomnav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: flex;
  justify-content: space-around;
  gap: 2px;
  padding: 6px 6px calc(6px + var(--safe-b));
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}
.bottomnav a {
  flex: 1 1 0;
  min-width: 0;
  min-height: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 4px 2px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
}
.bottomnav a .ico { font-size: 18px; line-height: 1; }
.bottomnav a span:last-child {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bottomnav a[aria-current='page'] { color: var(--accent); background: var(--accent-soft); }
.bottomnav a:active { background: var(--surface-2); }

/* The dashboard scrolls behind the bar, so its last card must clear it. */
#dash main { padding-bottom: calc(96px + var(--safe-b)); }

@media (min-width: 760px) {
  .points { grid-template-columns: repeat(3, 1fr); }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
  /* Wide enough for the links to live along the top, so the bottom bar goes
     away rather than being a second copy of the same thing. */
  .bottomnav { display: none; }
  #dash main { padding-bottom: 40px; }

  .topnav { display: flex; align-items: center; gap: 2px; }
  .topnav a {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 40px;
    padding: 0 12px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--muted);
    font-size: 13.5px;
    font-weight: 600;
    white-space: nowrap;
  }
  .topnav a[aria-current='page'] { color: var(--accent); background: var(--accent-soft); }
}

@media (min-width: 1200px) {
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (hover: hover) {
  .mod:hover { border-color: var(--accent); }
  .topnav a:hover, .bottomnav a:hover { background: var(--surface-2); }
}

/* The mark is a file now, not a letter. Swapping the artwork swaps it here,
   in the sign in card, in the app icon and on the home screen tile. */
img.mark { border-radius: 9px; object-fit: contain; background: #fff; padding: 3px; }

.hotline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  text-decoration: none;
  min-height: var(--tap);
}
.hotline .ico { font-size: 18px; }
.hotline b { display: block; font-size: 15px; letter-spacing: 0.02em; }
.hotline span span { font-size: 11px; opacity: 0.8; }

.social {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 2px;
  margin: 6px 0 2px;
}
.social a {
  padding: 8px 10px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  border-radius: 9px;
  color: var(--muted);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 600;
}
.social a:active { background: var(--surface-2); color: var(--accent); }

.foot { align-items: center; gap: 10px; }

@media (hover: hover) {
  .social a:hover { color: var(--accent); background: var(--surface-2); }
  .hotline:hover { filter: brightness(0.97); }
}
