/* Shared styles for every app page. No external resources. */

:root {
  color-scheme: light dark;

  --bg: #f7f7f8;
  --surface: #ffffff;
  --text: #1c1c1e;
  --muted: #5b5b63;
  --border: #e2e2e6;
  --focus: #1a5fd0;

  /* Default accent; each app overrides these via a class on <body>. */
  --accent: #3a3a40;
  --accent-text: #3a3a40;
  --accent-gradient: linear-gradient(135deg, #6b6b73, #3a3a40);

  --radius: 14px;
  --font: -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111113;
    --surface: #1c1c1f;
    --text: #f2f2f4;
    --muted: #a8a8b0;
    --border: #2e2e33;
    --focus: #7fb0ff;
    --accent: #c8c8ce;
    --accent-text: #c8c8ce;
  }
}

/* ---- Per-app accent tokens ---- */

.app-mywallet {
  --accent: #4f46e5;
  --accent-text: #4338ca;
  --accent-gradient: linear-gradient(135deg, #4f46e5 0%, #3d7be8 50%, #1fb5a6 100%);
}

@media (prefers-color-scheme: dark) {
  .app-mywallet {
    --accent: #818cf8;
    --accent-text: #a5b4fc;
  }
}

.app-myhome {
  --accent: #4f46e5;
  --accent-text: #4338ca;
  --accent-gradient: linear-gradient(135deg, #4f46e5 0%, #3b82f6 50%, #10b981 100%);
}

@media (prefers-color-scheme: dark) {
  .app-myhome {
    --accent: #818cf8;
    --accent-text: #a5b4fc;
  }
}

.app-myworth {
  --accent: #2a78d6;
  --accent-text: #1c4fa8;
  --accent-gradient: linear-gradient(135deg, #1c4fa8 0%, #2a78d6 50%, #3a8de8 100%);
}

@media (prefers-color-scheme: dark) {
  .app-myworth {
    --accent: #3987e5;
    --accent-text: #8ab8f2;
  }
}

/* ---- Base ---- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
}

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

/* Thin accent band at the very top of each page */
body::before {
  content: "";
  display: block;
  height: 4px;
  background: var(--accent-gradient);
}

a {
  color: var(--accent-text);
  text-underline-offset: 2px;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

h1,
h2,
h3 {
  line-height: 1.25;
  margin: 0;
}

h1 {
  font-size: 1.9rem;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 1.25rem;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

h3 {
  font-size: 1.05rem;
  margin-top: 1.25rem;
  margin-bottom: 0.25rem;
}

p,
ul {
  margin: 0 0 0.9rem;
}

ul {
  padding-left: 1.25rem;
}

li + li {
  margin-top: 0.3rem;
}

/* ---- Header / nav ---- */

.site-header {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  font-size: 0.95rem;
}

.site-header a {
  color: var(--muted);
  text-decoration: none;
}

.site-header a:hover {
  color: var(--text);
  text-decoration: underline;
}

.site-header a[aria-current="page"] {
  color: var(--text);
  font-weight: 600;
}

main {
  padding: 32px 0 40px;
}

/* ---- App hero ---- */

.hero {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 1.5rem;
}

.app-icon {
  width: 72px;
  height: 72px;
  border-radius: 22.5%;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.hero p {
  margin: 0.25rem 0 0;
  color: var(--muted);
}

.meta {
  color: var(--muted);
  font-size: 0.95rem;
}

.summary {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin: 1rem 0 0.5rem;
}

.summary p:last-child {
  margin-bottom: 0;
}

/* ---- Cards ---- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.email {
  font-size: 1.1rem;
  font-weight: 600;
  user-select: all;
  -webkit-user-select: all;
  word-break: break-all;
}

/* ---- App list (home) ---- */

.app-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  gap: 14px;
}

.app-card {
  display: flex;
  align-items: center;
  gap: 16px;
}

.app-card .app-icon {
  width: 60px;
  height: 60px;
}

.app-card h3 {
  margin: 0 0 0.2rem;
  font-size: 1.15rem;
}

.app-card .subtitle {
  margin: 0 0 0.35rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.app-card > a {
  display: block;
  flex-shrink: 0;
  line-height: 0;
}

.app-card .app-name {
  color: inherit;
  text-decoration: none;
}

.app-card .app-name:hover {
  text-decoration: underline;
}

.app-card .links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 16px;
  margin: 0;
  font-size: 0.95rem;
}

/* ---- App Store button ---- */

.store-button {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 10px;
  background: var(--accent-text);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.store-button:hover {
  text-decoration: none;
  filter: brightness(1.1);
}

.store-button-small {
  padding: 5px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
}

@media (prefers-color-scheme: dark) {
  .store-button {
    background: var(--accent);
    color: #111113;
  }
}

/* ---- Footer ---- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 20px 0 32px;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer p {
  margin: 0;
}

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

@media (max-width: 420px) {
  body {
    font-size: 16px;
  }

  h1 {
    font-size: 1.6rem;
  }

  .app-icon {
    width: 60px;
    height: 60px;
  }
}
