/* ==========================================================
   GoldHat Consulting UI Standard (Cowboy Noir)
   - Offline-friendly: no external fonts/CDNs
   - Automation-friendly: stable ids + data-testid hooks
   - Accessibility: WCAG-minded contrast, focus, skip links
   ========================================================== */

:root{
  /* Brand palette */
  --gh-bg: #0f0c16;            /* noir night */
  --gh-bg-2: #161024;          /* deep plum */
  --gh-surface: #151124;       /* card surface */
  --gh-surface-2: #1b1530;     /* elevated */
  --gh-text: #f4efe6;          /* parchment */
  --gh-muted: #cbbfae;         /* muted parchment */
  --gh-gold: #f2c14e;          /* bright gold */
  --gh-amber: #d88a23;         /* ember gold */
  --gh-ember: #ff6a3d;         /* signal orange */
  --gh-teal: #1f7a8c;          /* leather-teal accent */
  --gh-danger: #ff4d6d;
  --gh-ok: #3ddc97;

  /* Typographic scale */
  --gh-font: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --gh-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  /* Layout */
  --gh-radius: 16px;
  --gh-radius-sm: 12px;
  --gh-border: rgba(242,193,78,.22);
  --gh-border-2: rgba(244,239,230,.12);
  --gh-shadow: 0 16px 50px rgba(0,0,0,.45);
  --gh-shadow-soft: 0 12px 30px rgba(0,0,0,.35);
  --gh-focus: 0 0 0 3px rgba(242,193,78,.55), 0 0 0 6px rgba(255,106,61,.20);

  /* Motion (reduce for prefers-reduced-motion) */
  --gh-ease: cubic-bezier(.2,.9,.2,1);
  --gh-dur: 220ms;

  /* Content width */
  --gh-max: 1120px;
}

/* ---------- Base ---------- */
*{ box-sizing: border-box; }
html{ color-scheme: dark; }
body{
  margin:0;
  font-family: var(--gh-font);
  color: var(--gh-text);
  background: radial-gradient(1200px 900px at 60% 20%, rgba(242,193,78,.12), transparent 55%),
              radial-gradient(900px 700px at 20% 80%, rgba(255,106,61,.10), transparent 58%),
              linear-gradient(180deg, var(--gh-bg), var(--gh-bg-2));
  min-height: 100vh;
}

/* Subtle "tech-noir grain" without images */
body::before{
  content:"";
  position: fixed;
  inset:0;
  pointer-events:none;
  opacity:.06;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.7), rgba(255,255,255,.7) 1px, transparent 1px, transparent 3px);
  mix-blend-mode: overlay;
}

/* ---------- Accessibility helpers ---------- */
.skip-link{
  position:absolute;
  left:-999px;
  top:12px;
  padding:10px 14px;
  background: var(--gh-gold);
  color: #1b1026;
  border-radius: 999px;
  font-weight: 700;
  z-index:999;
}
.skip-link:focus{ left:12px; outline:none; box-shadow: var(--gh-focus); }

:focus-visible{ outline: none; box-shadow: var(--gh-focus); border-radius: 10px; }

@media (prefers-reduced-motion: reduce){
  *{ animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Layout shell ---------- */
.shell{
  display:grid;
  grid-template-columns: 320px 1fr;
  min-height: 100vh;
}

.sidebar{
  position: sticky;
  top:0;
  height: 100vh;
  padding: 18px 16px;
  border-right: 1px solid var(--gh-border-2);
  background: linear-gradient(180deg, rgba(20,14,34,.84), rgba(10,8,18,.84));
  backdrop-filter: blur(8px);
}

.brand{
  display:flex;
  gap:12px;
  align-items:center;
  padding: 12px 12px;
  border-radius: var(--gh-radius);
  border: 1px solid var(--gh-border-2);
  background: linear-gradient(180deg, rgba(244,239,230,.04), rgba(244,239,230,.02));
  box-shadow: var(--gh-shadow-soft);
}
.brand svg{ width: 34px; height: 34px; flex: 0 0 auto; }
.brand-title{ display:flex; flex-direction:column; }
.brand-title strong{ letter-spacing:.3px; }
.brand-title span{ color: var(--gh-muted); font-size: 13px; }

.nav{
  margin-top: 14px;
  display:flex;
  flex-direction:column;
  gap: 6px;
}
.nav a{
  text-decoration:none;
  color: var(--gh-text);
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  display:flex;
  justify-content: space-between;
  align-items:center;
  gap: 10px;
}
.nav a:hover{
  border-color: var(--gh-border);
  background: rgba(242,193,78,.06);
}
.nav a[aria-current="page"]{
  border-color: rgba(242,193,78,.35);
  background: rgba(242,193,78,.10);
}
.nav kbd{
  font-family: var(--gh-mono);
  font-size: 11px;
  color: var(--gh-muted);
  border: 1px solid rgba(244,239,230,.18);
  padding: 2px 7px;
  border-radius: 999px;
}

.sidebar-footer{
  margin-top: auto;
  padding-top: 14px;
  color: var(--gh-muted);
  font-size: 12px;
}
.sidebar-footer a{ color: var(--gh-gold); text-decoration: none; }
.sidebar-footer a:hover{ text-decoration: underline; }

.main{
  padding: 26px 18px;
}
.container{
  max-width: var(--gh-max);
  margin: 0 auto;
}

.topbar{
  display:flex;
  gap: 12px;
  align-items:center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: var(--gh-radius);
  border: 1px solid var(--gh-border-2);
  background: rgba(15,12,22,.55);
  backdrop-filter: blur(8px);
  box-shadow: var(--gh-shadow-soft);
}
.topbar .status{
  display:flex;
  align-items:center;
  gap: 10px;
  color: var(--gh-muted);
  font-size: 13px;
}
.pill{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(244,239,230,.18);
  background: rgba(244,239,230,.04);
}
.pill .dot{
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gh-ok);
  box-shadow: 0 0 0 3px rgba(61,220,151,.14);
}

.search{
  display:flex;
  gap:10px;
  align-items:center;
}
.search input{
  width: min(420px, 52vw);
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(244,239,230,.18);
  background: rgba(10,8,18,.55);
  color: var(--gh-text);
}
.search input::placeholder{ color: rgba(203,191,174,.75); }
.search button{
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(242,193,78,.35);
  background: linear-gradient(180deg, rgba(242,193,78,.22), rgba(216,138,35,.16));
  color: var(--gh-text);
  cursor:pointer;
  transition: transform var(--gh-dur) var(--gh-ease);
}
.search button:hover{ transform: translateY(-1px); }

/* ---------- Components ---------- */
.hero{
  margin-top: 16px;
  border-radius: 22px;
  border: 1px solid rgba(242,193,78,.30);
  background:
    radial-gradient(800px 420px at 22% 18%, rgba(242,193,78,.20), transparent 62%),
    radial-gradient(900px 520px at 74% 70%, rgba(31,122,140,.16), transparent 62%),
    linear-gradient(135deg, rgba(255,106,61,.10), rgba(0,0,0,0));
  box-shadow: var(--gh-shadow);
  overflow:hidden;
  position: relative;
}
.hero-grid{
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 18px;
  padding: 22px;
}
.hero h1{
  margin:0;
  font-size: clamp(28px, 2.6vw, 40px);
  letter-spacing: .6px;
}
.hero p{ color: var(--gh-muted); max-width: 60ch; }
.hero-actions{
  margin-top: 14px;
  display:flex;
  flex-wrap: wrap;
  gap: 10px;
}
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(244,239,230,.18);
  background: rgba(244,239,230,.04);
  color: var(--gh-text);
  text-decoration: none;
  cursor:pointer;
}
.btn.primary{
  border-color: rgba(242,193,78,.55);
  background: linear-gradient(180deg, rgba(242,193,78,.28), rgba(216,138,35,.18));
}
.btn.danger{
  border-color: rgba(255,77,109,.45);
  background: linear-gradient(180deg, rgba(255,77,109,.18), rgba(255,77,109,.10));
}
.btn:hover{ transform: translateY(-1px); transition: transform var(--gh-dur) var(--gh-ease); }

.hero-card{
  border-radius: 18px;
  border: 1px solid rgba(244,239,230,.14);
  background: rgba(10,8,18,.48);
  padding: 14px;
}
.hero-card img{
  width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid rgba(244,239,230,.12);
}
.caption{
  margin-top: 10px;
  color: var(--gh-muted);
  font-size: 13px;
}

.grid{
  margin-top: 16px;
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
}
.card{
  grid-column: span 6;
  border-radius: var(--gh-radius);
  border: 1px solid rgba(244,239,230,.14);
  background: linear-gradient(180deg, rgba(244,239,230,.04), rgba(244,239,230,.02));
  padding: 14px;
  box-shadow: var(--gh-shadow-soft);
}
.card h2{ margin:0 0 10px 0; font-size: 18px; }
.card p{ margin: 8px 0; color: var(--gh-muted); }
.badges{ display:flex; flex-wrap:wrap; gap: 8px; margin-top: 10px; }
.badge{
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(244,239,230,.18);
  background: rgba(244,239,230,.03);
  color: var(--gh-muted);
}
.badge.gold{ border-color: rgba(242,193,78,.45); color: var(--gh-text); }

.table{
  width: 100%;
  border-collapse: collapse;
  overflow:hidden;
  border-radius: 14px;
  border: 1px solid rgba(244,239,230,.12);
}
.table th, .table td{
  padding: 10px 10px;
  border-bottom: 1px solid rgba(244,239,230,.10);
  text-align:left;
  vertical-align: top;
}
.table th{
  color: var(--gh-text);
  font-size: 12px;
  letter-spacing:.6px;
  text-transform: uppercase;
  background: rgba(242,193,78,.08);
}
.table td{ color: var(--gh-muted); }

.notice{
  border-radius: var(--gh-radius);
  border: 1px solid rgba(242,193,78,.28);
  background: rgba(242,193,78,.06);
  padding: 12px 14px;
  color: var(--gh-muted);
}

.form{
  display:grid;
  gap: 10px;
}
.field{
  display:grid;
  gap: 6px;
}
label{ font-weight: 650; font-size: 13px; }
input, select, textarea{
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(244,239,230,.18);
  background: rgba(10,8,18,.55);
  color: var(--gh-text);
}
textarea{ min-height: 110px; resize: vertical; }
.helper{ color: rgba(203,191,174,.82); font-size: 12px; }
.error{
  border: 1px solid rgba(255,77,109,.55);
  background: rgba(255,77,109,.10);
  color: var(--gh-text);
  padding: 10px 12px;
  border-radius: 12px;
}

.accordion{
  border-radius: var(--gh-radius);
  border: 1px solid rgba(244,239,230,.12);
  overflow:hidden;
}
details{
  background: rgba(244,239,230,.02);
}
details + details{ border-top: 1px solid rgba(244,239,230,.10); }
summary{
  cursor:pointer;
  padding: 12px 14px;
  list-style: none;
  user-select:none;
}
summary::-webkit-details-marker{ display:none; }
summary span{ color: var(--gh-muted); font-weight: 600; }
details[open] summary{ background: rgba(242,193,78,.08); }
details .content{ padding: 0 14px 14px 14px; color: var(--gh-muted); }

.code{
  position: relative;
  border-radius: 14px;
  border: 1px solid rgba(244,239,230,.12);
  background: rgba(0,0,0,.28);
  overflow:hidden;
}
pre{
  margin:0;
  padding: 12px 14px 14px 14px;
  overflow:auto;
  font-family: var(--gh-mono);
  font-size: 12px;
  color: #efe7d6;
}
.copy{
  position:absolute;
  top: 10px;
  right: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(244,239,230,.18);
  background: rgba(15,12,22,.66);
  color: var(--gh-text);
  cursor:pointer;
  font-size: 12px;
}
.copy:hover{ border-color: rgba(242,193,78,.35); }

.toast{
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(244,239,230,.18);
  background: rgba(10,8,18,.85);
  color: var(--gh-text);
  box-shadow: var(--gh-shadow-soft);
  opacity: 0;
  pointer-events:none;
  transition: opacity var(--gh-dur) var(--gh-ease);
}
.toast.show{ opacity: 1; }

.footer{
  margin-top: 18px;
  color: var(--gh-muted);
  font-size: 12px;
  padding: 14px 0 40px 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 980px){
  .shell{ grid-template-columns: 1fr; }
  .sidebar{ position: relative; height:auto; }
  .hero-grid{ grid-template-columns: 1fr; }
  .card{ grid-column: span 12; }
}


/* High-contrast mode (toggle via JS) */
html.contrast{
  --gh-text: #ffffff;
  --gh-muted: #e7e0d3;
  --gh-border-2: rgba(255,255,255,.22);
}
html.contrast .card,
html.contrast .topbar,
html.contrast .brand{
  border-color: rgba(255,255,255,.25);
}



/* ==============================
   GoldHat Consulting Theme v2
   Creme / Upbeat Palette
   ============================== */

:root {
  --gh-bg: #f6f1e6;
  --gh-bg-soft: #fbf7ef;
  --gh-panel: #ffffff;
  --gh-text: #2a241b;
  --gh-muted: #6e6455;

  --gh-gold: #c89b3c;
  --gh-gold-soft: #e7c77a;
  --gh-accent: #8b5e34;
  --gh-accent-soft: #d8c3a5;

  --gh-border: rgba(0,0,0,0.08);
}

body {
  background: var(--gh-bg);
  color: var(--gh-text);
}

.sidebar {
  background: linear-gradient(180deg,#fff9ef,#f2e7d4);
  border-right: 1px solid var(--gh-border);
}

.brand-title span {
  color: var(--gh-muted);
}

.main {
  background: var(--gh-bg-soft);
}

.card {
  background: var(--gh-panel);
  border: 1px solid var(--gh-border);
  box-shadow: 0 8px 18px rgba(0,0,0,0.04);
}

.hero {
  background: linear-gradient(180deg,#fffaf2,#f6efe2);
}

.hero-card {
  background: #fff;
  border: 1px solid var(--gh-border);
}

.btn.primary {
  background: linear-gradient(135deg,#d4a63c,#b98a2e);
  color: #fff;
}

.btn.primary:hover {
  filter: brightness(1.05);
}

.badge.gold {
  background: #f4e1a6;
  color: #5a451c;
}

.notice {
  background: #fff6dd;
  border: 1px solid rgba(200,155,60,.35);
}

.table th {
  background: #f7efe0;
}

.footer {
  background: #fffaf2;
  border-top: 1px solid var(--gh-border);
}



/* ==============================
   Content helpers for V3
   ============================== */
.badge.needs-input{
  display:inline-block;
  padding:4px 10px;
  border-radius:999px;
  font-size:.85rem;
  background:#ffe6e6;
  color:#6b1d1d;
  border:1px solid rgba(107,29,29,.18);
}
.callout{
  background: var(--gh-panel);
  border: 1px solid var(--gh-border);
  border-left: 6px solid rgba(200,155,60,.65);
  padding: 14px 14px;
  border-radius: 14px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.03);
}
.kicker{
  color: var(--gh-muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .85rem;
}
.grid-2{
  display:grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 900px){
  .grid-2{ grid-template-columns: 1.1fr .9fr; }
}
.prose p{ line-height: 1.55; }
.prose ul{ line-height: 1.55; }
.small{ font-size:.95rem; color: var(--gh-muted); }



/* ==============================
   Country Mindset page
   ============================== */
.hero-slab{
  background: linear-gradient(180deg, rgba(255,255,255,.65), rgba(255,255,255,0));
  border: 1px solid var(--gh-border);
  border-radius: 18px;
  padding: 18px 18px;
  box-shadow: 0 10px 22px rgba(0,0,0,0.04);
}
.pills{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:10px;
}
.pill{
  border: 1px solid var(--gh-border);
  background: rgba(255,255,255,.65);
  border-radius: 999px;
  padding: 8px 12px;
  cursor:pointer;
  font-size:.95rem;
}
.pill[aria-pressed="true"]{
  box-shadow: inset 0 0 0 2px rgba(200,155,60,.35);
}
.offer-grid{
  display:grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 12px;
}
@media (min-width: 900px){
  .offer-grid{ grid-template-columns: 1fr 1fr; }
}
.offer-card .meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:8px;
  color: var(--gh-muted);
  font-size:.92rem;
}
.offer-card .tag{
  border: 1px solid var(--gh-border);
  border-radius: 999px;
  padding: 2px 10px;
  background: rgba(255,255,255,.6);
}
