@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  /* Deep Obsidian Background */
  --bg: #05070e;
  /* Glass card background - slightly lighter than bg */
  --bg-card: rgba(13, 18, 30, 0.55);
  --text: #f8fafc;
  --muted: #94a3b8;
  
  /* Vibrant Neons */
  --accent: #00e7ff;      /* Electric Cyan */
  --accent-2: #bd34fe;    /* Neon Purple */
  --accent-glow: rgba(0, 231, 255, 0.4);
  
  --danger: #fb7185;
  --border: rgba(255, 255, 255, 0.08);
  --radius: 16px;
  
  /* Typography */
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-heading: "Space Grotesk", "Inter", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text);
  /* Glowing dynamic background */
  background:
    radial-gradient(1200px 800px at 15% -10%, rgba(0, 231, 255, 0.12) 0%, transparent 60%),
    radial-gradient(1000px 800px at 90% 10%, rgba(189, 52, 254, 0.12) 0%, transparent 55%),
    var(--bg);
}

a { 
  color: var(--accent); 
  text-decoration: none; 
  transition: all 0.3s ease;
}
a:hover { 
  text-shadow: 0 0 10px var(--accent-glow);
  filter: brightness(1.2);
}

h1, h2, h3 {
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
}

/* Gradient Text for Headings */
h1, h2 {
  background: linear-gradient(135deg, var(--text) 0%, var(--muted) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand h1 {
  background: linear-gradient(135deg, var(--text) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 1.25rem;
  margin: 0;
  font-weight: 700;
}

.wrap {
  width: min(920px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

header.app-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand img {
  height: 48px;
  width: auto;
  filter: drop-shadow(0 0 12px rgba(255,255,255,0.1));
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  padding: 0.5rem 0;
}

nav a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
  transition: all 0.3s ease;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
  box-shadow: 0 0 8px var(--accent);
}

nav a.active, nav a:hover {
  color: var(--text);
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}

nav a.active::after, nav a:hover::after {
  width: 100%;
}

.card {
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: 0 15px 50px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.05);
}

.banner {
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  background: rgba(42, 33, 16, 0.6);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(253, 230, 138, 0.2);
  color: #fde68a;
  font-size: 0.92rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.lede {
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 1.25rem;
}

.form-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

input[type="text"], input[type="month"] {
  flex: 1 1 280px;
  min-width: 0;
  padding: 0.9rem 1.25rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.3);
  color: var(--text);
  font-size: 1rem;
  font-family: var(--font-body);
  transition: all 0.3s ease;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

input[type="text"]:focus, input[type="month"]:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(0, 0, 0, 0.5);
  box-shadow: 0 0 0 1px var(--accent), 0 0 15px var(--accent-glow), inset 0 2px 4px rgba(0,0,0,0.2);
}

button, .btn {
  display: inline-block;
  appearance: none;
  border: 0;
  border-radius: 12px;
  padding: 0.9rem 1.5rem;
  background: linear-gradient(135deg, #1d4ed8 0%, var(--accent-2) 100%);
  color: #fff;
  font-weight: 700;
  font-family: var(--font-heading);
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 4px 15px rgba(189, 52, 254, 0.3);
}

button:hover:not(:disabled), .btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(189, 52, 254, 0.5);
  filter: brightness(1.15);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(1);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.result, .error {
  margin-top: 1.5rem;
  padding: 1.25rem 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  backdrop-filter: blur(12px);
}

.result { 
  background: rgba(0, 231, 255, 0.03); 
  border-color: rgba(0, 231, 255, 0.15);
  box-shadow: inset 0 0 20px rgba(0, 231, 255, 0.05);
}
.error { 
  background: rgba(251, 113, 133, 0.05); 
  border-color: rgba(251, 113, 133, 0.2); 
  color: #fecdd3; 
  box-shadow: inset 0 0 20px rgba(251, 113, 133, 0.05);
}

.result .balance {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  text-shadow: 0 0 15px var(--accent-glow);
  margin: 0.5rem 0;
}

.meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.roadmap h2 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}

.roadmap p, .roadmap li {
  color: var(--muted);
  line-height: 1.6;
}

.roadmap ul { padding-left: 1.25rem; }

.roadmap li::marker {
  color: var(--accent);
}

.status-pill {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  margin-left: 0.5rem;
  background: rgba(255,255,255,0.03);
}

.error-loud {
  font-size: 1.05rem;
  border-width: 2px;
  outline: none;
}

.req {
  display: inline-block;
  margin-left: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}

.radio-cards {
  display: grid;
  gap: 0.55rem;
}

.choice-card {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin: 0;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  cursor: pointer;
  font-weight: 400;
}

.choice-card:has(input:checked) {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-glow);
  background: rgba(0, 231, 255, 0.07);
}

.choice-card small {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 0.15rem;
}

.choice-card input {
  margin-top: 0.3rem;
  flex-shrink: 0;
}

.submit-hint {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 1.25rem 0 0.5rem;
}

button.submit-primary {
  width: 100%;
  margin-top: 0.5rem;
  padding: 1rem 1.25rem;
  font-size: 1.1rem;
  background: linear-gradient(135deg, #00c853, #00e7ff);
  color: #041018;
  font-weight: 700;
}

.forensics-form label,
.forensics-form legend {
  display: block;
  margin: 1.25rem 0 0.5rem;
  font-weight: 600;
  font-family: var(--font-heading);
  color: var(--text);
}

.forensics-form fieldset {
  border: 1px solid var(--border);
  border-radius: 12px;
  margin: 1.25rem 0 0;
  padding: 0.75rem 1rem 1rem;
  background: rgba(0,0,0,0.1);
}

.forensics-form .choice {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 400;
  margin: 0.5rem 0;
  color: var(--muted);
}

.forensics-form button {
  margin-top: 1.5rem;
}

footer {
  margin-top: 3rem;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
}

/* System picture (roadmap interdependence) */
.sys-picture {
  margin: 1.5rem 0 2rem;
  padding: 1.5rem 1rem 1rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(0,0,0,0.3);
  overflow-x: auto;
}

.sys-picture .sys-caption {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0 0 1rem;
  text-align: center;
}

.sys-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.sys-box {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  min-width: 9.5rem;
  max-width: 16rem;
  text-align: center;
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--text);
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.sys-box strong {
  display: block;
  color: var(--accent);
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  margin-bottom: 0.25rem;
  font-family: var(--font-heading);
}

.sys-box.sys-core {
  max-width: 28rem;
  min-width: min(100%, 18rem);
  border-color: rgba(0, 231, 255, 0.2);
  background: rgba(0, 231, 255, 0.05);
}

.sys-box.sys-node {
  max-width: 28rem;
  min-width: min(100%, 18rem);
  border-color: rgba(189, 52, 254, 0.2);
  background: rgba(189, 52, 254, 0.05);
}

.sys-arrow {
  text-align: center;
  color: var(--accent);
  font-size: 0.9rem;
  margin: 0.25rem 0 0.5rem;
  opacity: 0.6;
}

.sys-legend {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 1rem 0 0;
  text-align: center;
}

/* Timeline tables */
.timeline-table {
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  margin: 1rem 0 2rem 0;
  font-size: 0.92rem;
  text-align: left;
}

.timeline-table th,
.timeline-table td {
  text-align: left;
  vertical-align: top;
  padding: 0.75rem 0.75rem 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.timeline-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: var(--font-heading);
}

.timeline-table th:first-child,
.timeline-table td:first-child {
  width: 12rem;
  color: var(--accent);
  white-space: normal;
  padding-right: 1rem;
}

.timeline-table th:last-child,
.timeline-table td:last-child {
  width: auto;
}

@media (max-width: 640px) {
  .timeline-table th:first-child,
  .timeline-table td:first-child {
    width: 8rem;
  }
}
