/* Totemphonia v2 · ENVO. Kilian: the app's screen, dark as the app is, live with silent simulated rooms; condensed
   text, privacy and support complete (Apple links to #privacy and #support: keep those ids). Instrument sizes are the
   app's points relative to a 393 pt screen (1 pt = 0.2545cqi), so it scales as one object. Typeface: Heming (app). */
@font-face { font-family: 'Heming'; src: url('/assets/fonts/HemingVariable.ttf') format('truetype'); font-weight: 300 700; font-style: normal; font-display: swap; }

.ev { --cols: repeat(12, minmax(0, 1fr)); --hdr: 4.25rem; --e-h: clamp(1.9rem, 1.2rem + 2.3vw, 3.25rem); }
.ev section { padding: 0 var(--gutter); }
.e-num { font-size: var(--t-ui); font-weight: 500; color: var(--muted); }
.e-h { font-family: var(--f-voice); font-weight: 300; font-size: var(--e-h); line-height: 1.05; letter-spacing: -0.02em; margin: 0.9rem 0 0 -0.04em; text-wrap: balance; }
.e-h3 { font-family: var(--f-voice); font-weight: 400; font-size: clamp(1.3rem, 1.1rem + 0.6vw, 1.7rem); line-height: 1.2; margin: 0.6rem 0 0.9rem; text-wrap: balance; }
.e-link { display: inline-flex; gap: 0.45rem; font-weight: 500; padding: 0.35rem 0; background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 100% 1px; transition: background-size 0.6s var(--settle); }
.e-link::after { content: '↗'; transition: translate 0.5s var(--settle); }
.e-link:focus-visible { background-size: 0% 1px; background-position: 100% 100%; }
@media (hover: hover) { .e-link:hover { background-size: 0% 1px; background-position: 100% 100%; } }
.e-link:focus-visible::after { translate: 0.18rem -0.18rem; }
@media (hover: hover) { .e-link:hover::after { translate: 0.18rem -0.18rem; } }
.e-links { display: flex; flex-wrap: wrap; gap: 0.6rem 2rem; margin-top: 2rem; }
.e-inline { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; transition: text-decoration-color 0.3s; }
.e-inline:focus-visible { text-decoration-color: transparent; }
@media (hover: hover) { .e-inline:hover { text-decoration-color: transparent; } }

/* ---------- Screen 1 ---------- */
.e-hero {
  min-height: 100svh; display: grid; grid-template-columns: var(--cols); gap: 2.5rem var(--gutter); align-items: center;
  padding-top: var(--hdr) !important; padding-bottom: clamp(1.5rem, 4svh, 2.5rem) !important;
}
.e-hero__text { grid-column: 1 / span 6; }
.e-icon { display: block; width: clamp(3.5rem, 2.8rem + 1.4vw, 4.5rem); height: auto; aspect-ratio: 1; border-radius: 22.37%; margin: 0 0 clamp(1.5rem, 1rem + 1.4vw, 2.25rem); } /* the app's own icon, as on the home screen */
.e-title { font-family: 'Heming', var(--f-data); font-weight: 300; font-size: clamp(3.4rem, 1.6rem + 6vw, 7.5rem); line-height: 0.9; letter-spacing: 0.32em; }
.e-claim { margin-top: 1.1rem; font-family: var(--f-voice); font-weight: 300; font-size: clamp(1.9rem, 0.9rem + 2.8vw, 3.6rem); line-height: 1.04; letter-spacing: -0.02em; margin-left: -0.04em; }
.e-lede { margin-top: 1.6rem; max-width: 40ch; font-size: clamp(1.05rem, 0.98rem + 0.25vw, 1.2rem); line-height: 1.55; }
.e-hero__live { grid-column: 8 / -1; justify-self: end; width: min(100%, 24.5rem, calc((100svh - var(--hdr) - 12rem) * 0.57)); /* device + rooms fit under the header */ container-type: inline-size; } /* the instrument's cqi measure this width */

/* ---------- the app's screen ---------- */
.envo {
  background: #000; color: #fff; font-family: 'Heming', var(--f-data); font-weight: 300;
  padding: 7.6cqi 6.1cqi 3cqi; display: grid; gap: 5.2cqi;
}
.envo button { font-family: inherit; font-weight: inherit; color: inherit; }
.envo__top { display: flex; justify-content: space-between; align-items: center; }
.envo__name { font-size: 7.13cqi; letter-spacing: 0.32em; }
.envo__chip { font-size: 2.29cqi; letter-spacing: 0.22em; color: #8e8e93; border: 1px solid rgba(255, 255, 255, 0.3); padding: 1.3cqi 2.6cqi; transition: color 0.3s, border-color 0.3s; }
a.envo__chip { font-size: 2.8cqi; }
a.envo__chip:focus-visible { color: #fff; border-color: #fff; }
@media (hover: hover) { a.envo__chip:hover { color: #fff; border-color: #fff; } }
.envo__chip--dim { color: #8e8e93; border-color: rgba(255, 255, 255, 0.22); } /* the app's dim grey, lifted to AA on black */
.envo__status { display: flex; justify-content: center; gap: 2.55cqi; }
.envo__state { display: inline-flex; align-items: center; gap: 2cqi; font-size: 2.8cqi; letter-spacing: 0.22em; color: #8e8e93; border: 1px solid rgba(255, 255, 255, 0.3); padding: 1.3cqi 3cqi; }
.envo__state::before { content: ''; width: 2.04cqi; height: 2.04cqi; border-radius: 50%; background: rgba(142, 142, 147, 0.4); }
.envo.is-active .envo__state { color: #fff; border-color: #fff; }
.envo.is-active .envo__state::before { background: #fff; animation: envo-dot 0.8s ease-in-out infinite alternate; }
@keyframes envo-dot { to { opacity: 0.25; } }
.envo__viz { display: block; width: 100%; height: 43cqi; }
.envo__read { display: grid; grid-template-columns: repeat(3, 1fr); align-items: center; text-align: center; }
.envo__read > div { display: grid; gap: 1cqi; }
.envo__read > div + div { border-left: 1px solid rgba(255, 255, 255, 0.15); }
.envo__read small { font-size: 2.29cqi; letter-spacing: 0.5em; margin-right: -0.5em; color: #8e8e93; }
.envo__read p { display: flex; justify-content: center; align-items: baseline; gap: 1cqi; }
.envo__read b { font-weight: 300; font-size: 9.67cqi; letter-spacing: 0.04em; font-variant-numeric: tabular-nums; line-height: 1; }
.envo__read i { font-style: normal; font-size: 3.05cqi; color: #8e8e93; }
[data-adj][data-sign="down"] { color: #8e8e93; }
[data-adj][data-sign="zero"] { color: rgba(255, 255, 255, 0.5); }
.envo__row { display: grid; grid-template-columns: 1fr 30%; gap: 3cqi; }
.envo__l { display: block; font-size: 2.29cqi; letter-spacing: 0.3em; color: #8e8e93; margin-bottom: 1.6cqi; }
.envo__seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; height: 11.2cqi; border: 1px solid rgba(255, 255, 255, 0.2); }
.envo__seg button { font-size: 3.31cqi; letter-spacing: 0.2em; transition: background-color 0.2s, color 0.2s; }
.envo__seg button + button { border-left: 1px solid rgba(255, 255, 255, 0.2); }
.envo__seg [data-dir] { font-size: 4.58cqi; letter-spacing: 0; }
.envo__seg button[aria-checked="true"], .envo__seg button[aria-pressed="true"] { background: #fff; color: #000; }
.envo__seg [data-dir][aria-pressed="false"] { color: rgba(255, 255, 255, 0.3); }
@media (hover: hover) { .envo__seg button:hover:not([aria-checked="true"]):not([aria-pressed="true"]) { background: rgba(255, 255, 255, 0.12); } }
.envo__go { height: 14.2cqi; border: 1.5px solid #fff; font-size: 4.58cqi; letter-spacing: 0.5em; padding-left: 0.5em; background: #fff; color: #000 !important; transition: background-color 0.25s, color 0.25s; }
.envo.is-active .envo__go { background: #000; color: #fff !important; }
@media (hover: hover) { .envo.is-active .envo__go:hover { background: rgba(255, 255, 255, 0.1); } }
.envo :focus-visible { outline: 1.5px solid #fff; outline-offset: 3px; }
.envo__foot { text-align: center; font-size: 2.04cqi; letter-spacing: 0.5em; color: #8e8e93; }

/* the rooms, on paper under the device */
.e-rooms { margin-top: 1.2rem; display: grid; gap: 0.5rem; }
.e-rooms__l { font-size: var(--t-ui); color: var(--muted); }
.e-rooms__list { display: flex; flex-wrap: wrap; gap: 0.3rem 1.4rem; }
.e-rooms__list button { font-size: 0.95rem; padding: 0.25rem 0; color: var(--muted); background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 0% 1px; transition: color 0.3s, background-size 0.5s var(--settle); }
.e-rooms__list button[aria-checked="true"] { color: var(--ink); background-size: 100% 1px; }
.e-rooms__list button:focus-visible { color: var(--ink); }
@media (hover: hover) { .e-rooms__list button:hover { color: var(--ink); } }
.e-rooms__note { font-size: var(--t-ui); color: var(--muted); max-width: 44ch; }

/* ---------- Sections: heading left, text right ---------- */
.e-sec { display: grid; grid-template-columns: var(--cols); gap: 1.4rem var(--gutter); margin-top: clamp(6.5rem, 20svh, 12rem); scroll-margin-top: calc(var(--hdr) + 1.5rem); }
.e-sec__head { grid-column: 1 / span 5; }
.e-sec__body { grid-column: 7 / -1; max-width: 46rem; display: grid; gap: 1.1rem; align-content: start; }
.e-sec__body p { line-height: 1.6; max-width: 62ch; }
.e-sec__body b { font-weight: 600; }
.e-sec__body code { font-family: var(--f-data); font-size: 0.86em; }
.e-sec--full { grid-template-rows: auto 1fr; }
.e-sec--full .e-sec__body { grid-row: 1 / span 2; }
.e-aside { grid-column: 1 / span 4; grid-row: 2; align-self: start; display: grid; gap: 0.5rem; font-size: var(--t-ui); color: var(--muted); line-height: 1.5; padding-top: 1rem; border-top: 1px solid var(--line); }
.e-aside b { color: var(--ink); font-weight: 600; }
.e-proof { display: grid; gap: 0.9rem; padding-bottom: 1.6rem; margin-bottom: 0.6rem; border-bottom: 1px solid var(--line); }
.e-table { border-collapse: collapse; font-size: var(--t-ui); margin-top: 0.4rem; max-width: 30rem; }
.e-table th { text-align: left; font-weight: 500; color: var(--muted); padding: 0 1.6rem 0.5rem 0; }
.e-table td { padding: 0.55rem 1.6rem 0.55rem 0; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.e-safe { display: grid; grid-template-columns: 1fr 1fr; gap: 0.55rem 2rem; font-size: 0.94rem; line-height: 1.45; margin-bottom: 0.6rem; }
.e-safe li { display: grid; grid-template-columns: 2rem 1fr; }
.e-safe span { font-family: var(--f-data); font-size: var(--t-data); color: var(--muted); padding-top: 0.2em; }
.e-controls { display: grid; gap: 0.6rem; margin-bottom: 0.6rem; }
.e-controls div { display: grid; grid-template-columns: 9.5rem 1fr; gap: 1rem; padding-top: 0.6rem; border-top: 1px solid var(--line); }
.e-controls dt { font-family: 'Heming', var(--f-data); font-size: 0.8rem; letter-spacing: 0.2em; padding-top: 0.15em; }
.e-controls dd { font-size: 0.94rem; line-height: 1.5; }

.e-end { margin: clamp(8rem, 24svh, 14rem) 0 clamp(4rem, 12svh, 8rem); }
.e-end__h { font-family: var(--f-voice); font-weight: 300; font-size: var(--t-statement); line-height: 1.02; letter-spacing: -0.025em; margin-left: -0.04em; max-width: 17ch; text-wrap: balance; }

/* ---------- Tablet / phone ---------- */
@media (max-width: 1000px) {
  .e-hero__text, .e-hero__live { grid-column: 1 / -1; justify-self: start; }
  .e-hero__live { width: min(100%, 24.5rem); }
  .e-sec__head, .e-sec__body, .e-aside, .e-sec--full .e-sec__body { grid-column: 1 / -1; grid-row: auto; }
}
@media (max-width: 640px) {
  .e-safe { grid-template-columns: 1fr; }
  .e-controls div { grid-template-columns: 1fr; gap: 0.2rem; }
}
@media (prefers-reduced-motion: reduce) {
  .envo.is-active .envo__state::before { animation: none; }
}
