/* ivory.css — the Ivory makeover's house layer, laid into every app's own front end (23 Nov 2026).
 * Ammanuel's words, 23 Nov 2026: "these apps all look different" · "I'll have to go through these apps by hand".
 * The shell (kit/wardrobe/ivory-shell.js) changes colour, type, radius and shadow at run time; this layer is the app's own
 * stylesheet and also sets layout rhythm: measure, spacing, hairline rules, the serif scale, the plates and the designed states.
 * It never hides anything an app draws: no display:none, visibility, zero size, clipping or opacity-zero on an app's element
 * (bin/ivory-makeover-proof refuses them). Written for Chromium 87 (Qt 5.15): no :has, no :is, no aspect-ratio.
 * The per-app colour map is app.css beside this file, generated from the app's own compiled stylesheet. */
:root{
  --iv-ground:#F3EFE6; --iv-sheet:#FAF8F3; --iv-ink:#0C1E16; --iv-ink-soft:#334A3F; --iv-quiet:#5C7065;
  --iv-rule:#E1E7E2; --iv-gold:#C5A059; --iv-gold-d:#9A7A3A; --iv-tint:#EFE9DC;
  --iv-curve:cubic-bezier(.165,.84,.44,1); --iv-fast:200ms; --iv-mid:400ms; --iv-slow:700ms;
  --iv-serif:var(--look-display,"Cormorant Garamond"),"Cormorant",Georgia,serif;
  --iv-sans:"Manrope",system-ui,sans-serif;
  --shadow-sheet:0 1px 0 rgba(12,30,22,.04),0 18px 40px -28px rgba(12,30,22,.28);
  --shadow-plate:0 18px 40px -26px rgba(12,30,22,.34);
  color-scheme:light;
}
html,body{background-color:var(--iv-ground);color:var(--iv-ink)}
body{font-family:var(--look-body,"Cormorant Garamond"),"Cormorant",Georgia,serif;font-size:18px;line-height:1.55;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
::selection{background:var(--iv-tint);color:var(--iv-ink)}

/* the serif scale: light titles that rise once as they arrive */
h1{font-family:var(--iv-serif);font-weight:300;font-size:clamp(2.1rem,4.2vw,3.6rem);line-height:1.08;letter-spacing:-.005em;color:var(--iv-ink)}
h2{font-family:var(--iv-serif);font-weight:400;font-size:clamp(1.6rem,2.8vw,2.4rem);line-height:1.15;color:var(--iv-ink)}
h3{font-family:var(--iv-serif);font-weight:500;font-size:clamp(1.25rem,1.9vw,1.6rem);line-height:1.25;color:var(--iv-ink)}
h4,h5,h6{font-family:var(--iv-serif);font-weight:500;color:var(--iv-ink)}
h1,h2{animation:iv-rise var(--iv-slow) var(--iv-curve) both}
p{color:var(--iv-ink-soft)}
blockquote{border-left:1px solid var(--iv-gold);padding-left:1.1em;font-style:italic}
a{color:var(--iv-ink);text-decoration-color:var(--iv-gold);text-underline-offset:.2em}
hr{border:0;border-top:1px solid var(--iv-rule)}

/* furniture: Manrope, upper case, tracked */
button,[role=button],[role=tab],label,th,nav a,small,.badge,[class*="badge"]{font-family:var(--iv-sans);letter-spacing:.04em}
button,[role=button]{border-radius:0;transition:background-color var(--iv-fast) var(--iv-curve),color var(--iv-fast) var(--iv-curve),border-color var(--iv-fast) var(--iv-curve)}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,[role=button]:focus-visible{outline:1px solid var(--iv-gold-d);outline-offset:3px}

/* fields: an ivory sheet with a hairline, the gold mark on focus */
input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea{background-color:var(--iv-sheet);border:1px solid var(--iv-rule);border-radius:0;color:var(--iv-ink)}
input:focus,select:focus,textarea:focus{border-color:var(--iv-gold-d);box-shadow:none}
input::placeholder,textarea::placeholder{color:var(--iv-quiet);font-style:italic}
input[type=checkbox],input[type=radio],input[type=range]{accent-color:var(--iv-ink)}

/* surfaces: radius zero, hairline rules, shadow only as distance */
[class*="rounded"]{border-radius:0}
[class*="shadow"]{box-shadow:var(--shadow-sheet)}
[class*="shadow-sm"],[class*="shadow-xs"]{box-shadow:none}
.card,[class*="card"],[class*="Card"],[data-card]{border-color:var(--iv-rule);border-radius:0}
table{border-collapse:collapse}
th{font-size:.72rem;text-transform:uppercase;letter-spacing:.14em;color:var(--iv-quiet);font-weight:600;border-bottom:1px solid var(--iv-rule)}
td{border-bottom:1px solid var(--iv-rule)}
header,nav[class*="fixed"],nav[class*="sticky"],[class*="sticky"][class*="top-0"]{background-color:rgba(243,239,230,.92);border-bottom:1px solid var(--iv-rule);box-shadow:none}

/* generous rhythm in the app's own sections */
main{padding-bottom:3rem}
section{scroll-margin-top:80px}

/* the plate in the app's hero: tagged by states.js (data-ivory-hero) on the first large opening band */
[data-ivory-hero]{position:relative;isolation:isolate;background-image:none}
[data-ivory-hero]::before{content:"";position:absolute;top:0;right:0;bottom:0;left:0;z-index:-1;pointer-events:none;
  background:linear-gradient(90deg,rgba(243,239,230,1) 0%,rgba(243,239,230,.94) 48%,rgba(243,239,230,.18) 100%),var(--ivory-plate) right top/auto 100% no-repeat,var(--iv-ground);
  animation:iv-drift 26s ease-in-out infinite alternate;transform-origin:70% 30%}

/* the empty state: a plate above the app's own words for an empty list (data-ivory-empty set by states.js) */
[data-ivory-empty]::before{content:"";display:block;height:160px;margin:0 auto 18px;max-width:420px;box-shadow:var(--shadow-plate);
  background:var(--ivory-plate) center top/auto 100% no-repeat;animation:iv-drift 24s ease-in-out infinite alternate}

/* the house's own furniture: loading, offline and resting states (own elements only, never an app's) */
.ivory-boot{min-height:100vh;display:flex;align-items:center;justify-content:center;background:var(--iv-ground);position:relative;overflow:hidden}
.ivory-boot-plate{position:absolute;top:0;right:0;bottom:0;width:46%;background:var(--ivory-plate) 50% 0%/cover no-repeat;animation:iv-drift 26s ease-in-out infinite alternate}
.ivory-boot-plate::after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;background:linear-gradient(90deg,var(--iv-ground) 0%,rgba(243,239,230,.2) 60%)}
.ivory-boot-words{position:relative;max-width:520px;padding:0 8vw 0 0;margin-right:30%}
.ivory-kicker{font-family:var(--iv-sans);font-size:.7rem;letter-spacing:.22em;text-transform:uppercase;color:var(--iv-quiet);display:flex;align-items:center;gap:12px}
.ivory-kicker::before{content:"";width:28px;height:1px;background:var(--iv-gold)}
.ivory-boot h1{margin:.4em 0 .3em}
.ivory-boot p{font-style:italic;font-size:1.2rem;color:var(--iv-ink-soft)}
.ivory-breath{display:block;width:42px;height:1px;background:var(--iv-gold);margin-top:22px;animation:iv-breath 10s ease-in-out infinite;transform-origin:left}
.ivory-note{position:fixed;left:50%;bottom:22px;z-index:2147483000;max-width:min(560px,calc(100vw - 32px));transform:translateX(-50%);
  background:var(--iv-sheet);color:var(--iv-ink);border:1px solid var(--iv-rule);border-top:1px solid var(--iv-gold);padding:14px 20px;
  font-family:var(--iv-serif);font-size:1.05rem;font-style:italic;box-shadow:var(--shadow-plate);animation:iv-rise var(--iv-mid) var(--iv-curve) both}
.ivory-note b{font-family:var(--iv-sans);font-style:normal;font-weight:600;font-size:.66rem;letter-spacing:.2em;text-transform:uppercase;color:var(--iv-quiet);display:block;margin-bottom:4px}
@media (max-width:720px){.ivory-boot-plate{width:100%;opacity:.28}.ivory-boot-words{margin:0;padding:0 24px}}

@keyframes iv-rise{from{transform:translateY(14px);opacity:.01}to{transform:none;opacity:1}}
@keyframes iv-drift{from{transform:scale(1.02) translate3d(0,0,0)}to{transform:scale(1.09) translate3d(-1.5%,-1%,0)}}
@keyframes iv-breath{0%,100%{transform:scaleX(.45)}50%{transform:scaleX(1)}}
@media (prefers-reduced-motion:reduce){
  h1,h2,.ivory-note{animation:none}
  [data-ivory-hero]::before,[data-ivory-empty]::before,.ivory-boot-plate,.ivory-breath{animation:none}
}

/* a typed line is a voice: serif, over the shell's furniture rule */
html body textarea{font-family:var(--iv-serif) !important;font-size:1.08em}

/* words on an ink ground (data-ivory-on-ink, set by states.js where dark words met a dark ground) */
[data-ivory-on-ink],[data-ivory-on-ink] *{color:var(--iv-sheet) !important}
