/* Proxy — Copenhagen Blue design tokens */

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

:root {
  --deep-harbor: #062A43;
  --copenhagen:  #0E6BA8;
  --canal:       #2B8FC6;
  --mist:        #D8ECF7;
  --ice:         #F4FAFD;
  --signal-green:#21A67A;
  --amber:       #D99A2B;
  --error-red:   #D94C4C;

  --border: rgba(6, 42, 67, 0.10);
  --border-strong: rgba(6, 42, 67, 0.18);
  --text-muted: rgba(6, 42, 67, 0.65);
  --text-quiet: rgba(6, 42, 67, 0.50);
  --section-pad: 96px;
  --section-pad-tight: 64px;

  --font-sans: 'Geist', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--ice);
  color: var(--deep-harbor);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

/* Layout helpers */
.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}
@media (max-width: 720px) {
  .wrap { padding: 0 20px; }
}

/* Type scale */
.eyebrow {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--copenhagen);
  font-family: var(--font-mono);
}

.h1 {
  font-size: clamp(40px, 5.2vw, 64px);
  line-height: 1.05;
  letter-spacing: 0;
  font-weight: 600;
  margin: 0;
  text-wrap: balance;
}
.h2 {
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.1;
  letter-spacing: 0;
  font-weight: 600;
  margin: 0;
  text-wrap: balance;
}
.h3 {
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: 0;
  font-weight: 600;
  margin: 0;
}
.lede {
  font-size: 18px;
  line-height: 1.55;
  color: var(--text-muted);
  margin: 0;
  text-wrap: pretty;
  max-width: 60ch;
}
.body {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
  text-wrap: pretty;
}
.small {
  font-size: 13px;
  color: var(--text-muted);
}
.mono {
  font-family: var(--font-mono);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--copenhagen);
  font-weight: 600;
  text-decoration: none;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
  white-space: nowrap;
  line-height: 1;
}
.btn-primary {
  background: var(--copenhagen);
  color: #fff;
}
.btn-primary:hover { background: var(--canal); }

.btn-outline {
  background: transparent;
  color: var(--deep-harbor);
  border-color: var(--border-strong);
}
.btn-outline:hover { border-color: var(--deep-harbor); background: rgba(6,42,67,0.03); }

.btn-ghost {
  background: transparent;
  color: var(--deep-harbor);
}
.btn-ghost:hover { background: rgba(14,107,168,0.06); color: var(--copenhagen); }

.btn-lg { padding: 14px 22px; font-size: 15px; border-radius: 8px; }

.btn-google {
  background: var(--copenhagen);
  color: #fff;
}
.btn-google:hover { background: var(--canal); }

/* Cards / surfaces */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  min-width: 0;
}
.card-mist {
  background: var(--mist);
  border: 1px solid var(--border);
  border-radius: 10px;
  min-width: 0;
}
.shadow-sm-only { box-shadow: 0 1px 2px rgba(6, 42, 67, 0.06); }

/* Section spacing */
.section { padding: var(--section-pad) 0; }
.section-tight { padding: var(--section-pad-tight) 0; }
@media (max-width: 720px) {
  :root {
    --section-pad: 64px;
    --section-pad-tight: 48px;
  }
}

/* Divider */
.divider {
  height: 1px;
  background: var(--border);
}

/* Status pill colors */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.pill-green { background: rgba(33,166,122,0.12); color: var(--signal-green); }
.pill-amber { background: rgba(217,154,43,0.14); color: var(--amber); }
.pill-red   { background: rgba(217,76,76,0.12); color: var(--error-red); }
.pill-blue  { background: rgba(14,107,168,0.10); color: var(--copenhagen); }
.pill-canal { background: rgba(43,143,198,0.14); color: var(--canal); }
.pill-muted { background: rgba(6,42,67,0.06); color: var(--text-muted); }

.input {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--deep-harbor);
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  transition: border-color 120ms, box-shadow 120ms;
  box-sizing: border-box;
}
.input:focus {
  outline: none;
  border-color: var(--copenhagen);
  box-shadow: 0 0 0 3px rgba(14,107,168,0.12);
}
textarea.input { resize: vertical; font-family: inherit; }
select.input { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'><path d='M2 4l3 3 3-3' stroke='%23062A43' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }

@keyframes slideIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.pill-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
}

/* Focus */
:focus-visible {
  outline: 2px solid var(--canal);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Subtle scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(6,42,67,0.15); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: rgba(6,42,67,0.3); }

/* Responsive overrides for inline React layouts */
@media (max-width: 1020px) {
  .wrap {
    max-width: 100%;
  }

  main [style*="grid-template-columns: repeat(5"],
  main [style*="grid-template-columns: repeat(4"],
  main [style*="grid-template-columns: repeat(3"] {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  main [style*="grid-template-columns: 2fr repeat(4"] {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 820px) {
  header .wrap {
    height: auto !important;
    min-height: 64px;
    padding-top: 10px;
    padding-bottom: 10px;
    gap: 10px;
    flex-wrap: wrap;
  }

  header nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  header .btn {
    padding: 8px 10px !important;
    font-size: 13px;
  }

  main [style*="grid-template-columns"] {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  main [style*="display: flex"][style*="justify-content: flex-end"],
  main [style*="display: flex"][style*="justify-content: space-between"] {
    justify-content: flex-start !important;
  }

  main [style*="position: sticky"] {
    position: static !important;
  }

  .h1 {
    font-size: clamp(34px, 10vw, 46px);
  }

  .h2 {
    font-size: clamp(26px, 8vw, 34px);
  }

  .btn-lg {
    width: 100%;
    justify-content: center;
  }

  pre {
    white-space: pre-wrap !important;
    word-break: break-word !important;
  }
}

@media (max-width: 560px) {
  .wrap {
    padding-left: 16px;
    padding-right: 16px;
  }

  main [style*="grid-template-columns"] {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  main [style*="padding: 32px"],
  main [style*="padding: 36px"],
  main [style*="padding: 48px"] {
    padding: 20px !important;
  }

  .card,
  .card-mist {
    border-radius: 8px;
  }
}

@media (max-width: 900px) {
  aside[style*="width: 240px"][style*="height: 100vh"] {
    width: 78px !important;
    overflow: hidden !important;
  }

  aside[style*="width: 240px"][style*="height: 100vh"] a {
    font-size: 0 !important;
    justify-content: center !important;
  }

  aside[style*="width: 240px"][style*="height: 100vh"] a svg {
    flex-shrink: 0;
  }

  aside[style*="width: 240px"][style*="height: 100vh"] .mono,
  aside[style*="width: 240px"][style*="height: 100vh"] div[style*="Nora"],
  aside[style*="width: 240px"][style*="height: 100vh"] div[style*="admin"] {
    display: none !important;
  }
}
