/* ==========================================================================
   THE TEMPERANCE TOOLBOX
   Shared design system. Edit tokens here, every page follows.
   ========================================================================== */

/* --- 1. TOKENS ------------------------------------------------------- */

:root {
  /* Brand palette */
  --t3-deep-teal:   #0d4a52;
  --t3-teal:        #166973;
  --t3-light-teal:  #e3f2f4;
  --t3-lavender:    #d1c4e9;
  --t3-purple:      #9575cd;
  --t3-gold:        #f4b41a;
  --t3-gold-hover:  #d99c08;
  --t3-cream:       #fbf9f5;
  --t3-off-white:   #f4f1ea;
  --t3-charcoal:    #2c3e50;
  --t3-muted:       #7f8c8d;

  /* Derived surfaces */
  --t3-page-bg:     var(--t3-cream);
  --t3-panel-bg:    var(--t3-off-white);
  --t3-card-bg:     #ffffff;
  --t3-text:        var(--t3-charcoal);
  --t3-text-muted:  #5f6f70;
  --t3-heading:     var(--t3-deep-teal);
  --t3-link:        var(--t3-teal);
  --t3-border:      #ddd6cb;
  --t3-border-soft: #ebe5da;

  /* Status colors. Always paired with a label or icon, never color alone. */
  --t3-status-green:  #2e7d5b;
  --t3-status-yellow: #a8770c;
  --t3-status-red:    #b3392f;
  --t3-status-green-bg:  #e6f2ec;
  --t3-status-yellow-bg: #fdf3dd;
  --t3-status-red-bg:    #fbeceb;

  /* Type scale */
  --t3-font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               Helvetica, Arial, sans-serif;
  --t3-font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --t3-fs-hero:    clamp(2rem, 1.4rem + 2.4vw, 3rem);
  --t3-fs-h1:      clamp(1.75rem, 1.35rem + 1.7vw, 2.5rem);
  --t3-fs-h2:      clamp(1.4rem, 1.2rem + 0.9vw, 1.9rem);
  --t3-fs-h3:      1.2rem;
  --t3-fs-body:    1rem;
  --t3-fs-small:   0.9rem;
  --t3-fs-label:   0.8rem;

  /* Spacing */
  --t3-sp-1: 0.25rem;
  --t3-sp-2: 0.5rem;
  --t3-sp-3: 0.75rem;
  --t3-sp-4: 1rem;
  --t3-sp-5: 1.5rem;
  --t3-sp-6: 2rem;
  --t3-sp-7: 3rem;
  --t3-sp-8: 4rem;

  /* Shape and depth. Kept restrained on purpose. */
  --t3-radius:    6px;
  --t3-radius-lg: 10px;
  --t3-radius-pill: 999px;
  --t3-shadow:    0 1px 3px rgba(13, 74, 82, 0.07);
  --t3-shadow-md: 0 4px 14px rgba(13, 74, 82, 0.10);

  --t3-maxw: 1140px;
  --t3-maxw-prose: 68ch;
}

/* Dark theme. Only tokens change, no component rules are duplicated. */
:root[data-theme="dark"] {
  --t3-deep-teal:   #7fd4dd;
  --t3-teal:        #5cbcc7;
  --t3-light-teal:  #16292e;
  --t3-lavender:    #3b3252;
  --t3-purple:      #b39ddb;
  --t3-gold:        #f4b41a;
  --t3-gold-hover:  #ffc63f;
  --t3-cream:       #12181a;
  --t3-off-white:   #172023;

  --t3-page-bg:     #12181a;
  --t3-panel-bg:    #172023;
  --t3-card-bg:     #1b2529;
  --t3-text:        #e8edee;
  --t3-text-muted:  #a3b1b3;
  --t3-heading:     #7fd4dd;
  --t3-link:        #6fc9d4;
  --t3-border:      #2d3b40;
  --t3-border-soft: #243034;

  --t3-status-green:  #6ecf9f;
  --t3-status-yellow: #e8bd5a;
  --t3-status-red:    #f08d84;
  --t3-status-green-bg:  #14302a;
  --t3-status-yellow-bg: #33290f;
  --t3-status-red-bg:    #33191a;

  --t3-shadow:    0 1px 3px rgba(0, 0, 0, 0.4);
  --t3-shadow-md: 0 4px 14px rgba(0, 0, 0, 0.45);
}

/* --- 2. RESET AND BASE ----------------------------------------------- */

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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--t3-font-sans);
  font-size: var(--t3-fs-body);
  line-height: 1.65;
  color: var(--t3-text);
  background-color: var(--t3-page-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg, video, canvas { max-width: 100%; height: auto; }

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--t3-sp-3);
  color: var(--t3-heading);
  line-height: 1.25;
  font-weight: 650;
}
h1 { font-size: var(--t3-fs-h1); }
h2 { font-size: var(--t3-fs-h2); }
h3 { font-size: var(--t3-fs-h3); }
h4 { font-size: 1.05rem; }

p { margin: 0 0 var(--t3-sp-4); }
p:last-child { margin-bottom: 0; }

a { color: var(--t3-link); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--t3-deep-teal); }

small, .t3-small { font-size: var(--t3-fs-small); }
.t3-muted { color: var(--t3-text-muted); }

hr {
  border: 0;
  border-top: 1px solid var(--t3-border-soft);
  margin: var(--t3-sp-6) 0;
}

ul, ol { margin: 0 0 var(--t3-sp-4); padding-left: 1.35rem; }
li { margin-bottom: var(--t3-sp-2); }

/* Visible focus everywhere. Never remove this. */
:focus-visible {
  outline: 3px solid var(--t3-gold);
  outline-offset: 2px;
  border-radius: 3px;
}

::selection { background: var(--t3-light-teal); color: var(--t3-deep-teal); }

/* --- 3. LAYOUT -------------------------------------------------------- */

.t3-container {
  width: 100%;
  max-width: var(--t3-maxw);
  margin: 0 auto;
  padding: 0 var(--t3-sp-5);
}
.t3-prose { max-width: var(--t3-maxw-prose); }

.t3-section { padding: var(--t3-sp-7) 0; }
.t3-section--panel { background: var(--t3-panel-bg); }

.t3-main { display: block; min-height: 50vh; }

.t3-grid {
  display: grid;
  gap: var(--t3-sp-5);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
}
.t3-grid--wide {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
}

.t3-stack > * + * { margin-top: var(--t3-sp-4); }
.t3-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--t3-sp-3);
  align-items: center;
}

/* Skip link for keyboard users. */
.t3-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1200;
  background: var(--t3-gold);
  color: #1a1a1a;
  padding: var(--t3-sp-3) var(--t3-sp-4);
  font-weight: 650;
  text-decoration: none;
  border-radius: 0 0 var(--t3-radius) 0;
}
.t3-skip:focus { left: 0; }

.t3-visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* --- 4. SITE HEADER AND NAVIGATION ------------------------------------ */

.t3-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--t3-panel-bg);
  border-bottom: 1px solid var(--t3-border);
}

.t3-header__inner {
  max-width: var(--t3-maxw);
  margin: 0 auto;
  padding: var(--t3-sp-3) var(--t3-sp-5);
  display: flex;
  align-items: center;
  gap: var(--t3-sp-4);
}

.t3-brand {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--t3-deep-teal);
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: -0.01em;
}
.t3-brand:hover { color: var(--t3-teal); }

.t3-nav { margin-left: auto; }

.t3-nav__list {
  list-style: none;
  display: flex;
  gap: var(--t3-sp-1);
  margin: 0;
  padding: 0;
  align-items: center;
}
.t3-nav__list li { margin: 0; }

.t3-nav__link {
  display: block;
  padding: var(--t3-sp-2) var(--t3-sp-3);
  font-size: var(--t3-fs-small);
  font-weight: 550;
  color: var(--t3-text);
  text-decoration: none;
  border-radius: var(--t3-radius);
  white-space: nowrap;
}
.t3-nav__link:hover { background: var(--t3-light-teal); color: var(--t3-deep-teal); }
.t3-nav__link[aria-current="page"] {
  color: var(--t3-deep-teal);
  background: var(--t3-light-teal);
  box-shadow: inset 0 -2px 0 var(--t3-gold);
}

.t3-header__controls {
  display: flex;
  align-items: center;
  gap: var(--t3-sp-2);
}

.t3-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 var(--t3-sp-2);
  background: transparent;
  border: 1px solid var(--t3-border);
  border-radius: var(--t3-radius);
  color: var(--t3-text);
  font-size: 1rem;
  cursor: pointer;
  line-height: 1;
}
.t3-icon-btn:hover { background: var(--t3-light-teal); border-color: var(--t3-teal); color: var(--t3-deep-teal); }

.t3-nav__toggle { display: none; }

@media (max-width: 900px) {
  .t3-nav__toggle { display: inline-flex; }
  .t3-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--t3-panel-bg);
    border-bottom: 1px solid var(--t3-border);
    box-shadow: var(--t3-shadow-md);
    display: none;
    max-height: 70vh;
    overflow-y: auto;
  }
  .t3-nav.is-open { display: block; }
  .t3-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--t3-sp-2) var(--t3-sp-4) var(--t3-sp-4);
  }
  .t3-nav__link {
    padding: var(--t3-sp-3) var(--t3-sp-3);
    border-bottom: 1px solid var(--t3-border-soft);
    border-radius: 0;
    font-size: 1rem;
  }
}

/* Breadcrumb so no page is a dead end. */
.t3-breadcrumb {
  background: var(--t3-page-bg);
  border-bottom: 1px solid var(--t3-border-soft);
  font-size: var(--t3-fs-small);
}
.t3-breadcrumb ol {
  max-width: var(--t3-maxw);
  margin: 0 auto;
  padding: var(--t3-sp-3) var(--t3-sp-5);
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--t3-sp-2);
  align-items: center;
}
.t3-breadcrumb li { margin: 0; display: flex; align-items: center; gap: var(--t3-sp-2); }
.t3-breadcrumb li + li::before { content: "/"; color: var(--t3-muted); }
.t3-breadcrumb a { color: var(--t3-link); text-decoration: none; }
.t3-breadcrumb a:hover { text-decoration: underline; }
.t3-breadcrumb [aria-current="page"] { color: var(--t3-text-muted); }

/* --- 5. PAGE HEAD ----------------------------------------------------- */

.t3-pagehead {
  padding: var(--t3-sp-6) 0 var(--t3-sp-5);
  border-bottom: 1px solid var(--t3-border-soft);
  background: var(--t3-panel-bg);
}
.t3-pagehead h1 { margin-bottom: var(--t3-sp-2); }
.t3-pagehead p {
  color: var(--t3-text-muted);
  max-width: var(--t3-maxw-prose);
  margin: 0;
}

/* --- 6. BUTTONS ------------------------------------------------------- */

.t3-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--t3-sp-2);
  min-height: 44px;
  padding: var(--t3-sp-3) var(--t3-sp-5);
  font-family: inherit;
  font-size: var(--t3-fs-body);
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--t3-radius);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.t3-btn:disabled, .t3-btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
}

.t3-btn--primary {
  background: var(--t3-deep-teal);
  color: #ffffff;
  border-color: var(--t3-deep-teal);
}
.t3-btn--primary:hover:not(:disabled) { background: var(--t3-teal); border-color: var(--t3-teal); color: #ffffff; }
:root[data-theme="dark"] .t3-btn--primary { color: #0b1416; }

.t3-btn--secondary {
  background: transparent;
  color: var(--t3-link);
  border-color: var(--t3-border);
}
.t3-btn--secondary:hover:not(:disabled) {
  background: var(--t3-light-teal);
  border-color: var(--t3-teal);
  color: var(--t3-deep-teal);
}

/* Gold is reserved for the single most important action on a screen. */
.t3-btn--accent {
  background: var(--t3-gold);
  color: #241a00;
  border-color: var(--t3-gold);
}
.t3-btn--accent:hover:not(:disabled) { background: var(--t3-gold-hover); border-color: var(--t3-gold-hover); }

.t3-btn--danger {
  background: transparent;
  color: var(--t3-status-red);
  border-color: var(--t3-status-red);
}
.t3-btn--danger:hover:not(:disabled) { background: var(--t3-status-red-bg); }

.t3-btn--sm { min-height: 38px; padding: var(--t3-sp-2) var(--t3-sp-3); font-size: var(--t3-fs-small); }
.t3-btn--block { width: 100%; }

.t3-pill {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: var(--t3-sp-2) var(--t3-sp-4);
  font-size: var(--t3-fs-small);
  font-weight: 550;
  color: var(--t3-link);
  background: var(--t3-card-bg);
  border: 1px solid var(--t3-border);
  border-radius: var(--t3-radius-pill);
  text-decoration: none;
  cursor: pointer;
}
.t3-pill:hover, .t3-pill[aria-pressed="true"] {
  background: var(--t3-light-teal);
  border-color: var(--t3-teal);
  color: var(--t3-deep-teal);
}
.t3-pill[aria-pressed="true"] { font-weight: 650; box-shadow: inset 0 0 0 1px var(--t3-teal); }

/* --- 7. CARDS AND PANELS ---------------------------------------------- */

.t3-card {
  display: flex;
  flex-direction: column;
  gap: var(--t3-sp-3);
  padding: var(--t3-sp-5);
  background: var(--t3-card-bg);
  border: 1px solid var(--t3-border);
  border-radius: var(--t3-radius-lg);
  box-shadow: var(--t3-shadow);
}
.t3-card h3 { margin: 0; }
.t3-card p { color: var(--t3-text-muted); margin: 0; }
.t3-card .t3-btn, .t3-card .t3-row { margin-top: auto; }

a.t3-card {
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
a.t3-card:hover { border-color: var(--t3-teal); box-shadow: var(--t3-shadow-md); }
a.t3-card h3 { color: var(--t3-heading); }

.t3-panel {
  padding: var(--t3-sp-5);
  background: var(--t3-card-bg);
  border: 1px solid var(--t3-border);
  border-radius: var(--t3-radius-lg);
}

.t3-note {
  padding: var(--t3-sp-4) var(--t3-sp-5);
  background: var(--t3-light-teal);
  border-left: 4px solid var(--t3-teal);
  border-radius: 0 var(--t3-radius) var(--t3-radius) 0;
  color: var(--t3-text);
}
.t3-note strong { color: var(--t3-deep-teal); }

.t3-note--warn {
  background: var(--t3-status-yellow-bg);
  border-left-color: var(--t3-status-yellow);
}
.t3-note--urgent {
  background: var(--t3-status-red-bg);
  border-left-color: var(--t3-status-red);
}

/* Check-in status. Label text always accompanies the color. */
.t3-status {
  display: inline-flex;
  align-items: center;
  gap: var(--t3-sp-2);
  padding: var(--t3-sp-1) var(--t3-sp-3);
  font-size: var(--t3-fs-label);
  font-weight: 650;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border-radius: var(--t3-radius-pill);
  border: 1px solid currentColor;
}
.t3-status--green  { color: var(--t3-status-green);  background: var(--t3-status-green-bg); }
.t3-status--yellow { color: var(--t3-status-yellow); background: var(--t3-status-yellow-bg); }
.t3-status--red    { color: var(--t3-status-red);    background: var(--t3-status-red-bg); }

/* --- 8. FORMS --------------------------------------------------------- */

.t3-field { margin-bottom: var(--t3-sp-4); }

.t3-label {
  display: block;
  margin-bottom: var(--t3-sp-2);
  font-size: var(--t3-fs-small);
  font-weight: 600;
  color: var(--t3-text);
}
.t3-hint {
  display: block;
  margin-top: var(--t3-sp-1);
  font-size: var(--t3-fs-small);
  color: var(--t3-text-muted);
}

.t3-input, .t3-select, .t3-textarea,
input[type="text"].t3-input, input[type="number"].t3-input,
input[type="date"].t3-input, input[type="email"].t3-input {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: var(--t3-sp-3);
  font-family: inherit;
  font-size: max(16px, var(--t3-fs-body)); /* 16px minimum stops iOS zoom on focus */
  color: var(--t3-text);
  background: var(--t3-card-bg);
  border: 1px solid var(--t3-border);
  border-radius: var(--t3-radius);
}
.t3-textarea { min-height: 120px; resize: vertical; line-height: 1.6; }
.t3-input:focus, .t3-select:focus, .t3-textarea:focus { border-color: var(--t3-teal); }
.t3-input::placeholder, .t3-textarea::placeholder { color: var(--t3-muted); }

.t3-input[aria-invalid="true"], .t3-textarea[aria-invalid="true"] {
  border-color: var(--t3-status-red);
  border-width: 2px;
}

.t3-error {
  display: block;
  margin-top: var(--t3-sp-2);
  font-size: var(--t3-fs-small);
  font-weight: 550;
  color: var(--t3-status-red);
}

.t3-check {
  display: flex;
  align-items: flex-start;
  gap: var(--t3-sp-3);
  padding: var(--t3-sp-3);
  border-radius: var(--t3-radius);
  cursor: pointer;
}
.t3-check:hover { background: var(--t3-light-teal); }
.t3-check input { width: 20px; height: 20px; margin: 2px 0 0; flex-shrink: 0; accent-color: var(--t3-teal); }

/* --- 9. TABLES -------------------------------------------------------- */

.t3-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--t3-border);
  border-radius: var(--t3-radius-lg);
  background: var(--t3-card-bg);
}
.t3-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--t3-fs-small);
}
.t3-table th, .t3-table td {
  padding: var(--t3-sp-3) var(--t3-sp-4);
  text-align: left;
  border-bottom: 1px solid var(--t3-border-soft);
}
.t3-table th {
  background: var(--t3-panel-bg);
  color: var(--t3-deep-teal);
  font-weight: 650;
  white-space: nowrap;
}
.t3-table tr:last-child td { border-bottom: 0; }

/* --- 10. EMPTY STATES AND FEEDBACK ------------------------------------ */

.t3-empty {
  padding: var(--t3-sp-6) var(--t3-sp-5);
  text-align: center;
  background: var(--t3-panel-bg);
  border: 1px dashed var(--t3-border);
  border-radius: var(--t3-radius-lg);
}
.t3-empty h3 { margin-bottom: var(--t3-sp-2); }
.t3-empty p { color: var(--t3-text-muted); margin-bottom: var(--t3-sp-4); }

/* Save confirmations and errors announced to screen readers. */
.t3-toast-region {
  position: fixed;
  bottom: var(--t3-sp-5);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1100;
  display: flex;
  flex-direction: column;
  gap: var(--t3-sp-2);
  width: min(420px, calc(100vw - 2rem));
  pointer-events: none;
}
.t3-toast {
  padding: var(--t3-sp-3) var(--t3-sp-4);
  background: var(--t3-deep-teal);
  color: #ffffff;
  border-radius: var(--t3-radius);
  box-shadow: var(--t3-shadow-md);
  font-size: var(--t3-fs-small);
  font-weight: 550;
}
:root[data-theme="dark"] .t3-toast { background: var(--t3-light-teal); color: var(--t3-text); border: 1px solid var(--t3-teal); }
.t3-toast--error { background: var(--t3-status-red); color: #ffffff; }

/* --- 11. TEMP METHOD -------------------------------------------------- */

.t3-temp-steps {
  display: grid;
  gap: var(--t3-sp-4);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  list-style: none;
  padding: 0;
  margin: 0;
}
.t3-temp-step {
  margin: 0;
  padding: var(--t3-sp-5);
  background: var(--t3-card-bg);
  border: 1px solid var(--t3-border);
  border-top: 3px solid var(--t3-teal);
  border-radius: var(--t3-radius-lg);
}
.t3-temp-step__letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-bottom: var(--t3-sp-3);
  font-family: var(--t3-font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--t3-deep-teal);
  background: var(--t3-light-teal);
  border-radius: var(--t3-radius);
}
.t3-temp-step h3 { font-size: 1.05rem; margin-bottom: var(--t3-sp-2); }
.t3-temp-step p { font-size: var(--t3-fs-small); color: var(--t3-text-muted); margin-bottom: var(--t3-sp-3); }
.t3-temp-step .t3-row { gap: var(--t3-sp-2); }

/* --- 12. FOOTER ------------------------------------------------------- */

.t3-footer {
  margin-top: var(--t3-sp-8);
  padding: var(--t3-sp-7) 0 var(--t3-sp-5);
  background: var(--t3-panel-bg);
  border-top: 1px solid var(--t3-border);
  font-size: var(--t3-fs-small);
}
.t3-footer__grid {
  display: grid;
  gap: var(--t3-sp-6);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  margin-bottom: var(--t3-sp-6);
}
.t3-footer h2 {
  font-size: var(--t3-fs-small);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--t3-text-muted);
  margin-bottom: var(--t3-sp-3);
}
.t3-footer ul { list-style: none; padding: 0; margin: 0; }
.t3-footer li { margin-bottom: var(--t3-sp-2); }
.t3-footer a { color: var(--t3-text); text-decoration: none; }
.t3-footer a:hover { color: var(--t3-link); text-decoration: underline; }
.t3-footer__brand strong { display: block; color: var(--t3-deep-teal); font-size: 1rem; margin-bottom: var(--t3-sp-2); }
.t3-footer__brand p { color: var(--t3-text-muted); }

.t3-footer__legal {
  padding-top: var(--t3-sp-5);
  border-top: 1px solid var(--t3-border-soft);
  color: var(--t3-text-muted);
}
.t3-footer__legal p { max-width: var(--t3-maxw-prose); }

/* --- 13. PRINT -------------------------------------------------------- */

@media print {
  .t3-header, .t3-breadcrumb, .t3-footer, .t3-toast-region,
  .t3-skip, .t3-no-print { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .t3-card, .t3-panel { break-inside: avoid; box-shadow: none; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
}

/* --- 14. SCRIPTURE ----------------------------------------------------
   Scripture is set apart from commentary everywhere it appears, so a
   reader can always tell where the text ends and our words begin.
   Serif face, its own field, a gold rule, and the reference attached.
   Italics inside a quotation mark words the NKJV translators supplied
   rather than emphasis, which is why they are not bolded or colored.
   -------------------------------------------------------------------- */

.t3-scripture {
  margin: var(--t3-sp-5) 0;
  padding: var(--t3-sp-5) var(--t3-sp-5) var(--t3-sp-4);
  background: var(--t3-light-teal);
  border-left: 4px solid var(--t3-gold);
  border-radius: 0 var(--t3-radius) var(--t3-radius) 0;
}

.t3-scripture p,
.t3-scripture blockquote {
  margin: 0 0 var(--t3-sp-3);
  font-family: var(--t3-font-serif);
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--t3-deep-teal);
}
:root[data-theme="dark"] .t3-scripture p,
:root[data-theme="dark"] .t3-scripture blockquote { color: var(--t3-text); }

/* Poetry keeps the line breaks the NKJV prints. */
.t3-scripture .t3-verse-line { display: block; }

.t3-scripture cite,
.t3-scripture__ref {
  display: block;
  font-family: var(--t3-font-sans);
  font-size: var(--t3-fs-small);
  font-style: normal;
  font-weight: 650;
  letter-spacing: 0.02em;
  color: var(--t3-teal);
}

/* Small capitals where the NKJV prints the divine name. */
.t3-sc {
  font-variant-caps: small-caps;
  text-transform: lowercase;
  letter-spacing: 0.03em;
}

/* A single verse carried inline at the top of a tool. */
.t3-scripture--inline {
  margin: 0 0 var(--t3-sp-5);
  padding: var(--t3-sp-4) var(--t3-sp-5);
}
.t3-scripture--inline p { font-size: 1.02rem; margin-bottom: var(--t3-sp-2); }

/* On a dark or colored hero, the field inverts. */
.t3-scripture--onhero {
  background: rgba(255, 255, 255, 0.55);
  border-left-color: var(--t3-gold);
}
:root[data-theme="dark"] .t3-scripture--onhero { background: rgba(255, 255, 255, 0.06); }

.t3-scripture-note {
  font-size: var(--t3-fs-small);
  color: var(--t3-text-muted);
}
