/* ============================================================
   Laser-Therapy.US — site stylesheet
   Mobile-first. Works with or without Pure.css.
   Drop-in replacement: every existing class name preserved.
   ============================================================ */

/* === Design tokens =========================================== */
:root {
    --c-navy:      #1e3a5f;
    --c-navy-2:    #2d5a7c;
    --c-amber:     #f59e0b;
    --c-amber-dk:  #d97706;
    --c-blue:      #2563eb;
    --c-blue-dk:   #1d4ed8;
    --c-blue-vis:  #1e3a8a;
    --c-text:      #1f2937;
    --c-text-2:    #374151;
    --c-muted:     #6b7280;
    --c-muted-2:   #9ca3af;
    --c-border:    #e5e7eb;
    --c-border-2:  #d1d5db;
    --c-bg:        #f4f6f8;
    --c-card:      #ffffff;
    --c-divider:   #f3f4f6;

    --shadow-sm:   0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md:   0 2px 8px rgba(0, 0, 0, 0.10);
    --shadow-lg:   0 4px 12px rgba(0, 0, 0, 0.12);

    --radius-sm:   4px;
    --radius-md:   6px;
    --radius-lg:   8px;

    --font-stack:  -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

    --max-content: 900px;
    --max-toolbar: 1200px;
}

/* === Reset + base ============================================ */
*, *::before, *::after { box-sizing: border-box; }

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

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-stack);
    font-size: 1rem;
    line-height: 1.5;
    color: var(--c-text);
    background: var(--c-bg);
    text-align: left;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Respect iOS safe areas inside the app wrapper */
    padding-left:  env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

a            { color: var(--c-blue); text-decoration: none; }
a:hover      { text-decoration: underline; }
a:visited    { color: var(--c-blue-vis); }
a:focus-visible {
    outline: 2px solid var(--c-blue);
    outline-offset: 2px;
    border-radius: 2px;
}

img, picture, video, iframe { max-width: 100%; height: auto; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-stack);
    color: var(--c-navy);
    line-height: 1.25;
    margin-top: 0;
    font-weight: 600;
}

h1 { font-size: 1.75rem; margin-bottom: 0.75rem; }
h2 { font-size: 1.35rem; margin-bottom: 0.6rem; }
h3 { font-size: 1.1rem;  margin-bottom: 0.5rem; }

p  { margin: 0 0 1em; }

/* Override broken legacy banner classes from old templates */
.banner,
.l-content,
.l-box {
    background-image: none !important;
    background: transparent;
    padding: 0;
    height: auto;
    width: auto;
}

/* === Site toolbar ============================================
   subcom/toptoolbar.php also includes a self-contained <style>
   block; these rules match it so style.css alone is sufficient.
   ============================================================ */
.site-toolbar {
    background: linear-gradient(135deg, var(--c-navy) 0%, var(--c-navy-2) 100%);
    color: white;
    box-shadow: var(--shadow-md);
    position: relative;
    z-index: 100;
    padding-top: env(safe-area-inset-top);
}
.site-toolbar-inner {
    max-width: var(--max-toolbar);
    margin: 0 auto;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.5rem;
}
.site-toolbar .brand {
    color: white;
    font-size: 1.15rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.05em;
}
.site-toolbar .brand:hover    { opacity: 0.85; text-decoration: none; color: white; }
.site-toolbar .brand:visited  { color: white; }
/* Higher specificity than the inline <style> block in
   subcom/toptoolbar.php (which also sets .site-toolbar nav
   rules) so style.css wins the cascade.
   "header.site-toolbar" = (0,1,2) beats ".site-toolbar" = (0,1,1). */
header.site-toolbar nav {
    display: flex;
    flex-wrap: nowrap;          /* never break onto a second line */
    justify-content: center;
    align-items: center;
    gap: 0.15rem;
    /* Safety net for very narrow phones or the 5-link logged-in state:
       allow horizontal scroll instead of wrapping. */
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;       /* Firefox */
}
header.site-toolbar nav::-webkit-scrollbar { display: none; }  /* Chromium / Safari */

header.site-toolbar nav a {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;              /* don't squish; scroll instead */
    white-space: nowrap;         /* never break the label itself */
    padding: 0.45rem 0.65rem;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: background 0.15s, color 0.15s;
    /* Tap target — keep ≥ 40px tall on touch devices */
    min-height: 40px;
    line-height: 1.2;
}
header.site-toolbar nav a:hover {
    background: rgba(255, 255, 255, 0.12);
    color: white;
    text-decoration: none;
}
header.site-toolbar nav a.active        { background: var(--c-amber); color: white; }
header.site-toolbar nav a.active:hover  { background: var(--c-amber-dk); }

/* === Hero ====================================================
   Trimmed aggressively from the previous 3rem/3.5rem padding.
   Phones get a compact band; desktops get a slightly taller one.
   ============================================================ */
.hero {
    background: linear-gradient(135deg, var(--c-navy) 0%, var(--c-navy-2) 100%);
    color: white;
    padding: 1.25rem 1rem 1.4rem;
    text-align: center;
}
.hero h1 {
    font-size: 1.5rem;
    color: white;
    margin: 0 0 0.35rem;
    letter-spacing: -0.01em;
    line-height: 1.2;
}
.hero p.lead {
    font-size: 0.98rem;
    opacity: 0.92;
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.4;
}
/* When the hero contains a search form, give it a touch more room below the lead */
.hero .search-form { margin-top: 1rem; }

/* === Search forms ============================================ */
.search-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    gap: 0.5rem;
}
.search-form input[type=text],
.search-form input[type=search] {
    flex: 1;
    min-width: 0;          /* prevents flex overflow on small screens */
    padding: 0.75rem 0.9rem;
    font-size: 1rem;
    border: none;
    border-radius: var(--radius-md);
    background: white;
    color: var(--c-text);
    box-shadow: var(--shadow-md);
}
.search-form input:focus { outline: 3px solid rgba(255, 255, 255, 0.4); }
.search-form button {
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    background: var(--c-amber);
    color: white;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}
.search-form button:hover { background: var(--c-amber-dk); }

/* === Content wrappers ======================================== */
.content-wrap {
    max-width: var(--max-content);
    margin: 1.25rem auto;
    padding: 0 1rem;
}

/* === Cards =================================================== */
.card,
.result-card,
.intro-card,
.video-card {
    background: var(--c-card);
    border-radius: var(--radius-lg);
    padding: 1.1rem 1.15rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--c-border);
}
.intro-card                 { padding: 1.4rem; }
.intro-card h2,
.intro-card h3              { color: var(--c-navy); margin-top: 1.25rem; }
.intro-card h2:first-child,
.intro-card h3:first-child  { margin-top: 0; }
.intro-card ul              { list-style: none; padding-left: 0; margin: 0; }
.intro-card ul li           { padding: 0.55rem 0; border-bottom: 1px solid var(--c-divider); }
.intro-card ul li:last-child { border-bottom: none; }
.intro-card ul li::before   { content: "→ "; color: var(--c-muted-2); margin-right: 0.25rem; }

.result-card h3 {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
    color: var(--c-navy);
    line-height: 1.4;
}
.result-meta {
    font-size: 0.88rem;
    color: var(--c-muted);
    margin-bottom: 0.6rem;
}
.result-meta .doctype {
    display: inline-block;
    padding: 2px 8px;
    margin-left: 0.5rem;
    background: #eef2ff;
    color: #4338ca;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    font-weight: 500;
}
.result-id { margin-left: 0.5rem; color: var(--c-muted-2); font-size: 0.82rem; }

/* === Video cards (training page) ============================= */
.video-card h3 {
    margin: 0 0 0.2rem;
    font-size: 1.05rem;
    color: var(--c-navy);
}
.video-card .video-meta {
    color: var(--c-muted);
    font-size: 0.85rem;
    font-style: italic;
    margin: 0 0 0.6rem;
}
.video-embed {
    position: relative;
    padding-bottom: 56.25%;       /* 16:9 */
    height: 0;
    overflow: hidden;
    margin-top: 0.85rem;
    border-radius: var(--radius-md);
    background: #000;
}
.video-embed iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: 0;
}

/* === Toggle / expand =========================================
   FIX: the previous file had `..toggle { display: none; }` which
   is an invalid selector, so the rule was silently dropped and
   panels could flash open before jQuery hid them.
   ============================================================ */
.more {
    display: inline-block;
    color: var(--c-blue);
    font-weight: 500;
    font-size: 0.9rem;
    margin-top: 0.4rem;
    cursor: pointer;
}
.more::before          { content: "▸ "; }
.more.expanded::before { content: "▾ "; }

.toggle {
    display: none;                 /* hidden by default; jQuery .toggle() reveals */
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--c-divider);
    line-height: 1.6;
    color: var(--c-text-2);
}
.toggle p      { margin: 0.5rem 0 1rem; }
.toggle strong { color: var(--c-navy); }

/* === Buttons ================================================= */
.btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    font-size: 0.95rem;
    font-weight: 500;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--c-blue);
    color: white;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s;
    min-height: 40px;
    line-height: 1.4;
}
.btn:hover           { background: var(--c-blue-dk); color: white; text-decoration: none; }
.btn-primary         { background: var(--c-amber); }
.btn-primary:hover   { background: var(--c-amber-dk); }
.btn-secondary       { background: var(--c-navy); }
.btn-secondary:hover { background: var(--c-navy-2); }

/* Pure.css harmonization — only loaded on some pages */
.pure-button-primary        { background: var(--c-amber) !important; border-radius: var(--radius-sm); }
.pure-button-primary:hover  { background: var(--c-amber-dk) !important; }
.pure-button {
    border-radius: var(--radius-sm);
    transition: all 0.15s;
}

/* === Forms ===================================================
   These rules absorb everything we used from Pure.css's form
   module, so pages can drop pure-min.css and forms still work.
   ============================================================ */
input, select, textarea, button { font-family: inherit; }
label { font-weight: 500; color: var(--c-text-2); }

.pure-form { max-width: 100%; min-width: 0; }
.pure-form fieldset {
    border: 0;
    padding: 0;
    margin: 0 0 1rem;
    /* Fieldsets default to min-width: min-content, which prevents them
       from shrinking below the width of their widest child. On narrow
       viewports this lets long <option> text overflow horizontally,
       even when the <select> itself has width: 100%. */
    min-width: 0;
    max-width: 100%;
}
.pure-form legend {
    display: block;
    width: 100%;
    margin-bottom: 0.85rem;
    color: var(--c-navy);
    font-weight: 600;
    font-size: 1.05rem;
}

.pure-form input[type=text],
.pure-form input[type=email],
.pure-form input[type=password],
.pure-form input[type=tel],
.pure-form input[type=number],
.pure-form input[type=search],
.pure-form input[type=url],
.pure-form select,
.pure-form textarea {
    border-radius: var(--radius-sm);
    border: 1px solid var(--c-border-2);
    padding: 0.55rem 0.75rem;
    font-size: 1rem;          /* 1rem prevents iOS zoom-on-focus */
    box-shadow: none;
    box-sizing: border-box;   /* explicit — defensive against any reset */
    max-width: 100%;
    min-width: 0;
    color: var(--c-text);
    background: white;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.pure-form input:focus,
.pure-form select:focus,
.pure-form textarea:focus {
    border-color: var(--c-blue);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
    outline: none;
}

/* Stacked variant: labels above inputs, full-width inputs */
.pure-form-stacked label {
    display: block;
    margin: 0.85rem 0 0.3rem;
    font-weight: 500;
    color: var(--c-text-2);
}
.pure-form-stacked input[type=text],
.pure-form-stacked input[type=email],
.pure-form-stacked input[type=password],
.pure-form-stacked input[type=tel],
.pure-form-stacked input[type=number],
.pure-form-stacked input[type=search],
.pure-form-stacked input[type=url],
.pure-form-stacked select,
.pure-form-stacked textarea {
    display: block;
    width: 100%;
}

/* === Buttons (Pure compatibility) ============================
   Full base styles so .pure-button works without pure-min.css.
   The earlier .pure-button-primary override sits above this.
   ============================================================ */
.pure-button {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.4;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: #e5e7eb;
    color: #374151;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, color 0.15s, transform 0.05s;
    min-height: 40px;
    font-family: inherit;
    text-align: center;
    vertical-align: middle;
}
.pure-button:hover,
.pure-button:focus {
    background: #d1d5db;
    color: #1f2937;
    text-decoration: none;
}
.pure-button:active { transform: translateY(1px); }
.pure-button[disabled],
.pure-button-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* === Grid (Pure compatibility) ===============================
   Flex-based replacement for Pure's pure-g + pure-u-*. Covers
   every responsive class our pages use. Same gutter (1rem total
   between cells) regardless of viewport.
   ============================================================ */
.pure-g {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -0.5rem;
}
.pure-g > [class*="pure-u-"] {
    padding: 0 0.5rem;
    box-sizing: border-box;
}
.pure-u-1,
.pure-u-1-1   { flex: 0 0 100%;     max-width: 100%;     }
.pure-u-1-2   { flex: 0 0 50%;      max-width: 50%;      }
.pure-u-1-3   { flex: 0 0 33.3333%; max-width: 33.3333%; }
.pure-u-1-4   { flex: 0 0 25%;      max-width: 25%;      }
.pure-u-2-3   { flex: 0 0 66.6667%; max-width: 66.6667%; }
.pure-u-3-4   { flex: 0 0 75%;      max-width: 75%;      }

/* md ≥ 768px (matches Pure's default breakpoint) */
@media (min-width: 768px) {
    .pure-u-md-1     { flex: 0 0 100%;     max-width: 100%;     }
    .pure-u-md-1-2   { flex: 0 0 50%;      max-width: 50%;      }
    .pure-u-md-1-3   { flex: 0 0 33.3333%; max-width: 33.3333%; }
    .pure-u-md-1-4   { flex: 0 0 25%;      max-width: 25%;      }
    .pure-u-md-2-3   { flex: 0 0 66.6667%; max-width: 66.6667%; }
    .pure-u-md-2-5   { flex: 0 0 40%;      max-width: 40%;      }
    .pure-u-md-3-5   { flex: 0 0 60%;      max-width: 60%;      }
    .pure-u-md-3-4   { flex: 0 0 75%;      max-width: 75%;      }
}
/* lg ≥ 1024px */
@media (min-width: 1024px) {
    .pure-u-lg-1     { flex: 0 0 100%;     max-width: 100%;     }
    .pure-u-lg-1-2   { flex: 0 0 50%;      max-width: 50%;      }
    .pure-u-lg-1-3   { flex: 0 0 33.3333%; max-width: 33.3333%; }
    .pure-u-lg-1-4   { flex: 0 0 25%;      max-width: 25%;      }
    .pure-u-lg-2-5   { flex: 0 0 40%;      max-width: 40%;      }
    .pure-u-lg-3-5   { flex: 0 0 60%;      max-width: 60%;      }
}

/* === Pricing card (tour page) ================================
   Three-tier layout (Free / Pro / with-laser-purchase) and the
   four-up condition lists below. Replaces the legacy
   .pricing-table* chain from pricing.css.
   ============================================================ */
.pricing-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: 1rem 0 1.5rem;
}
@media (min-width: 768px) {
    .pricing-grid { grid-template-columns: repeat(3, 1fr); }
}
.pricing-card {
    background: var(--c-card);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.4rem 1.5rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    text-align: center;
}
.pricing-card.is-featured {
    border: 2px solid var(--c-amber);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.pricing-card h3 {
    margin: 0 0 0.5rem;
    color: var(--c-navy);
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.pricing-card .price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--c-navy);
    line-height: 1;
    margin: 0.25rem 0 1rem;
}
.pricing-card ul {
    list-style: none;
    padding: 0;
    margin: 0 0 1.25rem;
    text-align: left;
    flex: 1;
}
.pricing-card ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--c-divider);
    font-size: 0.93rem;
    line-height: 1.4;
}
.pricing-card ul li:last-child { border-bottom: none; }
.pricing-card ul li::before {
    content: "✓ ";
    color: #10b981;
    font-weight: 700;
    margin-right: 0.25rem;
}
.pricing-card .pricing-cta {
    margin-top: auto;
}
.pricing-card .pricing-cta img { max-width: 160px; }

/* Lists of conditions / features grid (4 columns on desktop) */
.feature-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: 1rem 0 1.5rem;
}
@media (min-width: 600px)  { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .feature-grid { grid-template-columns: repeat(4, 1fr); } }
.feature-card {
    background: var(--c-card);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    padding: 1rem 1.15rem;
    box-shadow: var(--shadow-sm);
}
.feature-card h3 {
    margin: 0 0 0.6rem;
    color: var(--c-navy);
    font-size: 1rem;
    border-bottom: 1px solid var(--c-divider);
    padding-bottom: 0.4rem;
}
.feature-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
}
.feature-card ul li {
    padding: 0.3rem 0;
    border-bottom: 1px solid var(--c-divider);
    line-height: 1.35;
}
.feature-card ul li:last-child { border-bottom: none; }

/* Two-up info row used at the bottom of the tour page */
.info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: 1rem 0;
}
@media (min-width: 768px) { .info-grid { grid-template-columns: repeat(2, 1fr); } }
.info-grid .card { margin-bottom: 0; }

/* === Auth-page card (sign-in / signup / forgot / reset) ====== */
.login-wrap {
    max-width: 460px;
    margin: 2rem auto;
    padding: 0 1rem;
}
.login-wrap.is-wide { max-width: 720px; }

.login-card {
    background: var(--c-card);
    border-radius: var(--radius-lg);
    padding: 1.75rem 1.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--c-border);
}
@media (min-width: 600px) { .login-card { padding: 2.25rem; } }

.login-card h2,
.login-card h1 {
    margin-top: 0;
    text-align: center;
    color: var(--c-navy);
}
.login-card label {
    display: block;
    margin-top: 1rem;
    font-weight: 500;
    color: var(--c-text-2);
}
.login-card input[type=email],
.login-card input[type=text],
.login-card input[type=password],
.login-card input[type=tel],
.login-card input[type=number],
.login-card select,
.login-card textarea {
    width: 100%;
    padding: 0.6rem 0.75rem;
    font-size: 1rem;
    border: 1px solid var(--c-border-2);
    border-radius: var(--radius-sm);
    margin-top: 0.25rem;
    box-sizing: border-box;
    background: white;
    color: var(--c-text);
}
.login-card input:focus,
.login-card select:focus,
.login-card textarea:focus {
    border-color: var(--c-blue);
    outline: none;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}
.login-card .submit-btn {
    width: 100%;
    margin-top: 1.5rem;
    padding: 0.75rem;
    background: var(--c-amber);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    min-height: 44px;
}
.login-card .submit-btn:hover { background: var(--c-amber-dk); }

.login-card .checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.2rem;
    font-weight: 400;
    color: var(--c-text-2);
}
.login-card .checkbox-label input { width: auto; margin: 0; }

.login-error {
    background: #fef2f2;
    border-left: 3px solid #dc2626;
    color: #991b1b;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.login-success {
    background: #ecfdf5;
    border-left: 3px solid #10b981;
    color: #065f46;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.login-links {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--c-muted);
}
.login-links a { color: var(--c-blue); }
.login-links p { margin: 0.4rem 0; }

.req-mark {
    color: #dc2626;
    font-size: 0.82em;
    font-weight: 400;
    margin-left: 0.25rem;
}

/* === Admin tool popup pages (tool-add/edit-research) =========
   Self-contained pages that open in window.open() popups. No
   site toolbar; just a clean form with a close link.
   ============================================================ */
.admin-tool {
    max-width: 1100px;
    margin: 1rem auto;
    padding: 0 1rem;
}
.admin-tool h1,
.admin-tool h2 { color: var(--c-navy); margin-top: 0; }
.admin-tool .close-link {
    text-align: right;
    margin: 1rem 0;
    font-size: 0.9rem;
}
.admin-tool form p {
    margin: 0.75rem 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}
.admin-tool form label {
    flex: 0 0 12em;
    font-weight: 500;
    color: var(--c-text-2);
}
.admin-tool form input[type=text],
.admin-tool form input[type=url],
.admin-tool form input[type=number],
.admin-tool form select {
    flex: 1 1 200px;
    min-width: 0;
    padding: 0.4rem 0.6rem;
    font-size: 0.95rem;
    border: 1px solid var(--c-border-2);
    border-radius: var(--radius-sm);
}
.admin-tool form textarea {
    width: 100%;
    padding: 0.5rem 0.6rem;
    font-size: 0.95rem;
    border: 1px solid var(--c-border-2);
    border-radius: var(--radius-sm);
    font-family: inherit;
    resize: vertical;
}
.admin-tool form hr {
    border: 0;
    border-top: 1px solid var(--c-divider);
    margin: 1.25rem 0;
}
@media (max-width: 700px) {
    .admin-tool form label { flex: 0 0 100%; }
}

/* === Warnings / alerts ======================================= */
.warningtext {
    display: block;
    background: #fff7ed;
    border-left: 3px solid var(--c-amber);
    color: #9a3412;
    padding: 0.5rem 0.75rem;
    margin: 0.5rem 0;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-weight: 500;
    font-size: 0.9rem;
}

/* Success counterpart to .warningtext */
.successtext {
    display: block;
    background: #ecfdf5;
    border-left: 3px solid #10b981;
    color: #065f46;
    padding: 0.5rem 0.75rem;
    margin: 0.5rem 0;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-weight: 500;
    font-size: 0.9rem;
}

/* === Stat-row tiles (totals summary, etc.) =================== */
.stat-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 0.5rem;
    margin: 1rem 0 1.25rem;
}
.stat-row .stat {
    background: var(--c-card);
    padding: 0.6rem 0.75rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--c-border);
    text-align: center;
}
.stat-row .stat-label {
    font-size: 0.75rem;
    color: var(--c-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.2rem;
}
.stat-row .stat-value {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--c-navy);
    line-height: 1.2;
}

/* === Call-to-action banner =================================== */
.cta-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    background: linear-gradient(135deg, var(--c-amber), var(--c-amber-dk));
    color: white;
    padding: 0.85rem 1.1rem;
    border-radius: var(--radius-md);
    margin: 1rem 0;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    box-shadow: var(--shadow-md);
    transition: transform 0.15s, box-shadow 0.15s;
    min-height: 48px;
}
.cta-banner,
.cta-banner:visited { color: white; }
.cta-banner:hover {
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}
.cta-banner::after {
    content: "→";
    font-size: 1.2rem;
    line-height: 1;
}

/* === Form actions row ======================================== */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1rem;
}
@media (max-width: 700px) {
    .form-actions { flex-direction: column-reverse; align-items: stretch; }
    .form-actions .pure-button,
    .form-actions .btn {
        width: 100%;
        padding-top: 0.7rem;
        padding-bottom: 0.7rem;
    }
}

/* === Protocol step table (therapyreview) =====================
   Cleaner than Pure's default chrome; stacks on phones.
   ============================================================ */
.protocol-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--c-card);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin: 0 0 1rem;
}
.protocol-table thead th {
    background: var(--c-divider);
    color: var(--c-navy);
    text-align: left;
    padding: 0.6rem 0.85rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-bottom: 1px solid var(--c-border);
}
.protocol-table tbody td {
    padding: 0.85rem;
    border-bottom: 1px solid var(--c-divider);
    vertical-align: top;
    line-height: 1.5;
}
.protocol-table tbody tr:last-child td { border-bottom: none; }
.protocol-table img {
    max-width: 160px;
    height: auto;
    border-radius: var(--radius-sm);
    display: block;
}
@media (max-width: 700px) {
    .protocol-table thead { display: none; }
    .protocol-table,
    .protocol-table tbody,
    .protocol-table tr,
    .protocol-table td { display: block; width: 100%; }
    .protocol-table tr {
        border-bottom: 1px solid var(--c-divider);
        padding: 0.5rem 0.75rem;
    }
    .protocol-table tr:last-child  { border-bottom: none; }
    .protocol-table td             { padding: 0.4rem 0; border-bottom: none; }
    .protocol-table td:first-child { margin-bottom: 0.5rem; }
    .protocol-table img            { max-width: 140px; margin: 0 auto; }
}

/* === Light styling for any remaining .pure-table on members pages */
.pure-table {
    background: var(--c-card);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-md);
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
}
.pure-table thead th {
    background: var(--c-divider);
    color: var(--c-navy);
    font-weight: 600;
}

/* === Admin tools ============================================= */
.admin-tools {
    background: #fef3c7;
    border: 1px solid #fbbf24;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    margin: 1rem 0;
    font-size: 0.9rem;
}
.admin-tools input[type=button],
.admin-tools button {
    background: var(--c-navy);
    color: white;
    border: none;
    padding: 0.4rem 0.9rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 500;
    margin-right: 0.5rem;
}
.admin-tools input[type=button]:hover,
.admin-tools button:hover { background: var(--c-navy-2); }

/* === Misc UI patterns ======================================== */
.share-link {
    background: white;
    border: 1px dashed var(--c-border-2);
    padding: 0.9rem 1.1rem;
    border-radius: var(--radius-md);
    margin-top: 1.25rem;
    font-size: 0.9rem;
}
.share-link a { word-break: break-all; }

.no-results {
    background: white;
    padding: 1.75rem;
    text-align: center;
    color: var(--c-muted);
    border-radius: var(--radius-lg);
    border: 1px dashed var(--c-border-2);
}

.new-query-link {
    display: inline-block;
    margin-bottom: 1.25rem;
    padding: 0.5rem 1rem;
    background: white;
    border-radius: var(--radius-md);
    font-weight: 500;
    box-shadow: var(--shadow-sm);
}

.result-count { color: var(--c-muted); margin-bottom: 1.25rem; }

/* === Footer ================================================== */
.site-footer,
.footer {
    text-align: center;
    padding: 1.25rem 1rem calc(1.25rem + env(safe-area-inset-bottom));
    color: var(--c-muted);
    font-size: 0.85rem;
    background: transparent;
    border: none;
    width: auto;
    clear: both;
}
.site-footer a,
.footer a { color: var(--c-muted); }

/* === Glossary ================================================ */
dl.glossary dt { font-weight: bold; margin-top: 1em; color: var(--c-navy); }
dl.glossary dd { margin-left: 0; margin-bottom: 0.5em; }

/* ============================================================
   Legacy fz* classes — kept for compatibility with the older
   ColdFusion-era forms still referenced in members-only/.
   ============================================================ */
.fzbdytxtsm  { font-family: inherit; font-size: 0.85rem; color: white; }
.fzbdytxtlg  { font-family: inherit; font-size: 0.95rem; color: white; }
.fztbltxtsm  { font-family: inherit; font-size: 0.85rem; color: var(--c-text); }
.fztbltxtlg  { font-family: inherit; font-size: 0.95rem; color: var(--c-text); }
.fzhdrtxtsm  { font-family: inherit; font-size: 0.85rem; font-weight: 700; color: var(--c-navy); }
.fzhdrtxtlg  { font-family: inherit; font-size: 0.95rem; font-weight: 700; color: var(--c-navy); }

.fzinputsm   { font-family: inherit; font-size: 0.9rem; }
.fzinputlg   { font-family: inherit; font-size: 1rem; }

.fzerrorsm   { color: #dc2626; font-size: 0.9rem; }
.fzerrorlg   { color: #dc2626; font-size: 1rem;  font-weight: 500; }
.fzerrorxlg  { color: #dc2626; font-size: 1.1rem; font-weight: 500; }

a.fztbllinksm        { color: var(--c-blue); font-size: 0.9rem; text-decoration: none; }
a.fztbllinksm:hover  { text-decoration: underline; }
a.fztbllinklg        { color: var(--c-blue); font-size: 1rem;  text-decoration: none; }
a.fztbllinklg:hover  { text-decoration: underline; }

a.fzbdylinksm,
a.fzbdylinklg        { color: #93c5fd; }
a.fzbdylinksm:hover,
a.fzbdylinklg:hover  { color: white; }

/* ============================================================
   Tablet (≥ 701px)
   ============================================================ */
@media (min-width: 701px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.2rem; }

    header.site-toolbar .site-toolbar-inner {
        flex-direction: row;
        justify-content: space-between;
        height: 56px;
        padding: 0 1.5rem;
    }
    header.site-toolbar .brand   { font-size: 1.25rem; }
    header.site-toolbar nav      { overflow-x: visible; }
    header.site-toolbar nav a    { padding: 0.55rem 1rem; font-size: 0.95rem; }

    .hero          { padding: 1.6rem 1.5rem 1.8rem; }
    .hero h1       { font-size: 1.85rem; margin-bottom: 0.4rem; }
    .hero p.lead   { font-size: 1.05rem; }

    .content-wrap  { margin: 1.75rem auto; padding: 0 1.5rem; }

    .card,
    .result-card,
    .intro-card,
    .video-card    { padding: 1.4rem 1.6rem; }
    .intro-card    { padding: 1.75rem; }
}

/* ============================================================
   Desktop (≥ 1025px)
   ============================================================ */
@media (min-width: 1025px) {
    .hero          { padding: 2rem 1.5rem 2.25rem; }
    .hero h1       { font-size: 2.1rem; }
    .hero p.lead   { font-size: 1.1rem; }

    .content-wrap  { margin: 2rem auto; }
}

/* ============================================================
   Print
   ============================================================ */
@media print {
    .site-toolbar, .site-footer, .footer,
    .admin-tools, .share-link, .new-query-link, .more {
        display: none !important;
    }
    body { background: white; color: black; }
    .card, .result-card, .intro-card, .video-card {
        box-shadow: none;
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }
    .hero { background: none; color: black; padding: 0.5rem 0; }
    .hero h1 { color: black; }
    a, a:visited { color: black; text-decoration: underline; }
}

/* ============================================================
   Reduced motion — respect user setting
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        transition-duration: 0.01ms !important;
        animation-duration:  0.01ms !important;
    }
}
