@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400..1000;1,9..40,400..1000&family=JetBrains+Mono:wght@500;700&family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,600;0,6..72,700;1,6..72,400;1,6..72,600;1,6..72,700&display=swap');
/* Design tokens are the single source of truth and live in css/tokens.css.
 * They are imported rather than copied, because a copy is what let the palette
 * drift into four disagreeing versions in the first place.
 *
 * The look follows the GTM Base design system: plain ground, 1.5px ink
 * edges, square corners, solid offset shadows, and one blue (source) that
 * means act here. See docs/plans/2026-11-26-gtm-base-design-system-mapping.md. */
@import url('tokens.css');

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

html  { font-size: 16px; scroll-behavior: smooth; }
body  {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  background: var(--ground);
  color: var(--ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { text-wrap: balance; }

/* ── UTILITIES ── */
.mono { font-family: var(--font-mono); }
/* Kept for markup that still uses it. Source is the only accent. */
.grad-text { color: var(--source); }
/* Eyebrow: the short label above a headline. Sentence case, ink, never
 * uppercase. Uppercase belongs to mono labels only. */
.eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-eyebrow);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: var(--leading-snug);
  color: var(--ink);
}

/* ── NAV ── */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 var(--gutter); height: 60px;
  background: var(--ground-nav);
  backdrop-filter: blur(16px);
  border-bottom: var(--line);
}
/* The MICW mark at 30px beside the name in DM Sans 800, the same lockup
 * rule as the GTM Base mark. Below 900px the short name replaces the full
 * one so the Account button never spills off the edge. */
.nav-brand {
  display: inline-flex; align-items: center; gap: var(--gap-10);
  white-space: nowrap; color: var(--ink);
  font-weight: 800; font-size: 17px; letter-spacing: -0.03em; line-height: 1;
}
.nav-brand__mark {
  display: inline-flex; align-items: center; gap: var(--gap-10);
}
.nav-brand__mark::before {
  content: "";
  flex: none;
  width: 30px; height: 30px;
  background: url('../img/micw-mark.svg') center / contain no-repeat;
}
@media (min-width: 901px) {
  /* The full name shows, so the short name collapses to the mark alone. */
  .nav-brand__mark { font-size: 0; gap: 0; }
}
@media (max-width: 900px) {
  .nav-brand__name { display: none; }
}
.nav-links { display: flex; align-items: center; gap: 20px; }
.nav-links a {
  font-size: 15px; font-weight: 700; color: var(--ink-mid);
  transition: color var(--motion-fast);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a[aria-current="page"]:not(.nav-btn) { color: var(--ink); }
.nav-links a.nav-btn {
  padding: 8px 14px;
  border: var(--line); border-radius: 0;
  background: var(--surface); color: var(--ink);
  font-size: 14px; font-weight: 800; line-height: 1.2;
  font-family: var(--font-body);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform var(--motion-fast) ease, box-shadow var(--motion-fast) ease;
}
.nav-links a.nav-btn:hover { color: var(--ink); transform: translate(-2px, -2px); box-shadow: var(--shadow-lift); }
.nav-links a.nav-btn:active { transform: translate(2px, 2px); box-shadow: var(--shadow-press); }
.nav-logout {
  font-size: var(--text-meta); color: var(--ink-quiet); cursor: pointer;
  background: none; border: none;
  font-family: var(--font-mono); font-weight: 700;
  letter-spacing: var(--tracking-meta); text-transform: uppercase;
  transition: color var(--motion-fast); padding: 0;
}
.nav-logout:hover { color: var(--state-error); }


/* ── FOCUS ──
   Every control shows one visible ring: 3px solid source, offset 3px. This
   is the file every page imports, so the ring lives here. Never remove it
   without a replacement meeting the same contrast bar. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible,
.card:focus-visible {
  outline: var(--focus-width) solid var(--focus-ring);
  outline-offset: var(--focus-offset);
}

/* Motion. Under reduced motion the lift and press go away. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* ── PAGE ── */
.page { padding-top: 60px; }
.container { max-width: var(--content-max); margin: 0 auto; padding: 0 var(--gutter); }

/* ── PAGE HEADER ── */
.page-header { padding: 48px 0 32px; border-bottom: var(--line); margin-bottom: 36px; }
.page-header .eyebrow { margin-bottom: 8px; display: block; }
.page-header h1 {
  font-size: var(--text-h1);
  font-weight: 850; letter-spacing: var(--tracking-display); line-height: 1.05;
}
.page-header p { font-size: var(--text-body); color: var(--ink-mid); margin-top: 6px; line-height: var(--leading-body); max-width: 36em; }

/* ── CARDS ── */
.card {
  background: var(--surface);
  border: var(--line);
  border-radius: 0;
  box-shadow: var(--shadow);
  display: block;
}
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--gap-18); margin-bottom: 32px; }
.card-inner { padding: var(--space-4); }
.card-icon { font-size: 24px; margin-bottom: 14px; display: block; }
.card-title { font-size: var(--text-h3); font-weight: 800; letter-spacing: var(--tracking-heading); line-height: 1.15; color: var(--ink); margin-bottom: 4px; }
.card-desc { font-size: var(--text-body-sm); color: var(--ink-mid); line-height: 1.5; }
/* Tag: mono, bordered in its own colour, always a word. */
.card-tag {
  display: inline-block; margin-top: 10px;
  font-family: var(--font-mono);
  font-size: var(--text-meta); font-weight: 700; line-height: 1.5;
  padding: 2px 8px; border: 1.5px solid currentColor; border-radius: 0;
  white-space: nowrap;
}
.tag-blue   { background: var(--source-tint); color: var(--ink); }
.tag-green  { background: var(--ok-tint); color: var(--ok); }
.tag-amber  { background: var(--due-tint); color: var(--due); }
.tag-faint  { background: var(--surface); color: var(--ink-quiet); }
.card-arrow { font-size: 18px; color: var(--ink-quiet); margin-left: auto; }

/* Section label: label-mono, uppercase, quiet. */
.section-label {
  font-family: var(--font-mono);
  font-size: var(--text-meta); font-weight: 700; letter-spacing: var(--tracking-meta); text-transform: uppercase;
  color: var(--ink-quiet);
  padding-bottom: 10px; border-bottom: var(--hairline);
  margin-bottom: 14px;
}

/* Back link */
.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: var(--target-min);
  font-family: var(--font-mono);
  font-size: var(--text-meta); font-weight: 700; letter-spacing: var(--tracking-meta); text-transform: uppercase;
  color: var(--ink-quiet); margin-bottom: 20px;
  transition: color var(--motion-fast);
}
.back-link:hover { color: var(--ink); }

/* ── REVEAL ANIMATION ── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--motion-slow) var(--ease-out),
              transform var(--motion-slow) var(--ease-out);
}
.reveal.visible { opacity: 1; transform: none; }

/* ── CHECKLIST ── */
.progress-label { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.progress-wrap { height: 5px; background: var(--rule); border: 1px solid var(--ink); overflow: hidden; margin-bottom: 28px; }
.progress-fill { height: 100%; background: var(--source); transition: width 0.35s ease; }

.cl-section { margin-bottom: 28px; }
.cl-section-h {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--faint); padding-bottom: 8px;
  border-bottom: 1px solid var(--border); margin-bottom: 6px;
}
.cl-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 9px 8px; border-radius: 8px; cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid #F5F4F2;
}
.cl-item:last-child { border-bottom: none; }
.cl-item:hover { background: #F5F4F2; }
.cl-cb {
  width: 17px; height: 17px; border-radius: 5px;
  border: 1.5px solid var(--border); flex-shrink: 0; margin-top: 1px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s; background: var(--card);
}
.cl-cb.checked { background: var(--ink); border-color: transparent; }
.cl-cb.checked::after { content: '✓'; color: #fff; font-size: 9px; font-weight: 700; }
.cl-label { font-size: 13.5px; color: var(--text); line-height: 1.45; flex: 1; cursor: pointer; }
.cl-label.done { text-decoration: line-through; color: var(--faint); }

.reset-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-family: 'DM Sans', sans-serif;
  color: var(--muted); background: none;
  border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 14px; cursor: pointer; margin-top: 16px;
  transition: all 0.2s;
}
.reset-btn:hover { color: var(--red); border-color: var(--red); }

.tip-box {
  padding: 12px 16px; font-size: 12.5px; line-height: 1.6; color: var(--muted);
  background: #FFFBEB; border-left: 3px solid var(--amber);
  border-radius: 0 8px 8px 0; margin-top: 20px;
}

/* ── TRIP CARD ── */
.trip-card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; margin-bottom: 12px; }
.trip-card:hover { border-color: #d0cec9; box-shadow: 0 4px 20px rgba(0,0,0,0.07); }
.trip-hero {
  height: 200px; position: relative; overflow: hidden;
  background: linear-gradient(160deg, #1a1714 0%, #1e2860 50%, #1a1714 100%);
  display: flex; align-items: flex-end; padding: 20px 24px;
}
.trip-hero-mtn {
  position: absolute; inset: 0; opacity: 0.12;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 200'%3E%3Cpath d='M0 200 L120 70 L220 120 L340 20 L440 90 L540 40 L660 100 L760 55 L800 80 L800 200Z' fill='white'/%3E%3C/svg%3E") center/cover;
}
.trip-badge {
  position: relative; z-index: 1;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  background: rgba(61,99,221,0.9); color: #fff;
  padding: 4px 10px; border-radius: 5px; margin-bottom: 8px; display: inline-block;
}
.trip-name {
  position: relative; z-index: 1;
  font-size: 32px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; color: #fff;
}
.trip-body { padding: 18px 20px; }
.trip-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.trip-dates { font-size: 13px; color: var(--muted); }
.trip-nights { font-family: 'JetBrains Mono', monospace; font-size: 10px; font-weight: 700; letter-spacing: 0.1em; color: var(--blue); text-transform: uppercase; }
.trip-stats { display: flex; gap: 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.trip-stat { flex: 1; text-align: center; padding: 10px; }
.trip-stat:not(:last-child) { border-right: 1px solid var(--border); }
.trip-stat-num { font-size: 20px; font-weight: 700; letter-spacing: -0.03em; color: var(--text); display: block; }
.trip-stat-label { font-family: 'JetBrains Mono', monospace; font-size: 8px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.trip-open-btn {
  display: block; width: 100%;
  padding: 13px; border-radius: 10px; border: none;
  background: var(--action); color: var(--on-action);
  font-size: 14px; font-weight: 600; font-family: 'DM Sans', sans-serif;
  cursor: pointer; margin-top: 14px; letter-spacing: 0.01em;
  transition: opacity 0.2s;
}
.trip-open-btn:hover { opacity: 0.9; }

.add-trip-card {
  border: 1.5px dashed var(--border); border-radius: 16px;
  padding: 28px 24px; text-align: center; cursor: default;
}
.add-trip-card p { font-size: 13px; color: var(--faint); line-height: 1.6; }
.add-trip-card code { font-family: 'JetBrains Mono', monospace; font-size: 11px; }

/* Legacy navigation compatibility classes retained by the shared stylesheet. */
.portal-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; height: 56px;
  background: var(--ground-nav);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.portal-brand { display: flex; align-items: center; gap: 12px; }
.portal-brand .mark { font-family: 'JetBrains Mono', monospace; font-size: 14px; font-weight: 700; }
.portal-divider { width: 1px; height: 16px; background: var(--border); }
.portal-client {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; font-weight: 700; letter-spacing: 0.06em; color: var(--text);
}
.portal-tier {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 5px;
  background: #EEF2FF; color: var(--blue);
}
.portal-tier.general { background: #F3EFFF; color: var(--purple); }
.portal-actions { display: flex; align-items: center; gap: 18px; }

@media (max-width: 600px) {
  .card-grid { grid-template-columns: 1fr; }
  .site-nav { gap: 10px; }
  .nav-links { gap: 12px; }
  .nav-links a { font-size: 14px; white-space: nowrap; }
  .nav-links a.nav-btn { padding: 7px 12px; font-size: 14px; }
  .page-header { padding: 32px 0 24px; }
  .portal-nav { padding: 0 16px; }
  .portal-actions { gap: 12px; }
  .portal-tier { display: none; }
}
