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

:root {
  --c-navy: #0e2233;
  --c-blue: #0e4a82;
  --c-gray: #3a3a3a;
  --c-bg:   #f7f8fa;
  --c-red:  #b03030;
  --c-green: #1a7a34;
  --c-line: #d8dde3;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Source Serif 4", Georgia, "Times New Roman", Times, serif;
  color: var(--c-navy);
  line-height: 1.5;
  background: var(--c-bg);
  font-size: 17px;
}

/* Topbar — sticky, mobile-first, mirrors other giready sites */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: white; border-bottom: 1px solid #e3e6eb;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.topbar-inner {
  max-width: 680px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 8px 14px;
  font-family: "Inter", sans-serif; font-size: 13px;
}
.topbar-logo { height: 32px; width: auto; flex: 0 0 auto; }
.topbar-practice { flex: 1 1 auto; text-align: center; line-height: 1.15; color: var(--c-navy); font-weight: 600; }
.topbar-practice a { color: var(--c-blue); text-decoration: none; }
.topbar-practice .phone { font-weight: 500; color: var(--c-gray); }
.lang-toggle {
  flex: 0 0 auto;
  font-family: "Inter", sans-serif; font-size: 12px; font-weight: 600;
  color: var(--c-blue); text-decoration: none;
  border: 1px solid #c9d3dd; border-radius: 4px; padding: 4px 8px;
  background: white;
}

.container { max-width: 680px; margin: 0 auto; padding: 0 14px 40px; }

h1 {
  font-family: "Inter", sans-serif;
  font-size: 24px; color: var(--c-navy);
  margin: 18px 0 6px; font-weight: 700; letter-spacing: -0.01em;
}
.subtitle {
  font-family: "Inter", sans-serif;
  font-size: 14.5px; color: var(--c-gray); font-weight: 400;
  margin: 0 0 18px;
}

/* Search box */
.search-wrap {
  position: relative;
  margin-bottom: 14px;
}
#med-search {
  width: 100%;
  font-family: inherit;
  font-size: 18px;
  padding: 14px 38px 14px 14px;
  border: 2px solid var(--c-blue);
  border-radius: 8px;
  background: white;
  color: var(--c-navy);
  -webkit-appearance: none;
}
#med-search:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(14,74,130,0.15);
}
.clear-btn {
  position: absolute;
  top: 50%; right: 10px;
  transform: translateY(-50%);
  background: none; border: none;
  font-size: 22px; line-height: 1;
  color: #888; cursor: pointer;
  padding: 4px 8px;
}
.clear-btn:hover { color: var(--c-red); }

.med-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: white;
  border: 1px solid var(--c-line);
  border-radius: 8px;
  max-height: 320px;
  overflow-y: auto;
  z-index: 5;
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
  display: none;
  font-family: "Inter", sans-serif;
}
.med-suggestions.open { display: block; }
.med-suggestion {
  padding: 12px 14px;
  cursor: pointer;
  border-bottom: 1px solid #eef0f3;
  font-size: 15px;
}
.med-suggestion:hover, .med-suggestion.active { background: #eef4fb; }
.med-suggestion .name { font-weight: 700; color: var(--c-navy); }
.med-suggestion .alias { color: #666; font-size: 13px; font-style: italic; }
.med-suggestion .hold {
  color: var(--c-red);
  font-weight: 600;
  font-size: 13.5px;
  margin-top: 2px;
}

/* Result card */
.search-result.hidden { display: none; }
.search-result {
  background: white;
  border: 2px solid var(--c-red);
  border-radius: 10px;
  padding: 18px 18px 16px;
  margin: 8px 0 18px;
  box-shadow: 0 2px 8px rgba(176,48,48,0.12);
  font-family: "Inter", sans-serif;
}
.result-stop-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-red);
  margin-bottom: 4px;
}
.result-name {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--c-navy);
  margin: 0 0 6px;
  line-height: 1.2;
}
.result-aliases { color: var(--c-gray); font-size: 14px; margin-bottom: 12px; }
.result-hold {
  background: #fff5f3;
  border-left: 4px solid var(--c-red);
  padding: 10px 12px;
  font-size: 17px;
  color: var(--c-navy);
  font-weight: 600;
  border-radius: 0 6px 6px 0;
}
.result-note {
  margin-top: 10px;
  font-size: 13.5px;
  color: var(--c-gray);
  font-style: italic;
}
.result-category {
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--c-blue);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Safe-to-continue callout */
.callout-continue {
  background: #f0f8f0;
  border: 1px solid #b3d9b8;
  border-left: 4px solid var(--c-green);
  border-radius: 6px;
  padding: 14px 16px;
  margin: 0 0 22px;
  font-size: 15px;
  color: var(--c-navy);
  font-family: "Inter", sans-serif;
}
.callout-continue strong { color: var(--c-green); }
.callout-continue a { color: var(--c-blue); }
.callout-continue em { font-style: italic; }

/* Tabs */
.cheat-tabs {
  display: flex;
  gap: 4px;
  background: #eef0f3;
  padding: 4px;
  border-radius: 8px;
  margin-bottom: 14px;
  font-family: "Inter", sans-serif;
}
.cheat-tab {
  flex: 1;
  background: none;
  border: none;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 6px;
  color: var(--c-gray);
  font-family: inherit;
}
.cheat-tab.active {
  background: white;
  color: var(--c-navy);
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

.list-pane.hidden { display: none; }

/* Category view */
.med-category h2 {
  font-family: "Inter", sans-serif;
  font-size: 14px;
  color: var(--c-blue);
  margin: 16px 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
}
.med-row {
  background: white;
  border: 1px solid var(--c-line);
  border-radius: 8px;
  padding: 12px 14px;
  margin: 0 0 6px;
  cursor: pointer;
  font-family: "Inter", sans-serif;
}
.med-row:hover { border-color: var(--c-blue); background: #fafcff; }
.med-row .med-row-name {
  font-weight: 700;
  font-size: 16px;
  color: var(--c-navy);
}
.med-row .med-row-brands {
  font-size: 14px;
  color: var(--c-navy);
  margin-top: 2px;
}
.med-row .med-row-hold {
  font-size: 13.5px;
  color: var(--c-red);
  font-weight: 600;
  margin-top: 4px;
}

/* Brand A-Z view */
.letter-block {
  margin-bottom: 12px;
}
.letter-block h2 {
  font-family: "Inter", sans-serif;
  font-size: 12.5px;
  color: var(--c-blue);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 8px 0 4px;
}
.brand-row {
  background: white;
  border: 1px solid var(--c-line);
  border-radius: 8px;
  padding: 11px 14px;
  margin: 0 0 5px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-family: "Inter", sans-serif;
}
.brand-row:hover { border-color: var(--c-blue); background: #fafcff; }
.brand-row-left {
  flex: 1;
  min-width: 0;
}
.brand-row .brand-name {
  font-weight: 700;
  font-size: 16px;
  color: var(--c-navy);
}
.brand-row .brand-generic {
  font-size: 13px;
  color: #888;
  font-style: italic;
  margin-top: 2px;
}
.brand-row .brand-hold {
  flex: 0 0 auto;
  font-size: 12.5px;
  color: var(--c-red);
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
}

.fineprint {
  font-size: 13px;
  color: var(--c-gray);
  font-style: italic;
  margin-top: 24px;
  text-align: center;
}
.fineprint a { color: var(--c-blue); }

@media (max-width: 480px) {
  h1 { font-size: 21px; }
  #med-search { font-size: 17px; padding: 12px 36px 12px 12px; }
  .result-name { font-size: 22px; }
  .brand-row .brand-hold { font-size: 11.5px; }
}
