/* ==========================================================================
   Audience Research Tool — matches twilightmesa.com's design system.
   Tokens copied from that site's css/style.css; components adapted for
   a login page + dashboard/table content rather than a marketing page.
   ========================================================================== */

:root {
  --bg: #0b0b0c;
  --bg-alt: #131315;
  --text: #ede9e3;
  --text-dim: #8f8d88;
  --line: rgba(237, 233, 227, 0.16);
  --line-strong: rgba(237, 233, 227, 0.32);

  --sun-a: #f4b942;
  --sun-b: #e8543c;
  --moon-a: #7c8ce0;
  --moon-b: #9b5de5;

  --red: #e8543c;
  --green: #4caf7d;

  --serif: ui-serif, Georgia, "Iowan Old Style", "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --max: 900px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* ---- Top nav (matches twilightmesa.com) ---- */

.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px clamp(24px, 5vw, 56px);
  border-bottom: 1px solid var(--line);
}

.site-nav .wordmark {
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text);
  opacity: 0.9;
}

.site-nav .wordmark .sub {
  display: block;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: none;
  color: var(--text-dim);
  margin-top: 4px;
}

.site-nav .nav-links {
  display: flex;
  gap: 24px;
}

.site-nav .nav-links a {
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-dim);
  transition: color 0.2s ease;
}

.site-nav .nav-links a:hover {
  color: var(--text);
}

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 56px 24px 100px;
}

/* ---- Twilight mark (copied from twilightmesa.com) ---- */

.tm-mark {
  position: relative;
  width: var(--mark-size, 120px);
  height: var(--mark-size, 120px);
  margin: 0 auto;
}
.tm-mark .tm-ring {
  position: absolute;
  inset: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
}
.tm-mark .tm-line {
  position: absolute;
  left: 6%;
  right: 6%;
  top: 50%;
  height: 1px;
  background: var(--line-strong);
  transform: translateY(-50%);
}
.tm-mark .tm-dot {
  position: absolute;
  top: 0;
  left: 0;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: background 0.6s ease, box-shadow 0.6s ease;
}
.tm-mark .tm-dot.is-sun {
  background: radial-gradient(circle at 32% 28%, var(--sun-a), var(--sun-b));
  box-shadow: 0 0 20px 2px rgba(232, 84, 60, 0.5);
}
.tm-mark .tm-dot.is-moon {
  background: radial-gradient(circle at 32% 28%, var(--moon-a), var(--moon-b));
  box-shadow: 0 0 20px 2px rgba(124, 140, 224, 0.5);
}

/* ---- Login page ---- */

.login-page {
  min-height: calc(100vh - 160px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.login-page h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 5vw, 40px);
  margin: 32px 0 8px;
}

.login-page .lede {
  color: var(--text-dim);
  font-size: 14px;
  margin: 0 0 40px;
}

.login-form {
  width: 100%;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}

.field input {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line-strong);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  padding: 8px 2px;
  transition: border-color 0.25s ease;
}

.field input:focus {
  outline: none;
  border-color: var(--text);
}

.field label {
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-dim);
}

.btn {
  display: inline-block;
  padding: 15px 40px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  font: inherit;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text);
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.btn:hover {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.error {
  color: var(--red);
  font-size: 13px;
  margin: 0 0 8px;
}

/* ---- Dashboard / content pages ---- */

h1.page-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 5vw, 38px);
  margin: 0 0 8px;
}

.subtitle, .hint {
  color: var(--text-dim);
  font-size: 14px;
  margin: 0 0 24px;
}

h2.section-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 14px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 48px 0 20px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.back { margin: 0 0 28px; }
.back a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: color 0.2s ease;
}
.back a:hover { color: var(--text); }

.downloads a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 13px;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 2px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.downloads a:hover { color: var(--sun-b); border-color: var(--sun-b); }

.profile-list { list-style: none; padding: 0; margin: 0; }
.profile-list li { padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.profile-list a { text-decoration: none; color: var(--text); transition: color 0.2s ease; }
.profile-list a:hover { color: var(--sun-b); }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th, td {
  text-align: left;
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  color: var(--text-dim);
  font-weight: 400;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
td.quote { color: var(--text-dim); font-style: italic; }
td a { color: var(--text-dim); text-decoration: none; transition: color 0.2s ease; }
td a:hover { color: var(--sun-b); }

/* ---- Responsive ---- */

@media (max-width: 640px) {
  table, thead, tbody, th, td, tr { display: block; }
  th { display: none; }
  td { border-bottom: none; padding: 4px 0; }
  tr { padding-bottom: 20px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
}
