/* /static/marketing.css -- ported from bayis.co.uk's actual stylesheet.
   Bootstrap stays for this page specifically, matching the parent site's
   real markup (cards, grid, navbar) rather than reimplementing it. */

:root {
  --text: #444;
  --border: #AAA;
  --flat-bg: #FFF;
  --dark-bg: #333;
  --light-bg: #EEE;
  --link-hover: #FFF;
}

body {
  font-family: "Felix Titling", "Bookman Old Style", Serif;
  background-color: var(--flat-bg);
  color: var(--text);
}

h1, h2 { font-family: "Felix Titling", "Bookman Old Style", Serif; color: var(--text); }

.navbar-nav .nav-link { color: var(--light-bg) !important; text-decoration: none; }
.navbar-nav .nav-link:hover { color: var(--link-hover) !important; }
.navbar-toggler { border-color: var(--light-bg) !important; padding: 10px 15px; height: 45px; }
.navbar-toggler-icon {
  background-image: none; width: 30px; height: 3px;
  background-color: var(--light-bg); position: relative; display: inline-block;
}
.navbar-toggler-icon::before, .navbar-toggler-icon::after {
  content: ''; display: inline-block; width: 30px; height: 3px;
  background-color: var(--light-bg); position: absolute; left: 0;
}
.navbar-toggler-icon::before { top: -8px; }
.navbar-toggler-icon::after { top: 8px; }

.navbar { background-color: var(--dark-bg); }
.navbar-brand,
.navbar-brand:hover,
.navbar-brand:focus {
  color: var(--flat-bg);
  text-decoration: none;
}


footer {
  background-color: var(--dark-bg);
  color: var(--flat-bg);
  text-align: center;
  padding: 20px;
}
footer p,
footer span { color: var(--flat-bg); }
footer a { color: var(--light-bg); text-decoration: none; }
footer a:hover { color: var(--link-hover); text-decoration: none; }

/* link columns align left, the version and copyright lines below stay centred */
footer .row > * { text-align: left; }
footer ul { list-style: none; padding-left: 0; margin-bottom: 0; }
footer li { margin-bottom: 0.35rem; }


.btn-custom { background-color: var(--dark-bg); color: var(--flat-bg); border: none; }
.btn-custom:hover { background-color: var(--border); color: var(--dark-bg); }

/* anchors styled as buttons: out-rank link rules such as ".prose a" and Bootstrap's underline */
a.btn.btn-custom,
a.btn.btn-custom:visited,
a.btn.btn-custom:focus {
  color: var(--flat-bg);
  text-decoration: none;
}

a.btn.btn-custom:hover,
a.btn.btn-custom:active {
  background-color: var(--border);
  color: var(--dark-bg);
  text-decoration: none;
}

.logo-banner {
  display: block;
  margin: 20px auto;
  font-family: "Felix Titling", "Bookman Old Style", Serif;
  font-size: 3.5rem;
  letter-spacing: -0.02em;
  color: var(--flat-bg);
}

.section-light { background-color: var(--light-bg); color: var(--text); }
.section-light--panel { border: 2px solid var(--border); }
.section-dark  { background-color: var(--dark-bg); color: var(--flat-bg); }

.card:hover { box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); transition: box-shadow 0.3s ease; }

pre {
  background: #fff;
  border: 1px solid var(--border);
  padding: 1rem;
  border-radius: 4px;
  font-size: 0.85rem;
  overflow-x: auto;
}

/* ---------- app components (appended; the marketing rules above come first) ---------- */

:root {
  --muted: #777;
  --hairline: #ddd;
  --panel-bg: #f7f7f7;
  --accent: #1d4ed8;
  --good: #166534;
  --warn: #92400e;
  --bad: #991b1b;
}

.app-main { font-size: 0.875rem; }
/* .app-main { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; } */
.app-main h2 { font-size: 1rem; font-weight: 600; margin-bottom: 0.5rem; }
.app-main h3 { font-size: 0.95rem; font-weight: 600; }

/* app bar under the shared navbar */
.app-bar { background: var(--light-bg); border-bottom: 2px solid var(--border); }
.app-nav { display: flex; gap: 1rem; }
.app-nav a { font-size: 0.85rem; color: var(--muted); text-decoration: none; }
.app-nav a:hover, .app-nav a.active { color: var(--text); font-weight: 600; }
.app-status { font-size: 0.75rem; color: var(--muted); }
.run-selector {
  font-size: 0.8rem; border: 1px solid var(--border);
  padding: 0.25rem 0.5rem; background: var(--flat-bg); color: var(--text); max-width: 400px;
}

/* login */
.login-form { max-width: 320px; margin: 3rem auto; display: flex; flex-direction: column; gap: 1rem; }
.login-form__field { display: flex; flex-direction: column; gap: 0.3rem; }
.login-form__field label { font-size: 0.75rem; color: var(--muted); }
.login-form__field input { border: 1px solid var(--border); padding: 0.5rem 0.6rem; font-size: 0.9rem; }
.login-form__error { font-size: 0.8rem; color: var(--bad); min-height: 1.2em; }
.login-form[hidden] { display: none; }

/* meta grid */
.meta-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px; background: var(--hairline); border: 1px solid var(--hairline); margin-bottom: 1.5rem;
}
.meta-grid--cards { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.meta-item { background: var(--flat-bg); padding: 1rem; display: flex; flex-direction: column; }
.meta-item .value { font-size: 1.5rem; font-weight: 700; line-height: 1; }
.meta-item .value--small { font-size: 0.9rem; }
.meta-item .label {
  font-size: 0.7rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.05em; margin-top: 0.3rem;
}

/* tabs */
.tabs { display: flex; border-bottom: 2px solid var(--text); margin-bottom: 1.5rem; }
.tab {
  padding: 0.5rem 1rem; font-size: 0.8rem; font-weight: 500;
  background: none; border: none; border-bottom: 2px solid transparent;
  margin-bottom: -2px; cursor: pointer; color: var(--muted);
}
.tab.active, .tab:hover { color: var(--text); }
.tab.active { border-bottom-color: var(--text); }

/* charts and lists */
.chart-layout { display: grid; grid-template-columns: 1fr 280px; gap: 1rem; height: 420px; margin-bottom: 2rem; }
.chart-container { position: relative; height: 100%; }
.chart-box { position: relative; height: 300px; margin-bottom: 2rem; }
.referrer-list { overflow-y: auto; border-left: 1px solid var(--hairline); padding-left: 0.75rem; font-size: 0.8rem; }
.referrer-item { display: flex; align-items: center; gap: 0.5rem; padding: 0.3rem 0; cursor: pointer; }
.referrer-item:hover { background: var(--panel-bg); }
.referrer-item.active { font-weight: 600; }
.referrer-item__colour { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.referrer-item__name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.referrer-item__count { color: var(--muted); font-size: 0.75rem; }

/* tables */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.data-table th {
  text-align: left; padding: 0.4rem 0.6rem; font-size: 0.7rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); border-bottom: 2px solid var(--text);
}
.data-table td { padding: 0.4rem 0.6rem; border-bottom: 1px solid var(--hairline); }
.data-table tr:hover td { background: var(--panel-bg); }

/* text and panels */
.hint { font-size: 0.8rem; color: var(--muted); margin-bottom: 1rem; }
.section-title {
  font-size: 0.7rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--muted); margin: 1rem 0 0.4rem;
}
.summary-item__meta { font-size: 0.7rem; color: var(--muted); }
.error-panel { padding: 1.5rem 0; color: var(--muted); font-size: 0.85rem; }

/* journeys and geography */
.graph-layout { display: grid; grid-template-columns: 1fr 280px; gap: 1rem; height: 560px; margin-bottom: 2rem; }
.graph-canvas { border: 1px solid var(--hairline); height: 100%; }
.toolbar { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.toolbar .hint { margin-bottom: 0; }
#map { height: 70vh; min-height: 420px; }
.legend { background: #fff; padding: 6px 10px; font: 12px sans-serif; line-height: 18px; }
.legend label { display: block; cursor: pointer; }
.legend .swatch { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin: 0 6px 0 4px; }
