/* Shared home-page details; each project keeps its own palette and typography. */
[data-home-page] {
  --hn-accent: var(--link); --hn-rgb: var(--magic-rgb); --hn-panel: var(--panel);
  --hn-line: var(--border); --hn-soft: var(--chip); --hn-text: var(--text); --hn-muted: var(--muted);
}
[data-home-page="theonelia"] {
  --hn-accent: var(--gold); --hn-rgb: 202,153,37; --hn-panel: var(--surface-solid);
  --hn-line: var(--line); --hn-soft: var(--surface); --hn-text: var(--text); --hn-muted: var(--muted);
}
[data-home-page] :is(button,a,input,textarea):focus-visible { outline: 2px solid var(--hn-accent); outline-offset: 4px; }
[data-home-page="theonelia"] .brand-emblem { animation: home-emblem-float 9s ease-in-out infinite; }
[data-home-page="theonelia"] .orbit-label { backdrop-filter: blur(12px); }
[data-home-page="theonelia"] .intro-strip-inner { border: 1px solid var(--line); }
[data-home-page="theonelia"] :is(.principle-card,.trinex-card,.community-panel) { transition: border-color .25s, box-shadow .25s; }
[data-home-page="theonelia"] .principle-number { font-variant-numeric: tabular-nums; }
[data-home-page="trinex"] > header { background: color-mix(in srgb, var(--bg) 88%, transparent); border-bottom: 1px solid var(--border); backdrop-filter: blur(18px); }
[data-home-page="trinex"] .hero { border-bottom-color: rgba(var(--magic-2-rgb),.2); }
[data-home-page="trinex"] main > .grid { align-items: start; gap: 22px; }
[data-home-page="trinex"] main .card { border-radius: 22px; background: linear-gradient(150deg,rgba(var(--magic-rgb),.035),transparent 48%),var(--panel); box-shadow: 0 14px 45px rgba(0,0,0,.1); }
[data-home-page="trinex"] #newsCard { padding: 4px 0 18px; border: 0; box-shadow: none; background: transparent; overflow: visible; }
[data-home-page="trinex"] #newsCard::before { display: none; }
[data-home-page="trinex"] .news-head { margin-bottom: 16px; }
[data-home-page="trinex"] .material-card { border-radius: 16px; transition: transform .2s, border-color .2s, box-shadow .2s; }
[data-home-page="trinex"] .channel-card { transition: border-color .25s, box-shadow .25s; }
@media (hover:hover) {
  [data-home-page="theonelia"] .principle-card:hover { border-color: var(--line-strong); box-shadow: 0 12px 32px rgba(153,111,15,.08); }
  [data-home-page="trinex"] .channel-card:hover { border-color: var(--channel); box-shadow: 0 8px 24px rgba(0,0,0,.1); }
  [data-home-page="trinex"] .material-card:hover { transform: translateY(-3px); box-shadow: 0 12px 24px rgba(var(--magic-rgb),.12); }
}
.home-enter { animation: home-rise .65s cubic-bezier(.2,.75,.25,1) both; }
@keyframes home-rise { from { opacity:.35; transform:translateY(12px); } to { opacity:1; transform:translateY(0); } }
@keyframes home-emblem-float { 0%,100% { transform:translateY(0) rotate(-4deg); } 50% { transform:translateY(-9px) rotate(-2deg); } }
.hn-status { color: var(--hn-muted); font-size: 13px; line-height: 1.6; margin: 10px 0; }
.hn-status:empty,.tm-message:empty { display:none; }
.hn-feed { display:grid; gap:14px; }
[data-home-page="theonelia"] .hn-feed { grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; }
.hn-card { display:flex; flex-direction:column; position:relative; min-width:0; padding:22px; border:1px solid var(--hn-line); border-radius:18px; background:linear-gradient(135deg,rgba(var(--hn-rgb),.065),transparent 70%),var(--hn-panel); transition:border-color .2s,box-shadow .2s; }
.hn-card:hover { border-color:color-mix(in srgb,var(--hn-accent) 45%,var(--hn-line)); }
.hn-meta { display:flex; align-items:center; flex-wrap:wrap; gap:10px; margin-bottom:14px; color:var(--hn-muted); font:500 12px/1.5 system-ui,sans-serif; }
.hn-tag { padding:3px 9px; border:1px solid rgba(var(--hn-rgb),.22); border-radius:99px; color:var(--hn-accent); background:rgba(var(--hn-rgb),.065); }
.hn-draft { color:var(--hn-muted); border:1px dashed var(--hn-line); border-radius:6px; padding:2px 7px; }
.hn-title { margin:0 0 10px; color:var(--hn-text); font-size:18px; line-height:1.35; overflow-wrap:anywhere; }
[data-home-page="theonelia"] .hn-title { font-family:var(--font-display); font-size:clamp(24px,2.2vw,31px); font-weight:500; }
.hn-body { margin:0; color:var(--hn-muted); font-size:14px; line-height:1.7; white-space:pre-line; overflow-wrap:anywhere; }
.hn-image { display:block; width:100%; max-height:260px; object-fit:cover; border-radius:10px; margin-bottom:16px; }
.hn-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:auto; padding-top:18px; }
.hn-button { display:inline-flex; align-items:center; justify-content:center; gap:7px; padding:9px 15px; min-height:40px; box-sizing:border-box; border:1px solid var(--hn-line); border-radius:99px; background:var(--hn-soft); color:var(--hn-text); font:650 13px/1.4 system-ui,sans-serif; text-decoration:none; cursor:pointer; transition:background .2s,border-color .2s,transform .2s; }
.hn-button:hover { border-color:var(--hn-accent); background:rgba(var(--hn-rgb),.1); }
.hn-button:active { transform:translateY(1px); }
.hn-button:disabled { opacity:.55; cursor:wait; }
.hn-text-button { color:var(--hn-accent); background:transparent; border-color:transparent; padding-left:4px; padding-right:8px; }
.hn-primary { border-color:rgba(var(--hn-rgb),.5); background:rgba(var(--hn-rgb),.13); color:var(--hn-accent); }
.hn-toolbar { display:flex; align-items:center; flex-wrap:wrap; gap:10px; margin-top:18px; }
.hn-empty { color:var(--hn-muted); padding:20px; border:1px dashed var(--hn-line); border-radius:16px; }
.home-dialog-open { overflow:hidden; }
.home-dialog { width:min(740px,calc(100vw - 32px)); max-height:calc(100dvh - 40px); box-sizing:border-box; padding:0; color:var(--hn-text); border:1px solid var(--hn-line); border-radius:24px; background:var(--hn-panel); box-shadow:0 30px 100px rgba(0,0,0,.45); overflow:auto; overscroll-behavior:contain; }
.home-dialog::backdrop { background:rgba(3,5,12,.72); backdrop-filter:blur(7px); }
.home-dialog[open] { animation:home-rise .2s ease-out; }
.hn-dialog-head { position:sticky; top:0; z-index:3; display:flex; align-items:center; justify-content:space-between; gap:16px; padding:19px 24px; border-bottom:1px solid var(--hn-line); background:var(--hn-panel); }
.hn-dialog-head h2 { margin:0; font-size:23px; line-height:1.3; font-family:inherit; }
.hn-close { display:grid; place-items:center; flex:none; width:40px; height:40px; padding:0; border:1px solid var(--hn-line); border-radius:50%; background:var(--hn-soft); color:var(--hn-text); cursor:pointer; font:25px/1 system-ui,sans-serif; }
.hn-dialog-body { padding:24px; }
.hn-archive { display:grid; gap:14px; margin-top:14px; }
.hn-card-full .hn-body { color:var(--hn-text); font-size:16px; }
.hn-form { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.hn-field { display:grid; gap:7px; min-width:0; font:650 13px/1.5 system-ui,sans-serif; }
.hn-field-title,.hn-field-body,.hn-field-link,.hn-field-image,.hn-form > :is(.hn-hint,.hn-actions,.hn-preview,.hn-status) { grid-column:1/-1; }
.hn-field :is(input,textarea) { box-sizing:border-box; width:100%; min-width:0; min-height:44px; border:1px solid var(--hn-line); border-radius:10px; padding:10px 12px; color:var(--hn-text); background:var(--hn-soft); font:400 15px/1.6 system-ui,sans-serif; }
.hn-field textarea { resize:vertical; }
.hn-hint { margin:0; color:var(--hn-muted); font-size:12px; line-height:1.6; }
.hn-preview[hidden] { display:none; }
.hn-preview { min-width:0; }
.hn-form .hn-actions { margin:0; padding-top:4px; }
.hn-options { grid-column:1/-1; padding:12px 14px; border:1px solid var(--hn-line); border-radius:12px; }
.hn-options summary { color:var(--hn-muted); font-size:13px; cursor:pointer; }
.hn-options .hn-field,.hn-options .hn-hint { margin-top:14px; }
.trinex-music-wrap { position:relative; z-index:2; padding-top:24px; padding-bottom:0; }
.trinex-music { position:relative; padding:22px 26px 16px; border:1px solid rgba(var(--magic-rgb),.28); border-radius:22px; background:radial-gradient(ellipse at 5% 0%,rgba(var(--magic-rgb),.13),transparent 65%),var(--panel); box-shadow:0 14px 45px rgba(0,0,0,.12); transition:border-color .4s,box-shadow .4s; }
.trinex-music.is-playing { border-color:rgba(var(--magic-2-rgb),.4); box-shadow:0 12px 42px rgba(var(--magic-rgb),.12); }
.tm-main { display:flex; align-items:center; gap:18px; }
.tm-art { display:grid; place-items:center; flex:none; width:60px; height:60px; border:1px solid rgba(var(--magic-rgb),.3); border-radius:16px; background:linear-gradient(145deg,rgba(var(--magic-rgb),.16),rgba(var(--magic-2-rgb),.04)); }
.tm-bars { display:flex; align-items:center; gap:4px; height:28px; }
.tm-bars i { width:3px; height:12px; border-radius:4px; background:linear-gradient(var(--brand-2),var(--brand)); transform-origin:center; }
.tm-bars i:nth-child(2),.tm-bars i:nth-child(4) { height:21px; }
.tm-bars i:nth-child(3) { height:28px; }
.is-playing .tm-bars i { animation:tm-wave 1.2s ease-in-out infinite alternate; }
.is-playing .tm-bars i:nth-child(2) { animation-delay:-.4s; }
.is-playing .tm-bars i:nth-child(3) { animation-delay:-.8s; }
.is-playing .tm-bars i:nth-child(4) { animation-delay:-.2s; }
.is-playing .tm-bars i:nth-child(5) { animation-delay:-.6s; }
@keyframes tm-wave { from { transform:scaleY(.35); } to { transform:scaleY(1); } }
.tm-info { display:grid; flex:1; gap:3px; min-width:0; }
.tm-kicker { color:var(--link); font-size:10px; letter-spacing:.16em; text-transform:uppercase; font-weight:750; }
.tm-title { font-size:17px; line-height:1.4; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tm-subtitle { font-size:12px; color:var(--muted); }
.tm-controls { display:flex; align-items:center; gap:10px; }
.tm-controls button { display:grid; place-items:center; flex:none; width:40px; height:40px; padding:0; color:var(--text); background:transparent; border:1px solid var(--border); border-radius:50%; cursor:pointer; }
.tm-controls svg { width:19px; height:19px; }
.tm-controls .tm-play { width:48px; height:48px; border-color:rgba(var(--magic-rgb),.5); background:rgba(var(--magic-rgb),.16); color:var(--link); }
.tm-controls button:hover:not(:disabled) { border-color:var(--link); background:rgba(var(--magic-rgb),.18); }
.tm-controls button:disabled { opacity:.35; cursor:default; }
.tm-progress { display:flex; align-items:center; gap:12px; margin-top:18px; color:var(--muted); font-size:11px; font-variant-numeric:tabular-nums; }
.tm-progress input { flex:1; min-width:0; }
.trinex-music input[type="range"] { accent-color:var(--link); height:20px; cursor:pointer; margin:0; }
.trinex-music input:disabled { opacity:.3; cursor:default; }
.tm-bottom { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-top:8px; }
.tm-list-toggle { display:flex; align-items:center; gap:10px; padding:7px 0; border:0; background:transparent; color:var(--link); font-family:inherit; font-size:12px; font-weight:650; line-height:1.5; cursor:pointer; }
.tm-list-toggle:disabled { color:var(--muted); cursor:default; }
.tm-list-toggle [data-count] { color:var(--muted); font-size:10px; padding:1px 6px; border:1px solid var(--border); border-radius:8px; }
.tm-volume { display:flex; align-items:center; gap:12px; color:var(--muted); font-size:11px; }
.tm-volume input { width:86px; }
.tm-playlist { list-style:none; margin:14px 0 0; padding:10px 0 0; border-top:1px solid var(--border); max-height:260px; overflow:auto; }
.tm-playlist[hidden] { display:none; }
.tm-playlist button { display:flex; align-items:baseline; gap:15px; width:100%; text-align:left; padding:11px 12px; border:1px solid transparent; border-radius:10px; background:transparent; color:var(--muted); font:inherit; font-size:13px; cursor:pointer; }
.tm-playlist button:hover,.tm-playlist .is-current { background:rgba(var(--magic-rgb),.09); border-color:rgba(var(--magic-rgb),.2); color:var(--text); }
.tm-playlist button span:last-child { overflow-wrap:anywhere; min-width:0; }
.tm-number { color:var(--link); font-size:11px; font-variant-numeric:tabular-nums; }
.tm-message { color:var(--muted); font-size:12px; margin:12px 0 0; }
.home-effects-paused *, .home-effects-paused *::before,.home-effects-paused *::after { animation-play-state:paused!important; }
@media(max-width:680px) {
  [data-home-page="theonelia"] .hn-feed { grid-template-columns:1fr; }
  .hn-card { padding:18px; }
  .hn-toolbar { gap:8px; }
  .hn-button { min-height:44px; }
  .home-dialog { width:calc(100vw - 20px); max-height:calc(100dvh - 20px); border-radius:18px; }
  .hn-dialog-head { padding:14px 16px; }
  .hn-dialog-head h2 { font-size:20px; }
  .hn-dialog-body { padding:16px; }
  .hn-form { grid-template-columns:1fr; }
  .hn-field { grid-column:1; }
  .trinex-music-wrap { padding-top:16px; }
  .trinex-music { padding:18px 16px 12px; border-radius:18px; }
  .tm-main { flex-wrap:wrap; gap:12px; }
  .tm-art { width:48px; height:48px; border-radius:13px; }
  .tm-info { flex-basis:calc(100% - 70px); }
  .tm-title { font-size:16px; }
  .tm-controls { width:100%; justify-content:center; gap:22px; padding-top:5px; }
  .tm-controls button { width:44px; height:44px; }
  .tm-controls .tm-play { width:50px; height:50px; }
  .tm-volume { gap:6px; }
  .tm-volume input { width:70px; }
  [data-home-page="trinex"] main .card { border-radius:18px; }
}
@media(prefers-reduced-motion:reduce) {
  [data-home-page] *,[data-home-page] *::before,[data-home-page] *::after { animation:none!important; transition:none!important; scroll-behavior:auto!important; }
  .home-enter { opacity:1; transform:none; }
}
/* A quiet music control on the cover; the full player opens in place. */
[data-home-page="trinex"] .hero { overflow:visible; z-index:3; }
.trinex-music[hidden],.trinex-music [hidden] { display:none!important; }
.hero > .trinex-music { position:absolute; top:22px; right:24px; z-index:5; box-sizing:border-box; width:236px; padding:5px 7px 5px 12px; border:1px solid rgba(255,255,255,.1); border-radius:14px; background:rgba(12,15,23,.48); color:#d6dce9; box-shadow:none; backdrop-filter:blur(14px); transition:background .2s,border-color .2s; }
.hero > .trinex-music:hover,.hero > .trinex-music:focus-within { background:rgba(16,19,29,.85); border-color:rgba(180,188,211,.25); }
.hero > .trinex-music.is-playing { border-color:rgba(153,171,201,.2); box-shadow:none; }
.tm-mini { display:flex; align-items:center; gap:7px; min-width:0; }
.tm-mini .tm-bars { gap:2px; height:16px; margin-right:3px; flex:none; opacity:.6; }
.tm-mini .tm-bars i { width:2px; height:6px; background:currentColor; }
.tm-mini .tm-bars i:nth-child(2),.tm-mini .tm-bars i:nth-child(4) { height:10px; }
.tm-mini .tm-bars i:nth-child(3) { height:14px; }
.tm-mini-title { flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; font-weight:500; line-height:1.4; opacity:.85; }
.tm-icon-button { display:grid; place-items:center; flex:none; width:30px; height:30px; padding:0; border:0; border-radius:9px; background:transparent; color:inherit; cursor:pointer; }
.tm-icon-button svg { width:15px; height:15px; }
.tm-icon-button:hover { color:#fff; background:rgba(255,255,255,.08); }
.tm-icon-button:disabled { opacity:.35; cursor:default; }
.trinex-music button:focus-visible,.trinex-music input:focus-visible { outline:2px solid #a5b4fc; outline-offset:3px; }
.hero > .trinex-music.is-expanded { width:min(460px,calc(100vw - 48px)); max-height:min(640px,var(--tm-available,70dvh)); overflow-y:auto; padding:18px 22px 20px; border-color:var(--border); border-radius:20px; background:var(--panel); color:var(--text); box-shadow:0 18px 60px rgba(0,0,0,.3); scrollbar-width:thin; }
.tm-panel-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:17px; }
.tm-panel-head .tm-icon-button { color:var(--muted); }
.tm-panel-head .tm-icon-button:hover { color:var(--text); background:rgba(var(--magic-rgb),.1); }
.tm-full .tm-main { flex-wrap:nowrap; gap:14px; }
.tm-full .tm-info { flex:1; }
.tm-full .tm-art { width:50px; height:50px; border-radius:14px; }
.tm-full .tm-title { font-size:17px; }
.tm-full .tm-controls { width:auto; justify-content:center; gap:18px; padding:0; margin-top:22px; }
.tm-controls [data-shuffle],.tm-controls [data-repeat] { width:32px; height:32px; border-color:transparent; color:var(--muted); border-radius:9px; }
.tm-controls [aria-pressed="true"] { color:var(--link); background:rgba(var(--magic-rgb),.14); border-color:rgba(var(--magic-rgb),.3); }
.tm-full .tm-progress { margin-top:14px; }
.tm-collections { margin-top:17px; padding-top:14px; border-top:1px solid var(--border); }
.tm-collections-heading { display:flex; align-items:center; gap:8px; margin-bottom:9px; color:var(--muted); font-size:11px; }
.tm-collections-heading small { font-size:9px; border:1px solid var(--border); border-radius:5px; padding:0 5px; }
.tm-categories { display:flex; flex-wrap:wrap; gap:6px; }
.tm-categories button { padding:6px 10px; font:inherit; font-size:11px; border:1px solid var(--border); border-radius:8px; background:transparent; color:var(--muted); opacity:.65; cursor:default; }
.tm-message:empty { display:none; }
.has-error .tm-mini-title { opacity:1; }
.trinex-music audio { display:none; }
@media(max-width:680px) {
  .hero > .trinex-music { top:14px; right:12px; width:216px; padding:3px 5px 3px 10px; }
  .tm-mini .tm-icon-button { width:36px; height:36px; }
  .hero > .trinex-music.is-expanded { width:min(460px,calc(100vw - 24px)); padding:14px 16px 16px; border-radius:16px; }
  .tm-full .tm-controls { gap:13px; }
  .tm-full .tm-controls .tm-play { width:48px; height:48px; }
  .tm-full .tm-controls [data-shuffle],.tm-full .tm-controls [data-repeat] { width:36px; height:36px; }
  .tm-full .tm-bottom { gap:10px; }
}
@media print { .trinex-music,.trinex-music-wrap,.hn-toolbar,.home-dialog,.hn-actions { display:none!important; } }
