/* Shared design tokens and base components for public pages and the app. */
:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #eef1f5;
  --text: #1b2430;
  --muted: #5b6675;
  --border: #d9dee5;
  --primary: #14324a;
  --primary-hover: #1d4566;
  --on-primary: #ffffff;
  --accent: #b7832a;
  --success: #1f7a4d;
  --success-bg: #e6f4ec;
  --danger: #b42318;
  --danger-bg: #fdecea;
  --warn: #b54708;
  --highlight: #fff1a8;
  --focus: #2f6fdf;
  --radius: 10px;
  --radius-small: 6px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .1);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
}
img, svg { max-width: 100%; }
a { color: var(--primary); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--muted); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  min-height: 44px; padding: .55em 1.2em;
  border: 1px solid var(--primary); border-radius: var(--radius-small);
  background: var(--primary); color: var(--on-primary);
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--primary-hover); }
.icon { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; flex: none;
  border: 1px solid var(--border); border-radius: var(--radius-small); background: var(--surface);
  color: var(--primary); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn[aria-pressed="true"] { border-color: var(--primary); background: #eef3f8; box-shadow: inset 0 0 0 1px var(--primary); }
.icon-btn .icon { width: 20px; height: 20px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--primary); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: var(--danger); border-color: var(--danger); }
.btn-small { min-height: 36px; padding: .35em .9em; font-size: .9rem; }
.btn-block { width: 100%; }

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

input:not([type]), input[type="text"], input[type="search"], input[type="email"], input[type="password"], input[type="number"], select, textarea {
  width: 100%; min-height: 44px; padding: .5em .75em;
  border: 1px solid var(--border); border-radius: var(--radius-small);
  background: var(--surface); color: var(--text); font: inherit;
}
label { font-weight: 600; }
.field { margin-bottom: 14px; }
.field label { display: block; margin-bottom: 4px; }

.alert { padding: 12px 14px; border-radius: var(--radius-small); margin-bottom: 14px; }
.alert-error { background: var(--danger-bg); color: var(--danger); }
.alert-info { background: var(--surface-2); color: var(--text); }

.badge {
  display: inline-block; padding: .1em .55em; border-radius: 999px;
  background: var(--surface-2); color: var(--muted); font-size: .8rem; font-weight: 600;
}
.badge-accent { background: #f7ecd8; color: #7a5410; }
