/* Open Dental Support microsite (dentaltechdesk.com) - one stylesheet, system fonts, no framework.
   Accent #f97316 on near-black #111827, white background. Dark mode follows the OS. */

:root {
  --bg: #ffffff;
  --surface: #f9fafb;
  --text: #111827;
  --muted: #4b5563;
  --border: #e5e7eb;
  --accent: #f97316;
  --accent-ink: #111827;      /* text on top of the orange */
  --link: #c2410c;            /* orange-700: readable on white */
  --link-hover: #9a3412;
  --focus: #f97316;
  --header-bg: #ffffff;
  --footer-bg: #111827;
  --footer-text: #e5e7eb;
  --footer-link: #fdba74;
  --gutter: 16px;
  --tap: 44px;
  --max: 800px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220;
    --surface: #111827;
    --text: #e5e7eb;
    --muted: #9ca3af;
    --border: #1f2937;
    --link: #fb923c;
    --link-hover: #fdba74;
    --header-bg: #0b1220;
    --footer-bg: #030712;
    --footer-text: #d1d5db;
    --footer-link: #fdba74;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif,
    "Apple Color Emoji", "Segoe UI Emoji";
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

img { max-width: 100%; height: auto; display: inline-block; }

a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--link-hover); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* Skip link: off-screen until focused (accessibility, not content) */
.skip {
  position: absolute;
  left: -10000px;
  top: 0;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 10px 14px;
  z-index: 100;
  text-decoration: none;
  font-weight: 700;
}
.skip:focus { left: 8px; top: 8px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  border-top: 4px solid var(--accent);
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 60px;
  padding-top: 8px;
  padding-bottom: 8px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  min-height: var(--tap);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.2;
}
.brand img { width: 40px; height: 40px; border-radius: 8px; flex: 0 0 auto; }
.brand-name { display: inline-block; }

.header-phone {
  display: none;              /* shown at desktop widths below; the mobile call bar takes over on phones */
  align-items: center;
  min-height: var(--tap);
  padding: 8px 16px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.header-phone:hover { color: var(--accent-ink); filter: brightness(1.05); }
.header-phone-label { font-weight: 500; margin-right: 6px; }
.header-phone-pending { background: var(--surface); color: var(--muted); border: 1px solid var(--border); }

/* Primary nav: a real <nav>; single row, scrolls sideways on small screens (no page overflow) */
.site-nav { border-top: 1px solid var(--border); }
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 2px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  white-space: nowrap;
}
.site-nav li { flex: 0 0 auto; }
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0 12px;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  border-bottom: 3px solid transparent;
}
.site-nav a:hover { color: var(--link); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--accent); font-weight: 700; }

/* ---------- Main content ---------- */
main { padding-top: 20px; padding-bottom: 48px; }

.crumbs { font-size: 0.9rem; color: var(--muted); margin: 0 0 12px; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--muted); }
.crumbs a { display: inline-block; padding: 8px 0; margin: -8px 0; }

h1, h2, h3 { line-height: 1.25; letter-spacing: -0.01em; color: var(--text); }
h1 { font-size: clamp(1.7rem, 4.5vw + 0.5rem, 2.4rem); margin: 0 0 14px; }
h2 { font-size: clamp(1.3rem, 2.5vw + 0.6rem, 1.7rem); margin: 36px 0 10px; }
h3 { font-size: 1.15rem; margin: 26px 0 6px; }
p, ul, ol { margin: 0 0 16px; }
ul, ol { padding-left: 1.3em; }
li { margin-bottom: 6px; }
article > p:first-of-type { font-size: 1.125rem; }

.updated {
  font-size: 0.875rem;
  color: var(--muted);
  margin: -6px 0 20px;
}

code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.95em;
  background: var(--surface); padding: 1px 5px; border-radius: 4px; }

hr { border: 0; border-top: 1px solid var(--border); margin: 32px 0; }

table { border-collapse: collapse; width: 100%; margin: 0 0 20px; font-size: 0.95rem; display: block; overflow-x: auto; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--surface); }

figure { margin: 0 0 20px; }
figcaption { font-size: 0.875rem; color: var(--muted); }

/* ---------- CTA block ---------- */
.cta {
  margin: 28px 0;
  padding: 18px 18px 8px;
  border: 1px solid var(--border);
  border-left: 5px solid var(--accent);
  border-radius: 10px;
  background: var(--surface);
}
.cta-title { margin: 0 0 8px; font-size: 1.25rem; }
.cta p { margin-bottom: 12px; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  min-width: var(--tap);
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1.2;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-primary:hover { color: var(--accent-ink); filter: brightness(1.05); }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--text); }
.btn-secondary:hover { color: var(--text); background: var(--surface); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.6; cursor: default; }

/* ---------- Form ---------- */
form {
  margin: 20px 0 28px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}
form p, .field { margin: 0 0 14px; }
label { display: block; font-weight: 600; margin-bottom: 6px; }
input[type="text"], input[type="email"], input[type="tel"], select, textarea {
  width: 100%;
  min-height: var(--tap);
  padding: 10px 12px;
  border: 1px solid #9ca3af;
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  line-height: 1.4;
}
textarea { min-height: 140px; resize: vertical; }
select { appearance: auto; }
input::placeholder, textarea::placeholder { color: #6b7280; }
.form-note, .notice {
  font-size: 0.95rem;
  padding: 10px 12px;
  border-left: 4px solid var(--accent);
  background: var(--bg);
  border-radius: 6px;
}
button[type="submit"] { font: inherit; }

/* Honeypot: the one allowed hidden field (not content). Off-screen, not display:none. */
.hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status { margin-top: 12px; font-weight: 600; min-height: 1.5em; }
.form-status.ok { color: #047857; }
.form-status.err { color: #b91c1c; }
@media (prefers-color-scheme: dark) {
  .form-status.ok { color: #34d399; }
  .form-status.err { color: #f87171; }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 28px 0 36px;
  font-size: 0.925rem;
}
.site-footer a { color: var(--footer-link); }
.site-footer a:hover { color: #ffffff; }
.site-footer p { margin: 0 0 10px; }
.site-footer .operator { font-weight: 700; font-size: 1rem; }
.site-footer .not-affiliated { color: #9ca3af; font-size: 0.85rem; }
.footer-links a { display: inline-block; padding: 8px 0; }

/* ---------- Mobile floating call bar ---------- */
.callbar {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 60;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  padding: 10px var(--gutter);
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  text-align: center;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.15);
}
.callbar:hover { color: var(--accent-ink); }
.callbar-pending { background: #1f2937; color: #f9fafb; font-weight: 600; font-size: 0.95rem; }
.callbar-pending:hover { color: #ffffff; }

@media (max-width: 768px) {
  .callbar { display: flex; }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
  .header-phone { display: none; }
}
@media (min-width: 769px) {
  .header-phone { display: inline-flex; }
  .site-nav ul { overflow: visible; white-space: normal; flex-wrap: wrap; }
}
@media (max-width: 400px) {
  .brand-name { font-size: 0.95rem; }
}

/* ---------- Print ---------- */
@media print {
  .site-header .site-nav, .callbar, .skip, .cta-actions, .header-phone, .crumbs { display: none !important; }
  body { padding-bottom: 0; color: #000; background: #fff; }
  a { color: #000; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; }
  .site-footer { background: #fff; color: #000; border-top: 1px solid #000; }
  .site-footer a { color: #000; }
}
