/* Shared styles for every page except the homepage (which uses home.css).
   Same identity as the homepage: cool paper, ink, marigold. */
@import url("https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400..800&family=Source+Serif+4:opsz,wght@8..60,400..600&display=swap");

:root {
  --bg: #f2f4f7;
  --card: #ffffff;
  --ink: #0d1726;
  --muted: #5b6678;
  --line: #d9dee6;
  --gold: #ffb81c;
  --accent: #0d1726;        /* links / primary buttons use ink */
  --accent-dark: #1f2f48;
  --danger: #b3261e;
  --ok: #17703f;
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --text: "Source Serif 4", Georgia, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--display);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

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

/* Header */
.site-header { background: var(--bg); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.logo { font-weight: 800; font-size: 1.7rem; letter-spacing: -0.045em; line-height: 1; }
.logo span { background: var(--gold); padding: 0.02em 0.2em 0.06em; margin-left: 0.06em; border-radius: 4px; }
nav { display: flex; gap: 6px; align-items: center; font-size: 0.95rem; font-weight: 600; }
nav a { padding: 8px 12px; border-radius: 6px; }
nav a:hover { background: rgba(13, 23, 38, 0.07); }
nav a.btn { padding: 10px 16px; }
nav a.btn:hover { background: var(--accent-dark); }

/* Buttons */
.btn {
  display: inline-block; background: var(--ink); color: #fff; border: 0;
  padding: 12px 20px; border-radius: 6px; font: 700 1rem var(--display); cursor: pointer;
}
.btn:hover { background: var(--accent-dark); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-outline { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }

/* Cards used on journalist profile and admin preview */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 30px 24px; padding-bottom: 50px; }
.card { display: flex; flex-direction: column; }
.card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 4px; background: #dde2ea; margin-bottom: 10px; }
.card .body { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card h3 { font-size: 1.1rem; line-height: 1.22; letter-spacing: -0.014em; }
.card:hover h3 { text-decoration: underline; text-underline-offset: 3px; }
.card p { color: var(--muted); font-size: 0.92rem; font-family: var(--text); }
.meta { margin-top: auto; display: flex; justify-content: space-between; font-size: 0.82rem; color: var(--muted); }
.tag { font-weight: 700; font-size: 0.85rem; }

.state { text-align: center; color: var(--muted); padding: 40px 0; grid-column: 1 / -1; }

/* Forms */
.form-card { background: var(--card); border-radius: 8px; padding: 30px; margin: 30px 0 50px; }
.form-card h1 { font-size: 1.8rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.form-card .sub { color: var(--muted); margin: 8px 0 22px; font-family: var(--text); font-size: 1.05rem; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; font-size: 0.92rem; margin-bottom: 6px; }
.field small { color: var(--muted); font-weight: 400; }
.field input, .field textarea, .field select {
  width: 100%; padding: 11px 12px; border: 1.5px solid #c3cad6; border-radius: 6px;
  font: 1rem var(--display); background: #fff; color: var(--ink);
}
.field textarea { font-family: var(--text); line-height: 1.55; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 3px solid var(--gold); border-color: var(--ink); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .row { grid-template-columns: 1fr; } .form-card { padding: 22px 18px; } }

.why { background: #fff3d1; border-left: 5px solid var(--gold); border-radius: 6px; padding: 16px 18px; margin: 0 0 24px; font-size: 0.95rem; }
.why ul { margin: 8px 0 0 18px; }

.msg { padding: 12px 14px; border-radius: 6px; margin-top: 14px; font-size: 0.93rem; display: none; }
.msg.ok { display: block; background: #e3f3ea; color: var(--ok); }
.msg.err { display: block; background: #fbe7e5; color: var(--danger); }

footer { background: var(--ink); color: #c4cddb; padding: 28px 0 34px; font-size: 0.9rem; text-align: center; margin-top: 40px; }
footer a { color: #fff; text-decoration: underline; text-underline-offset: 3px; margin: 0 8px; }

/* Serif for reading text */
.article .content p, .article .summary, .bio { font-family: var(--text); }

/* ---------- Signed-in name in the header ---------- */
.whoami-box { display: inline-flex; align-items: center; gap: 10px; margin-left: 8px; }
.whoami { font-weight: 700; padding: 6px 12px; border: 1.5px solid currentColor; border-radius: 999px; font-size: 0.92rem; }
.signout-link { background: none; border: 0; color: inherit; font: 600 0.85rem var(--display); text-decoration: underline; cursor: pointer; opacity: 0.8; padding: 4px; }
.signed-in nav a[href="apply.html"], .signed-in nav a[href="dashboard.html"]:not(.whoami),
.signed-in .indie-cta a[href="apply.html"], .signed-in .indie-empty a[href="apply.html"] { display: none !important; }

footer .wrap { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 4px; }

.signin-link { background: transparent; color: inherit; border: 1.5px solid currentColor; border-radius: 999px; padding: 7px 16px; font: 700 0.92rem var(--display); cursor: pointer; }
.signin-link:hover { background: var(--gold); color: #0d1726; border-color: var(--gold); }
#nx-toast { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 20px); max-width: min(92vw, 520px); background: #0d1726; color: #fff; padding: 12px 18px; border-radius: 8px; font: 600 0.92rem var(--display); opacity: 0; pointer-events: none; transition: 0.25s; z-index: 60; }
#nx-toast.show { opacity: 1; transform: translate(-50%, 0); }
