:root {
  --ink: #10243a;
  --ink-soft: #4a5d72;
  --ink-faint: #7d8fa3;
  --blue: #1a6fc4;
  --blue-deep: #0c447c;
  --blue-tint: #e8f2fc;
  --blue-tint-2: #d4e7f9;
  --page: #f6f9fc;
  --card: #ffffff;
  --line: #dfe8f1;
  --line-strong: #c6d5e4;
  --red: #b3261e;
  --red-tint: #fdecea;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 36, 58, 0.05), 0 4px 16px rgba(16, 36, 58, 0.06);
  --shadow-hover: 0 2px 4px rgba(16, 36, 58, 0.07), 0 10px 28px rgba(16, 36, 58, 0.1);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--page);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.02em;
}

.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo-mark svg { width: 18px; height: 18px; }

.logo span em { font-style: normal; color: var(--blue); }

.header-nav {
  margin-left: auto;
  display: flex;
  gap: 4px;
}

.header-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  padding: 8px 14px;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}

.header-nav a:hover { background: var(--blue-tint); color: var(--blue-deep); }

.header-nav a { white-space: nowrap; }

@media (max-width: 540px) {
  .header-nav a:first-child { display: none; }
}

/* ---------- Hero ---------- */

.hero {
  background: linear-gradient(180deg, #ffffff 0%, var(--page) 100%);
  border-bottom: 1px solid var(--line);
  padding: 72px 0 56px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--blue-deep);
  background: var(--blue-tint);
  border: 1px solid var(--blue-tint-2);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
}

.hero h1 {
  font-size: clamp(30px, 4.5vw, 46px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  max-width: 640px;
  margin: 0 auto 14px;
}

.hero h1 em { font-style: normal; color: var(--blue); }

.hero-sub {
  font-size: 17px;
  color: var(--ink-soft);
  max-width: 520px;
  margin: 0 auto 34px;
}

.search-wrap {
  max-width: 560px;
  margin: 0 auto;
  position: relative;
}

.search-wrap svg {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--ink-faint);
  pointer-events: none;
}

#search {
  width: 100%;
  height: 58px;
  padding: 0 24px 0 52px;
  font-size: 16px;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line-strong);
  border-radius: 999px;
  box-shadow: var(--shadow);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

#search::placeholder { color: var(--ink-faint); }

#search:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px var(--blue-tint), var(--shadow);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
}

.chip {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  background: #fff;
  border: 1px solid var(--line-strong);
  padding: 7px 15px;
  border-radius: 999px;
  transition: all 0.15s;
}

.chip:hover { border-color: var(--blue); color: var(--blue-deep); }

.chip.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

/* ---------- Drug grid ---------- */

.list-section { padding: 44px 0 72px; }

.list-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
}

.list-meta h2 { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }

.list-meta span { font-size: 13.5px; color: var(--ink-faint); }

.drug-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.drug-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.drug-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: var(--line-strong);
}

.drug-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.drug-card h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }

.drug-card .brands {
  font-size: 12.5px;
  color: var(--ink-faint);
  margin-bottom: 10px;
}

.drug-card .tagline {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.55;
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 56px 20px;
  color: var(--ink-faint);
  font-size: 15px;
}

/* ---------- Category pills ---------- */

.pill {
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}

.pill-teal   { background: #e1f5ee; color: #085041; }
.pill-purple { background: #eeedfe; color: #3c3489; }
.pill-amber  { background: #faeeda; color: #633806; }
.pill-blue   { background: #e6f1fb; color: #0c447c; }
.pill-red    { background: #fcebeb; color: #791f1f; }
.pill-sky    { background: #e3f3f8; color: #0b5468; }
.pill-green  { background: #eaf3de; color: #27500a; }
.pill-pink   { background: #fbeaf0; color: #72243e; }
.pill-coral  { background: #faece7; color: #712b13; }

/* ---------- Drug detail page ---------- */

.breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  margin: 32px 0 24px;
  padding: 8px 14px 8px 10px;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}

.breadcrumb:hover { background: var(--blue-tint); color: var(--blue-deep); }

.breadcrumb svg { width: 16px; height: 16px; }

.drug-hero {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 34px;
  margin-bottom: 20px;
}

.drug-hero-top {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.drug-hero h1 { font-size: 32px; font-weight: 700; letter-spacing: -0.02em; }

.drug-hero .brands { font-size: 14.5px; color: var(--ink-faint); margin-bottom: 18px; }

.drug-hero .what { font-size: 16px; color: var(--ink-soft); line-height: 1.7; max-width: 760px; }

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

@media (max-width: 760px) {
  .detail-grid { grid-template-columns: 1fr; }
  .drug-hero { padding: 26px 22px; }
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 28px;
}

.panel h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
}

.panel h2 svg { width: 19px; height: 19px; color: var(--blue); }

.fact-row {
  display: flex;
  gap: 14px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}

.fact-row:first-of-type { border-top: none; padding-top: 0; }

.fact-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--blue-tint);
  color: var(--blue-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.fact-icon svg { width: 18px; height: 18px; }

.fact-row .fact-label { font-size: 13px; font-weight: 600; margin-bottom: 1px; }

.fact-row .fact-text { font-size: 14px; color: var(--ink-soft); line-height: 1.55; }

.plain-list { list-style: none; }

.plain-list li {
  position: relative;
  padding: 6px 0 6px 24px;
  font-size: 14.5px;
  color: var(--ink-soft);
  line-height: 1.55;
}

.plain-list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 14px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue-tint-2);
  border: 1.5px solid var(--blue);
}

.panel-danger { border-color: #f3cfcc; background: #fffafa; }

.panel-danger h2 svg { color: var(--red); }

.panel-danger .plain-list li::before { background: var(--red-tint); border-color: var(--red); }

.missed-note {
  font-size: 14.5px;
  color: var(--ink-soft);
  line-height: 1.65;
}

.disclaimer {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--blue-tint);
  border: 1px solid var(--blue-tint-2);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-bottom: 48px;
  font-size: 13.5px;
  color: var(--blue-deep);
  line-height: 1.6;
}

.disclaimer svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 2px; }

/* ---------- Legal pages ---------- */

.legal {
  max-width: 760px;
  padding: 40px 24px 64px;
}

.legal h1 {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.legal .effective {
  font-size: 13.5px;
  color: var(--ink-faint);
  margin-bottom: 28px;
}

.legal h2 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 30px 0 10px;
}

.legal p, .legal li {
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.7;
}

.legal p { margin-bottom: 12px; }

.legal ul { margin: 0 0 12px 22px; }

.legal .callout {
  background: var(--blue-tint);
  border: 1px solid var(--blue-tint-2);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 16px 0;
  color: var(--blue-deep);
  font-size: 14.5px;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 36px 0 44px;
}

.site-footer .container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.site-footer p { font-size: 13px; color: var(--ink-faint); line-height: 1.65; max-width: 720px; }

.site-footer .foot-brand { font-weight: 600; color: var(--ink-soft); font-size: 14px; }
