/* ONE HOUSE v1, portal layer. Values from the shared spec in "Paste into Course Build". */
:root{
  --paper:#FBFBF8; --ink:#1E1E1E; --ink-2:#4A4F4D; --sage:#EEF1EC; --rule:rgba(30,30,30,.14); --edge:rgba(30,30,30,.45);
  --accent:#8BB4FA; --mint:#BCF0DB; --night:#12161B; --grad:linear-gradient(90deg,#BCF0DB,#8BB4FA);
  --serif:Newsreader,Georgia,serif; --sans:'Hanken Grotesk',-apple-system,'Segoe UI',Roboto,sans-serif;
  --ease:cubic-bezier(.22,.61,.36,1); --ease-settle:cubic-bezier(.16,.84,.24,1); --ring:var(--ink);
}
html[data-mode="tv"]{ --ring:#EFEEEA; }
html{ background:var(--paper); }
html[data-mode="tv"]{ background:var(--night); }
body{ font-family:var(--sans); -webkit-font-smoothing:antialiased; }
em{ font-weight:inherit; } /* the site sets its italic line light, the same weight as the roman: measured Nov 29 */
*,*::before,*::after{ border-radius:0 !important; }
button,a,[role="button"]{ -webkit-tap-highlight-color:transparent; touch-action:manipulation; }
:focus-visible{ outline:2px solid var(--ring) !important; outline-offset:3px; }
input,textarea,select{ font-size:max(16px,1em); }
/* Phone screens settle like the site: 420ms rise, 60ms steps */
x-dc > div > *{ animation-duration:.42s !important; animation-timing-function:var(--ease-settle) !important; }
x-dc > div > *:nth-child(2){ animation-delay:.06s !important; }
x-dc > div > *:nth-child(3){ animation-delay:.12s !important; }
x-dc > div > *:nth-child(n+4){ animation-delay:.18s !important; }
html[data-mode="tv"] x-dc > div > *{ animation:none !important; }
/* Phones: respect the notch and the home bar */
x-dc > div[style*="max-width:480px"]{ padding-top:max(48px,env(safe-area-inset-top)) !important; padding-bottom:max(36px,env(safe-area-inset-bottom)) !important; }
/* TV stage scales to any screen */
html[data-mode="tv"],html[data-mode="tv"] body{ height:100%; overflow:hidden; margin:0; }
html[data-mode="tv"] x-dc{ display:block; position:fixed; inset:0; }
html[data-mode="tv"] x-dc > div{ position:absolute !important; left:50% !important; top:50% !important; transform:translate(-50%,-50%) scale(var(--tv-s,1)); transform-origin:center; }
/* TV host controls: hidden from the room, shown when the mouse moves */
[data-tv-controls],[style*="--tvc:1"]{ opacity:0; transition:opacity .32s var(--ease); }
html.tv-pointer [data-tv-controls],html.tv-pointer [style*="--tvc:1"],[style*="--tvc:1"]:focus-within{ opacity:1; }
html[data-mode="tv"]:not(.tv-pointer){ cursor:none; }
html.tv-blank x-dc > div > *{ opacity:0 !important; transition:opacity .32s var(--ease); }
@media (prefers-reduced-motion:reduce){
  x-dc > div > *{ animation:efPage .2s linear both !important; }
  [data-wash],[data-wash2]{ display:none !important; }
}
/* Main button: no arrow; the gradient bar draws in on press, like the site */
x-dc a[data-cta],x-dc button[data-cta]{ position:relative; overflow:hidden; transition:transform .12s var(--ease); }
x-dc a[data-cta]::after,x-dc button[data-cta]::after{ content:"" !important; margin:0 !important; position:absolute; left:0; right:0; bottom:0; height:3px; background:var(--grad); transform:scaleX(0); transform-origin:left; transition:transform .4s var(--ease); }
x-dc a[data-cta]:active,x-dc button[data-cta]:active{ transform:scale(.985); }
x-dc a[data-cta]:active::after,x-dc button[data-cta]:active::after{ transform:scaleX(1); }
@media (hover:hover){ x-dc a[data-cta]:hover::after,x-dc button[data-cta]:hover::after{ transform:scaleX(1); } }
/* Phone card on wide screens: a hairline, never a shadow */
@media (min-width:600px){ x-dc > div[style*="max-width:480px"]{ outline:1px solid rgba(30,30,30,.14); } }

/* Church panel on a phone (Nov 29 review): rows stack, nothing scrolls sideways */
@media (max-width:640px){
  x-dc [style*="max-width:1120px"]{ padding:28px 20px 48px !important; }
  x-dc [style*="justify-content:space-between;align-items:flex-end;gap:32px"]{ flex-wrap:wrap; gap:16px !important; }
  x-dc [style*="grid-template-columns:240px 1fr 110px"]{ grid-template-columns:1fr auto !important; gap:8px 16px !important; }
  x-dc [style*="grid-template-columns:240px 1fr 110px"] > :nth-child(2){ grid-column:1 / -1; order:3; }
  x-dc [style*="grid-template-columns:240px 1fr 110px"] > :nth-child(2) *{ height:4px; }
  x-dc [style*="grid-template-columns:1fr 320px 48px"]{ grid-template-columns:1fr 48px !important; }
  x-dc [style*="grid-template-columns:1fr 320px 48px"] > :nth-child(2){ grid-column:1 / -1; order:3; }
  x-dc [style*="grid-template-columns:2.2fr 2.4fr 1.3fr .7fr .8fr"]{ grid-template-columns:1fr 1fr !important; row-gap:6px !important; }
  x-dc [style*="grid-template-columns:1fr 1fr"]{ grid-template-columns:1fr !important; }
  x-dc nav, x-dc [role="tablist"]{ overflow-x:auto; -webkit-overflow-scrolling:touch; }
  x-dc [style*="width:640px"], x-dc [style*="width:760px"], x-dc [style*="width:400px"]{ max-width:100% !important; }
}
@media (max-width:640px){ x-dc [style*="min-width:220px;padding:0 24px"]{ width:100%; } }

/* Night 6: "In our house, we…" builds line by line (moment 4) */
[style*="--oh-lines:1"] > div{ animation:efRise .42s cubic-bezier(.16,.84,.24,1) both; }
[style*="--oh-lines:1"] > div:nth-child(1){ animation-delay:.30s } [style*="--oh-lines:1"] > div:nth-child(2){ animation-delay:.75s }
[style*="--oh-lines:1"] > div:nth-child(3){ animation-delay:1.20s } [style*="--oh-lines:1"] > div:nth-child(4){ animation-delay:1.65s }
[style*="--oh-lines:1"] > div:nth-child(5){ animation-delay:2.10s } [style*="--oh-lines:1"] > div:nth-child(6){ animation-delay:2.55s }
@keyframes efInk{ 0%{ color:rgba(30,30,30,.2) } 30%{ color:#9AD9C0 } 62%{ color:#8BB4FA } 100%{ color:#1E1E1E } }
@keyframes efInkTV{ 0%{ color:rgba(239,238,234,.16) } 30%{ color:#9AD9C0 } 62%{ color:#8BB4FA } 100%{ color:#EFEEEA } }

/* Ink reveal lives in onehouse-motion.js (word by word) */

/* App feel: pages cross fade instead of blinking (supported browsers) */
@view-transition{ navigation:auto; }

/* Nov 30 UX pass */
/* the bottom action area sits on paper, with a soft fade above it, so nothing shows through */
x-dc [style*="position:sticky;bottom:0"]{ background:#FBFBF8 !important; padding-bottom:max(16px, env(safe-area-inset-bottom)) !important; }
x-dc [style*="position:sticky;bottom:0"]::before{ content:""; position:absolute; left:0; right:0; top:-28px; height:28px; background:linear-gradient(to top,#FBFBF8,rgba(251,251,248,0)); pointer-events:none; }
/* Back and other small text controls get a full size tap area without changing how they look */
x-dc button[data-plain], x-dc a[data-plain]{ min-height:44px; min-width:44px; display:inline-flex; align-items:center; }
/* church panel pop ups fit any screen */
x-dc [data-modal] > div{ width:min(480px,92vw) !important; box-sizing:border-box; }
x-dc [data-modal] > div > div[style*="display:flex"]{ flex-wrap:wrap; justify-content:center; width:100%; }
x-dc [data-modal] button{ min-width:0 !important; flex:1 1 160px; }
/* guard line under the main button */
x-dc [data-guard]{ animation:efRise .2s ease both; }
