/* Rock Chart Monster reskin concept. One list of named colors, like the live site. */
@import url('/fonts/inter.css');

:root {
  --page: #fdfdfc;
  --raised: #ffffff;
  --fg: #0d0d0c;           /* near-black ink, like OpenRouter's */
  --muted: #56564f;        /* secondary text */
  --faint: #8a8a84;
  --line: rgba(13, 13, 12, 0.08);
  --line-strong: rgba(13, 13, 12, 0.14);
  --hover: rgba(13, 13, 12, 0.04);
  --green: #047857;        /* accent: links, selected, #1 */
  --green-hover: #065f46;
  --wash: rgba(4, 120, 87, 0.08);
  --logo: #10b981;
  --red: #be123c;
  --open: #efefec;         /* soft gray card: open chart row, forms, chips */
  --radius: 6px;           /* rounded corners: settled 2026-11-20 */
  --font: Inter, ui-sans-serif, system-ui, sans-serif;
  --nav-h: 56px;
}

* { box-sizing: border-box; touch-action: manipulation; }   /* no double-tap zoom; pinch zoom still works */
html, body { margin: 0; background: var(--page); color: var(--fg); }
/* Keep iPhones from resizing the page on their own (Tony, 2026-11-20):
   - Safari zooms in when you tap a text box whose text is under 16px, and stays zoomed. Text boxes are 16px on touch screens.
   - Safari enlarges text when the phone turns sideways. text-size-adjust keeps sizes as designed.
   Double-tap zoom is already off (touch-action above); pinch zoom stays, so people can still zoom on purpose. */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (pointer: coarse), (max-width: 860px) {
  input:not([type="range"]):not([type="checkbox"]):not([type="radio"]), textarea, select { font-size: 16px !important; }
}
body { font: 450 14px/1.625 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button { font: inherit; color: inherit; }
svg.lucide { width: 16px; height: 16px; flex-shrink: 0; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--nav-h);
  background: color-mix(in srgb, var(--page) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .in { max-width: 1240px; margin: 0 auto; height: 100%; padding: 0 24px; display: flex; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--fg); flex-shrink: 0; }
.brand .mark { width: 30px; height: 30px; display: block; flex-shrink: 0; }
.brand .word { font-size: 19px; font-weight: 650; letter-spacing: -0.02em; line-height: 1; }
.brand .word .dot { color: var(--green); }   /* darker green so the dot holds up next to the black name (Tony, 2026-11-20) */
.brand .tagline { font-size: 13px; font-weight: 500; color: var(--muted); padding-left: 12px; margin-left: 3px; border-left: 1px solid var(--line-strong); line-height: 18px; white-space: nowrap; }
@media (max-width: 1080px) { .brand .tagline { display: none; } }
.search {
  flex: 1; max-width: 380px; margin-left: auto; position: relative; display: flex; align-items: center;
}
.search svg { position: absolute; left: 11px; color: var(--faint); }
.search input {
  width: 100%; height: 34px; padding: 0 40px 0 34px; border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--raised); font: 450 14px var(--font); color: var(--fg); outline: none; transition: border-color .15s, box-shadow .15s;
}
.search input::placeholder { color: var(--faint); }
.search input:focus { border-color: var(--green); box-shadow: 0 0 0 3px var(--wash); }
.search kbd {
  position: absolute; right: 8px; font: 500 11px var(--font); color: var(--faint); border: 1px solid var(--line-strong);
  border-radius: calc(var(--radius) * 0.6); padding: 0 6px; line-height: 18px; background: var(--page);
}
.toplinks { display: flex; align-items: center; gap: 2px; }
.toplinks a {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: var(--radius);
  color: var(--muted); text-decoration: none; font-weight: 500; transition: background .15s, color .15s;
}
.toplinks a:hover { background: var(--wash); color: var(--green); }
.toplinks a.icon-only { padding: 0 8px; }

/* ---------- Chart tabs (Alternative / Mainstream) ---------- */
.tabbar { border-bottom: 1px solid var(--line); background: var(--page); }
.tabbar .in { max-width: 1240px; margin: 0 auto; padding: 0 24px; display: flex; overflow-x: auto; scrollbar-width: none; }
.tabbar button {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px 9px; margin-bottom: -1px;
  border: 0; border-bottom: 2px solid transparent; background: none; cursor: pointer;
  font-weight: 500; color: var(--fg); white-space: nowrap; transition: color .15s, border-color .15s;
}
.tabbar button:hover { color: var(--green); }
.tabbar button[aria-selected="true"] { color: var(--green); border-bottom-color: var(--green); }
.tabbar .note { margin-left: auto; align-self: center; color: var(--muted); font-size: 13px; font-weight: 500; white-space: nowrap; padding-left: 16px; display: inline-flex; align-items: center; gap: 6px; }
.tabbar .note svg { width: 14px; height: 14px; color: var(--green); }

/* ---------- Layout with left nav ---------- */
.layout { max-width: 1240px; margin: 0 auto; padding: 28px 24px 0; display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 40px; }
.sidenav { position: sticky; top: calc(var(--nav-h) + 28px); align-self: start; display: flex; flex-direction: column; gap: 1px; }
.sidenav a {
  display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: var(--radius);
  color: var(--muted); text-decoration: none; font-weight: 500; transition: background .15s, color .15s;
}
.sidenav a:hover { background: var(--hover); color: var(--fg); }
.sidenav a[aria-current="page"] { background: var(--wash); color: var(--green); }
.sidenav .gap { height: 14px; }
.sidenav .newtag { margin-left: auto; font-size: 11px; font-weight: 600; color: var(--green); background: var(--wash); padding: 0 6px; line-height: 18px; border-radius: calc(var(--radius) * .6); }
.sidenav .label { font-size: 12px; font-weight: 500; color: var(--faint); padding: 0 8px 4px; }

main { min-width: 0; padding-bottom: 64px; }
.head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.head h1 { display: flex; align-items: center; gap: 9px; font-size: 20px; line-height: 24px; font-weight: 600; margin: 0; letter-spacing: -0.01em; }
.head h1 svg { width: 18px; height: 18px; color: var(--muted); }
.desc { color: var(--muted); font-weight: 500; margin: 6px 0 0; display: flex; align-items: center; gap: 6px; }
.desc svg { width: 14px; height: 14px; color: var(--faint); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 12px;
  border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--raised);
  font-weight: 500; cursor: pointer; transition: background .15s, border-color .15s; text-decoration: none;
}
.btn:hover { background: var(--hover); }
.btn:disabled { opacity: .35; cursor: default; }
.btn.icon { width: 32px; padding: 0; }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--line); margin-top: 8px; }
.foot .in { max-width: 1240px; margin: 0 auto; padding: 16px 24px 24px; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; font-size: 13px; color: var(--muted); }
.foot nav { display: flex; gap: 18px; }
.foot a { color: var(--muted); text-decoration: none; font-weight: 500; }
.foot a:hover { color: var(--green); }
.foot .slop { margin: 0; color: var(--faint); font-size: 12.5px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 12px); opacity: 0; pointer-events: none; z-index: 60;
  background: var(--fg); color: #fff; padding: 8px 14px; border-radius: var(--radius); font-weight: 500; transition: .2s;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Phones ---------- */
@media (max-width: 860px) {
  .topbar .in, .tabbar .in { padding: 0 16px; }
  .toplinks a:not(.icon-only) { display: none; }
  .search { max-width: none; }
  .search kbd { display: none; }
  .brand .word { font-size: 17px; }
  .layout { grid-template-columns: 1fr; gap: 18px; padding: 16px 16px 0; }
  .sidenav { position: static; flex-direction: row; overflow-x: auto; gap: 4px; margin: 0 -16px; padding: 0 16px; scrollbar-width: none; }
  .sidenav a { white-space: nowrap; border: 1px solid var(--line); }
  .sidenav .newtag { margin-left: 2px; }
  .sidenav .gap, .sidenav .label { display: none; }
  .tabbar .note { display: none; }
  .foot .in { padding: 14px 16px 28px; flex-direction: column; }
}
.toplinks .phone-only { display: none; }
.topbar .spacer { flex: 1; }
@media (max-width: 560px) {
  .search { display: none; }
  .toplinks { margin-left: auto; }
  .toplinks .phone-only { display: inline-flex; }
  .topbar.searching .search { display: flex; position: absolute; left: 16px; right: 16px; top: 11px; z-index: 2; }
}
