/* Avalehe torn (27.11.2026, mockup avalik-pool/mockup/mc-torn.html V). Tokenid = live.css. */
.tower { --g: var(--success); margin-left: auto; width: 100%; max-width: 620px; display: flex; flex-direction: column; }
.tower .service-node { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 20px; padding: 16px 16px 16px 20px; transition: border-color 300ms, box-shadow 300ms; }
.tower .service-node:hover { transform: none; }
.tower .service-node.ping { border-color: var(--g); box-shadow: 0 0 0 4px color-mix(in oklch, var(--brand-green) 14%, transparent); }
.tower .service-node h2 { display: flex; align-items: center; gap: 8px; }
.tower .service-node h2 svg.i { width: 15px; height: 15px; color: var(--muted-foreground); }

/* Avaldus 1× päevas (Tiit 27.11): eyebrow suurelt, siis taandub; H1, nupp ja torn tulevad järele. Klass = live.js (head), lõpp = torn.js */
/* 27.11 Tiit: «keskele, 2× aeglasemaks, kauemaks — liiga fläsh». Intro ajal H1 ja nupp kokku (max-height 0) → avaldus on veerus keskel. */
.home-copy h1 { transition: opacity 1000ms ease-out; }
.home-actions { transition: opacity 1000ms ease-out 250ms; }
.tower { transition: opacity 1200ms ease-out 450ms; }
/* taandumine (torn.js end): tw-leaving = märk hääbub · tw-snap = lõppseis ilma üleminekuteta · tw-hold = koopia lendab, päris read peidus */
html.tw-leaving .intro-mark { opacity: 0; transition: opacity 450ms ease-out; }
html.tw-snap, html.tw-snap * { transition: none !important; }
html.tw-hold .home-copy h1, html.tw-hold .home-actions, html.tw-hold .tower { opacity: 0; }
html.tw-hold .home-copy .public-eyebrow { visibility: hidden; }
.tw-ghost { position: fixed; z-index: 30; margin: 0; pointer-events: none; text-transform: uppercase; font-family: inherit; white-space: normal; }
html.live-intro .home-copy { min-width: 0; } /* lai avaldus ei tohi veergu laiendada (torn läks üle ääre) */
html.live-intro .home-copy .public-eyebrow { font-size: clamp(34px, 4.2vw, 56px); line-height: 1.12; color: var(--foreground); width: max-content; max-width: min(90vw, 1100px); }
/* 27.11 Tiit: «vert kõrgemale, hor center» — torn.js nihutab transformiga lehe keskele (~40 % kõrgusel), lõpus libiseb oma kohale */
html.live-intro .home-copy h1, html.live-intro .home-actions { max-height: 0; margin-top: 0; overflow: hidden; opacity: 0; transition: none; }
html.live-intro .tower { opacity: 0; transition: none; }
@media (max-width: 1023px) { html.live-intro .tower { max-height: 0; overflow: hidden; } html.live-intro .home-stage { align-content: center; } }
/* 27.11 Tiit: enne plingib suur roheline >_ (nagu käsurida), siis rullub valge lause lahti; lõpus märk kaob ja lause taandub */
.intro-mark { display: inline-block; vertical-align: -0.12em; width: 0.95em; height: 0.95em; max-width: 0; margin-right: 0; opacity: 0; fill: none; stroke: var(--brand-green); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; transition: max-width 1000ms, margin-right 1000ms, opacity 600ms; }
html.live-intro .intro-mark { max-width: 0.95em; margin-right: 0.3em; opacity: 1; }
html.live-intro .intro-car { animation: tw-blink 1s steps(1) infinite; }
/* 27.11 Tiit: «rulli lahti nagu tõmbaks loori pealt» — pehme servaga mask libiseb vasakult paremale (mitte tippimine) */
html.live-intro .intro-tx { display: inline-block; -webkit-mask-image: linear-gradient(90deg, #000 40%, transparent 60%); mask-image: linear-gradient(90deg, #000 40%, transparent 60%);
  -webkit-mask-size: 250% 100%; mask-size: 250% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: 100% 0; mask-position: 100% 0;
  transition: -webkit-mask-position 2600ms cubic-bezier(.45,0,.2,1), mask-position 2600ms cubic-bezier(.45,0,.2,1); }
html.live-intro .intro-tx.on { -webkit-mask-position: 0 0; mask-position: 0 0; }

/* Minu Claude keskel */
.mc { display: flex; flex-direction: column; align-items: center; }
.flow { position: relative; width: 22px; height: 40px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; color: var(--border); }
.flow::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: currentColor; opacity: .6; }
.flow svg { position: relative; width: 14px; height: 10px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; background: var(--background); transition: color 200ms; }
.flow.dn svg { transform: rotate(180deg); }
.flow.on { color: var(--g); }
.flow.on svg { animation: tw-tick 1s steps(1) infinite; }
.flow.on svg:nth-of-type(2) { animation-delay: .33s; }
.flow.on svg:nth-of-type(3) { animation-delay: .66s; }
.flow.up.on svg:nth-of-type(1) { animation-delay: .66s; }
.flow.up.on svg:nth-of-type(3) { animation-delay: 0s; }
@keyframes tw-tick { 0% { opacity: 1; } 33% { opacity: .25; } 66% { opacity: .25; } }
.mc-body { width: 100%; display: flex; align-items: center; gap: 20px; padding: 4px 0; }
.mc-who { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.mc-who .live-mark { width: 28px; height: 28px; }
.mc-who b { display: block; font-size: 22px; font-weight: 500; line-height: 1.2; }
.mc-who small { display: block; font-size: 12px; color: var(--muted-foreground); }
.mc-who small a { color: var(--primary); font-weight: 500; border-bottom: 1px solid color-mix(in oklch, var(--primary) 45%, transparent); white-space: nowrap; } /* ainus tee Minu Claude juurest koolitusele (Tiit 27.11) */
.mc-who small a:hover { border-bottom-color: var(--primary); }
.prompt { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 4px; font: 16px/1 'Ubuntu Mono', ui-monospace, SFMono-Regular, Consolas, monospace; white-space: nowrap; overflow: hidden; }
.prompt .gt { color: var(--g); }
.prompt .tx { overflow: hidden; text-overflow: ellipsis; }
.prompt .car { width: 7px; height: 16px; background: var(--g); animation: tw-blink 1s steps(1) infinite; flex-shrink: 0; }
.prompt .st { margin-left: auto; font: 500 12px 'Ubuntu', sans-serif; color: var(--g); opacity: 0; transition: opacity 200ms; flex-shrink: 0; }
.prompt .st.on { opacity: 1; }
@keyframes tw-blink { 50% { opacity: 0; } }

/* vidinad */
.wg { --wg-shadow: 0 6px 18px oklch(0.3 0.01 75 / .14); position: relative; width: 248px; height: 142px; flex-shrink: 0; }
html.dark .wg { --wg-shadow: 0 8px 24px oklch(0 0 0 / .35); }
.wg .frame { position: absolute; inset: 0; border: 1px solid var(--border); border-radius: 7px; overflow: hidden; box-shadow: var(--wg-shadow); background: var(--background); }
.wg .bar { height: 15px; display: flex; align-items: center; gap: 3px; padding: 0 6px; background: var(--accent); border-bottom: 1px solid var(--border); }
.wg .bar i { width: 5px; height: 5px; border-radius: 50%; background: var(--input); }
.wg .bar span { margin-left: 5px; flex: 1; height: 9px; border-radius: 3px; background: var(--background); font-size: 6.5px; line-height: 9px; padding: 0 5px; color: var(--muted-foreground); }
.wg .site { position: absolute; inset: 15px 0 0; background: #f5efe6; color: #2b231c; padding: 7px 9px; }
.s-nav { display: flex; align-items: center; justify-content: space-between; font-size: 7.5px; font-weight: 700; }
.s-nav b { display: flex; align-items: center; gap: 3px; }
.s-nav b::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: #9a5b2a; }
.s-nav span { display: flex; gap: 7px; font-weight: 400; font-size: 6px; color: #8c7d6e; }
.s-hero { display: grid; grid-template-columns: 1fr 46%; gap: 8px; align-items: center; margin-top: 8px; }
.s-hero h3 { margin: 0; font-size: 11.5px; line-height: 1.15; font-weight: 700; }
.s-hero p { margin: 3px 0 0; font-size: 6px; line-height: 1.4; color: #8c7d6e; }
/* 30.11 Tiit: muutused ilmsemaks (enne 6,5 px kribu) → suurem, täisroheline, hüppab ja kiirgab */
.s-note { display: inline-block; margin-top: 6px; font-size: 9px; font-weight: 700; padding: 3px 6px; border-radius: 3px; background: var(--brand-green); color: #0b2a14; transform: scale(.4); opacity: 0; transition: transform 380ms cubic-bezier(.34,1.7,.64,1), opacity 200ms; }
.s-note.on { transform: none; opacity: 1; animation: tw-glow 1.6s ease-out 1; }
@keyframes tw-glow { 0% { box-shadow: 0 0 0 0 #22c55eaa; } 70% { box-shadow: 0 0 0 9px #22c55e00; } 100% { box-shadow: 0 0 0 0 #22c55e00; } }
.photo { position: relative; aspect-ratio: 4/3; border-radius: 3px; overflow: hidden; background: linear-gradient(160deg, #d9a46a, #8b5527 70%, #5e3517); transition: background 400ms; }
.photo svg { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity 400ms; }
.photo .p2 { opacity: 0; }
.photo.alt { background: linear-gradient(160deg, #c9b08a, #6d5a3e 70%, #3e3222); outline: 2.5px solid var(--brand-green); outline-offset: 1px; animation: tw-glow 1.6s ease-out 1; }
.photo::after { content: "Uus"; position: absolute; top: 4px; right: 4px; font-size: 8px; font-weight: 700; line-height: 1; padding: 2px 4px; border-radius: 3px; background: var(--brand-green); color: #0b2a14; transform: scale(.4); opacity: 0; transition: transform 380ms cubic-bezier(.34,1.7,.64,1), opacity 200ms; }
.photo.alt::after { transform: none; opacity: 1; }
.photo.alt .p1 { opacity: 0; }
.photo.alt .p2 { opacity: 1; }
.s-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-top: 8px; }
.s-row i { height: 16px; border-radius: 2px; background: #e8dfd2; }
.wg .app { position: absolute; inset: 0; padding: 8px 9px; font-size: 7px; color: var(--foreground); }
.app-h { display: flex; align-items: center; justify-content: space-between; font-size: 8.5px; font-weight: 500; margin-bottom: 6px; }
.app-h small { font-size: 6.5px; font-weight: 400; color: var(--muted-foreground); }
.wg .r { display: grid; grid-template-columns: 6px 1fr auto; gap: 5px; align-items: center; padding: 3px 0; border-bottom: 1px solid var(--border); transition: background 300ms; }
.wg .r small { color: var(--muted-foreground); font-size: 6px; }
.wg .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--input); transition: background 300ms; }
.wg .dot.g { background: var(--brand-green); }
.wg .dot.o { background: var(--primary); }
.wg .r.flash { background: color-mix(in oklch, var(--brand-green) 16%, transparent); }
.toast { position: absolute; left: 14px; right: -10px; bottom: -8px; display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 7px; background: var(--card); border: 1px solid var(--primary); box-shadow: var(--wg-shadow); font-size: 7.5px; line-height: 1.3; color: var(--foreground); transform: translateY(8px); opacity: 0; transition: all 300ms; }
.toast.on { transform: none; opacity: 1; }
.toast b { font-weight: 500; }
.toast .live-mark { width: 12px; height: 12px; stroke-width: 3; }
.toast .go { margin-left: auto; font-size: 7px; font-weight: 600; padding: 3px 7px; border-radius: 4px; background: var(--primary); color: var(--primary-foreground); }

@media (min-width: 1024px) and (max-height: 800px) {
  .tower .service-node { padding: 10px 12px 10px 14px; }
  .wg { width: 218px; height: 124px; }
  .flow { height: 30px; }
}
@media (min-width: 1024px) and (max-width: 1199px) { /* kitsas kahe veeru vahemik: käsk peab mahtuma (27.11) */
  .prompt { font-size: 15px; }
  .prompt .st-w { display: none; }
}
@media (max-width: 1023px) {
  .tower { margin-left: 0; }
}
@media (max-width: 560px) {
  .tower .service-node { grid-template-columns: 1fr; gap: 16px; padding: 20px; }
  .wg { width: 100%; height: 150px; }
  /* 30.11 Tiit: mobiilis sait veidi suuremaks (laius on olemas) */
  #tw-c1 .wg { height: 196px; }
  #tw-c1 .wg .bar { height: 18px; }
  #tw-c1 .wg .bar span { font-size: 8px; height: 11px; line-height: 11px; }
  #tw-c1 .wg .site { inset: 18px 0 0; padding: 9px 12px; }
  #tw-c1 .s-nav { font-size: 9.5px; }
  #tw-c1 .s-nav span { font-size: 8px; gap: 9px; }
  #tw-c1 .s-hero { margin-top: 11px; gap: 10px; }
  #tw-c1 .s-hero h3 { font-size: 15px; }
  #tw-c1 .s-hero p { font-size: 8px; }
  #tw-c1 .s-note { font-size: 11px; padding: 4px 7px; }
  #tw-c1 .photo::after { font-size: 9.5px; }
  #tw-c1 .s-row { margin-top: 11px; }
  #tw-c1 .s-row i { height: 20px; }
  /* kliendihaldur sama mõõtu (Tiit 30.11) */
  #tw-c2 .wg { height: 196px; }
  #tw-c2 .wg .app { padding: 11px 12px; font-size: 9.5px; }
  #tw-c2 .app-h { font-size: 11px; margin-bottom: 8px; }
  #tw-c2 .app-h small { font-size: 8.5px; }
  #tw-c2 .wg .r { grid-template-columns: 8px 1fr auto; gap: 7px; padding: 5px 0; }
  #tw-c2 .wg .r small { font-size: 8px; }
  #tw-c2 .wg .dot { width: 8px; height: 8px; }
  #tw-c2 .toast { font-size: 9.5px; padding: 8px 10px; gap: 8px; }
  #tw-c2 .toast .live-mark { width: 15px; height: 15px; }
  #tw-c2 .toast .go { font-size: 9px; padding: 4px 9px; }
  .mc-body { flex-direction: column; align-items: stretch; gap: 12px; }
  .mc-who, .prompt { justify-content: center; }
  .prompt { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) { .flow.on svg, .prompt .car, .s-note.on, .photo.alt { animation: none; } }
