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

:root {
  --accent: #0066FF;
  --accent-light: #EBF2FF;
  --accent-hover: #0052CC;
  --success: #00A257;
  --success-light: #E8F8EE;
  --warning: #C25E00;
  --warning-light: #FFF3E0;
  --text-primary: #1A1A1A;
  --text-secondary: #5C5C5C;
  --text-muted: #9E9E9E;
  --border: #E6E6E3;
  --surface: #FFFFFF;
  --track: #F0F0EE;
  --elevated: #FFFFFF;
  --bg: #F5F5F3;
  --radius-card: 16px;
  --radius-input: 10px;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 28px rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --ring: 0 0 0 4px rgba(0, 102, 255, 0.15);
  --accent-grad: linear-gradient(135deg, #0A6FFF 0%, #0052CC 100%);
  color-scheme: light;
}

[data-theme='dark'] {
  --accent: #5B9BFF;
  --accent-light: rgba(91, 155, 255, 0.14);
  --accent-hover: #7DB0FF;
  --success: #3DDC84;
  --success-light: rgba(61, 220, 132, 0.13);
  --warning: #FFB25C;
  --warning-light: rgba(255, 178, 92, 0.13);
  --text-primary: #ECEDF0;
  --text-secondary: #9EA3AE;
  --text-muted: #6A6F7A;
  --border: #262932;
  --surface: #16181D;
  --track: #0F1013;
  --elevated: #24272F;
  --bg: #0A0B0E;
  --shadow-card: 0 1px 1px rgba(0, 0, 0, 0.5), 0 10px 34px rgba(0, 0, 0, 0.55);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --ring: 0 0 0 4px rgba(91, 155, 255, 0.28);
  --accent-grad: linear-gradient(135deg, #4D94FF 0%, #2F6FE0 100%);
  color-scheme: dark;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Ensure the `hidden` attribute always wins over display rules (e.g. .input-money{display:flex}) */
[hidden] {
  display: none !important;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, sans-serif;
  line-height: 1.55;
  color: var(--text-primary);
  background-color: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  letter-spacing: -0.01em;
  transition: background-color 0.25s ease, color 0.25s ease;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button {
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  color: var(--text-primary);
}

::selection {
  background: var(--accent-light);
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto;
  }
}

/* Shared content page (legal / about / contact) */
.page { max-width: 44rem; margin: 0 auto; }
.page .page-head { margin-bottom: 2rem; }
.page h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}
.page .updated { margin-top: 0.5rem; color: var(--text-muted); font-size: 0.85rem; }
.page h2 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 1.8rem 0 0.6rem;
}
.page p, .page li {
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 0.96rem;
}
.page p { margin-bottom: 1rem; }
.page ul { margin: 0 0 1rem 1.25rem; display: grid; gap: 0.5rem; }
.page strong { color: var(--text-primary); font-weight: 600; }
.page .back-home {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  font-weight: 500;
}
.page a { color: var(--accent); }
.page .card-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card, 16px);
  box-shadow: var(--shadow-card);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

/* Print: clean summary only */
@media print {
  .theme-toggle,
  .actions,
  .penalty-card,
  .footer,
  .pill { display: none !important; }
  body { background: #fff; color: #000; }
  .card,
  .metric,
  .banner {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
    break-inside: avoid;
  }
  .metric.accent { background: #fff !important; }
  .metric.accent .m-label,
  .metric.accent .m-value { color: #000 !important; }
}
