/* MedDRG soft-launch legal/landing pages — Ocean palette */
:root {
  --ocean: #0f4c81;
  --ocean-dark: #0a355c;
  --maroon: #800000;
  --bg: #f8fafc;
  --card: #fff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e2e8f0;
  --warn-bg: #fff7ed;
  --warn-bd: #fdba74;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, "Noto Sans Thai", "Sarabun", sans-serif;
  color: var(--md-text, var(--text));
  background: var(--md-bg, var(--md-surface, var(--bg)));
  line-height: 1.7;
}
a { color: var(--md-link, var(--md-primary, var(--ocean))); }
.site-header {
  background: var(--ocean);
  color: #fff;
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.site-header a { color: #fff; text-decoration: none; font-weight: 700; }
.site-header nav a { font-weight: 500; margin-left: 12px; opacity: .95; }
.site-header .brand {
  display: flex; align-items: center; gap: 10px;
}
.site-header .brand img { height: 32px; width: auto; display: block; }
.staging-tag {
  display: inline-block; background: #fef3c7; color: #92400e;
  font-size: 12px; padding: 2px 8px; border-radius: 999px; font-weight: 600;
}
main { max-width: 860px; margin: 24px auto; padding: 0 20px 40px; }
.card {
  background: var(--md-surface, var(--card));
  border-radius: 12px;
  padding: 24px 26px;
  box-shadow: 0 1px 4px #0001;
  margin-bottom: 18px;
  border: 1px solid var(--md-border, var(--border));
  color: var(--md-text, var(--text));
}
h1, h2, h3 { color: var(--md-text, var(--ocean)); line-height: 1.35; }
h1 { font-size: 1.55rem; margin-top: 0; }
h2 { font-size: 1.15rem; margin-top: 1.4em; }
.en { color: var(--md-muted, var(--muted)); font-size: .92em; }
.draft-banner {
  background: var(--warn-bg);
  border: 1px solid var(--warn-bd);
  color: #9a3412;
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 600;
  margin: 0 0 16px;
}
.cond-link, a.cond {
  font-weight: 700;
  color: var(--maroon);
  text-decoration: underline;
}
.btn {
  display: inline-block;
  background: var(--ocean);
  color: #fff !important;
  padding: 12px 22px;
  border-radius: 8px;
  text-decoration: none;
  border: none;
  font-weight: 600;
  cursor: pointer;
  font-size: 1rem;
}
.btn.secondary { background: var(--md-surface, #fff); color: var(--md-primary, var(--ocean)) !important; border: 1px solid var(--md-primary, var(--ocean)); }
.btn.block { display: block; text-align: center; width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.hero {
  text-align: center;
  padding: 28px 12px 8px;
}
.hero h1 { font-size: 1.85rem; }
.hero .lead { font-size: 1.05rem; color: var(--md-muted, var(--muted)); max-width: 640px; margin: 12px auto 20px; }
.hero-illust {
  max-width: 420px; width: 100%; height: auto; margin: 8px auto 18px; display: block;
}
.actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 18px 0; }
.grid-3 {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.grid-3 .card { margin: 0; }
.muted { color: var(--md-muted, var(--muted)); }
.small { font-size: .9em; }
.disclaimer {
  border-left: 4px solid var(--maroon);
  background: #fff8f8;
  padding: 14px 16px;
  border-radius: 0 8px 8px 0;
  margin: 16px 0;
}
.disclaimer h2 { color: var(--maroon); margin-top: 0; font-size: 1.05rem; }
label { display: block; font-weight: 600; margin: 12px 0 4px; }
input, textarea, select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--md-border, #cbd5e1);
  border-radius: 8px; font: inherit; background: var(--md-surface, #fff); color: var(--md-text, var(--text));
}
textarea { min-height: 110px; resize: vertical; }
.form-note { font-size: .88em; color: var(--muted); margin-top: 8px; }
.site-footer {
  text-align: center; padding: 28px 16px 36px; color: var(--md-muted, var(--muted)); font-size: .9em;
}
.site-footer a { color: var(--md-link, var(--md-primary, var(--ocean))); margin: 0 8px; }
.list-tight li { margin: 6px 0; }
ul.plain { padding-left: 1.2em; }
.pill {
  display: inline-block; background: #e0f2fe; color: #075985;
  border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 600;
}
@media (max-width: 640px) {
  .site-header nav a { margin-left: 8px; font-size: .92em; padding: 8px 6px; display: inline-block; min-height: 44px; }
  main { margin-top: 16px; }
  .card { padding: 18px; }
}
.site-header nav a:focus-visible,
.site-footer a:focus-visible,
.btn:focus-visible,
a:focus-visible {
  outline: 2px solid var(--md-focus, #fff);
  outline-offset: 2px;
}

.company-card {
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  margin: 12px 0 18px;
}
.company-card p { margin: 6px 0; }
.mono { font-variant-numeric: tabular-nums; letter-spacing: .02em; }


/* Dark mode: legal pages must stay readable when theme skins set a dark surface. */
html[data-color-mode="dark"] {
  --text: var(--md-text, #e5e7eb);
  --bg: var(--md-bg, #0b1220);
  --card: var(--md-surface, #111827);
  --muted: var(--md-muted, #cbd5e1);
  --border: var(--md-border, #334155);
  --ocean: var(--md-primary, #7dd3fc);
}
html[data-color-mode="dark"] .btn.secondary {
  background: var(--md-surface, #1e293b);
  color: var(--md-text, #f8fafc) !important;
  border-color: var(--md-primary, #7dd3fc);
}
html[data-color-mode="dark"] .draft-banner {
  background: #3b2a14;
  border-color: #b45309;
  color: #fed7aa;
}
html[data-color-mode="dark"] .disclaimer { background: #2a1515; }
html[data-color-mode="dark"] .company-card { background: var(--md-surface, #1e293b); }
