/* Wah-Kit shared styles */
@font-face { font-family: 'Bricolage Grotesque'; font-weight: 600; font-display: swap; src: url('fonts/bricolage-grotesque-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Bricolage Grotesque'; font-weight: 800; font-display: swap; src: url('fonts/bricolage-grotesque-latin-800-normal.woff2') format('woff2'); }
:root {
  --ink: #1D1A39;
  --ink-soft: #4A4766;
  --muted: #6B6886;
  --ground: #F4F4F8;
  --surface: #FFFFFF;
  --line: #DFDFE8;
  --accent: #F2552C;        /* logo bar, decorative */
  --accent-strong: #C23A14; /* buttons with white text (meets contrast) */
  --accent-soft: #FDE7E0;
  --blue: #1F5FD1;
  --radius: 14px;
  --font-display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
}
a { color: var(--blue); }
a:hover { color: #133F91; }
img, svg, canvas { max-width: 100%; }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }

/* ---------- header ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px 24px; flex-wrap: wrap; min-height: 64px; padding-top: 8px; padding-bottom: 8px;
}
.brand {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-display); font-weight: 800; font-size: 30px;
  letter-spacing: -1px; line-height: 1; color: var(--ink); text-decoration: none;
}
.brand:hover { color: var(--ink); }
.brand .bar { width: 20px; height: 8px; border-radius: 4px; background: var(--accent); margin-top: 3px; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.site-nav a {
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--ink-soft); text-decoration: none; font-weight: 700; font-size: 16px;
  padding: 10px 2px; border-bottom: 3px solid transparent; white-space: nowrap;
}
.site-nav a .ni { font-size: 17px; line-height: 1; }
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.site-nav .short { display: none; }
/* Space the phone's bottom menu takes up (0 where there is none): fixed buttons sit above it. */
:root { --tabbar: 0px; }

.acct-menu { max-height: calc(100vh - 90px); overflow-y: auto; }
.acct-item .i { display: inline-block; width: 24px; }
.acct-sub { padding: 10px 10px 2px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); border-top: 1px solid var(--line); margin-top: 6px; }

/* ---------- footer ---------- */
.site-footer { margin-top: 56px; padding: 28px 0 36px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.site-footer a { color: var(--ink-soft); }

/* ---------- common bits ---------- */
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.5px; line-height: 1.15; margin: 0; }
.page-intro { padding: 32px 0 20px; }
.page-intro h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; }
.page-intro p { margin: 8px 0 0; color: var(--ink-soft); max-width: 720px; }

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid transparent;
  font: 600 15px var(--font-body); cursor: pointer; text-decoration: none;
}
.btn-primary { background: var(--accent-strong); color: #fff; }
.btn-primary:hover { background: #A12F0F; color: #fff; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; color: #fff; }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--ground); }
.btn:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible, button:focus-visible {
  outline: 3px solid #8FB2F5; outline-offset: 2px;
}

.prose { max-width: 760px; }
.prose h2 { font-size: 24px; margin: 36px 0 10px; }
.prose ol, .prose ul { padding-left: 22px; }
.prose li { margin: 4px 0; }
.prose code { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; font-size: 14px; }

/* ---------- account (header) ---------- */
.site-header .wrap { position: relative; }
.acct { display: flex; align-items: center; min-height: 44px; }
.acct:empty { display: none; }
.acct-signin { min-height: 40px; padding: 0 16px; font-size: 14px; }
.acct-wrap { position: relative; }
.acct-btn { width: 44px; height: 44px; padding: 0; border: none; background: transparent; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.acct-btn:hover .acct-pic { box-shadow: 0 0 0 3px var(--line); }
.acct-pic { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; display: block; }
.acct-initial { display: flex; align-items: center; justify-content: center; background: var(--ink); color: #fff; font-weight: 700; }
.acct-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; width: min(280px, calc(100vw - 32px));
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(29,26,57,.16);
  padding: 8px; display: flex; flex-direction: column;
}
.acct-who { padding: 8px 10px 4px; display: flex; flex-direction: column; min-width: 0; }
.acct-who span { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.acct-plan { padding: 0 10px 8px; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.acct-item { display: block; text-align: start; padding: 10px; border-radius: 8px; border: none; background: transparent; color: var(--ink); font: 15px var(--font-body); text-decoration: none; cursor: pointer; }
.acct-item:hover { background: var(--ground); color: var(--ink); }
@media (max-width: 760px) {
  /* Phones and small tablets: logo and account at the top; the four menu buttons in a bar at the bottom, like an app. */
  .site-header .wrap { flex-wrap: nowrap; }
  .acct { margin-left: auto; }
  .site-nav { position: fixed; z-index: 50; left: 0; right: 0; bottom: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0;
    background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -6px 18px rgba(29,26,57,.07); padding: 0 4px env(safe-area-inset-bottom); }
  .site-nav a { flex-direction: column; justify-content: center; gap: 2px; min-height: 60px; padding: 6px 2px 5px; border-bottom: 0; border-top: 3px solid transparent;
    font-size: 12px; font-weight: 700; text-align: center; min-width: 0; -webkit-tap-highlight-color: transparent; }
  .site-nav a .ni { font-size: 21px; }
  .site-nav a[aria-current="page"] { border-top-color: var(--accent); color: var(--ink); background: linear-gradient(180deg, var(--accent-soft), transparent 80%); }
  .site-nav .full { display: none; }
  .site-nav .short { display: inline; }
  html.has-tabbar { --tabbar: calc(64px + env(safe-area-inset-bottom)); }
  html.has-tabbar body { padding-bottom: var(--tabbar); }
  /* While typing, the phone keyboard is up: the bar steps aside. */
  html.kb-open .site-nav { display: none; }
  html.kb-open { --tabbar: 0px; }
}
@media (max-width: 340px) { .site-nav a { font-size: 11px; } }

/* ---------- phones: the tool comes first ----------
   Intro paragraphs show two lines with "More" (account.js adds .wk-clamp); text boxes use 16px text
   so iPhones don't zoom in when you start typing. */
@media (max-width: 640px) {
  .page-intro { padding: 16px 0 10px; }
  .page-intro p.wk-clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .page-intro p.wk-clamp.open { display: block; }
  .wk-more { border: 0; background: none; padding: 8px 0; min-height: 36px; font: 600 14px var(--font-body); color: var(--blue); cursor: pointer; }
  input[type=text], input[type=email], input[type=tel], input[type=number], input[type=search], input[type=url], input[type=password], input[type=date], input[type=time], input:not([type]), select, textarea { font-size: 16px; }
}
