/* Cortana site: the signed-in pages (account, welcome wizard, settings) and the demo shell. Builds on cortana.css. */

/* ---- account: sign in, create account, waitlist, join -------------------------------------------------------- */
.acct { min-height: 100vh; min-height: 100svh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.acct-scene { position: relative; overflow: hidden; padding: var(--s-6) var(--gutter) var(--s-8); display: flex; flex-direction: column; justify-content: space-between; background: #07090e; border-right: 1px solid var(--line-soft); }
.acct-scene::before { content: ""; position: absolute; left: -30%; bottom: -45%; width: 120%; aspect-ratio: 1; background: radial-gradient(closest-side, rgba(255, 200, 87, .30), rgba(255, 200, 87, .08) 55%, transparent 72%); pointer-events: none; }
.acct-scene::after { content: ""; position: absolute; right: -35%; top: -40%; width: 100%; aspect-ratio: 1; background: radial-gradient(closest-side, rgba(96, 160, 255, .22), transparent 70%); pointer-events: none; }
.acct-scene > * { position: relative; z-index: 1; }
.acct-lines { display: grid; gap: .2em; font-size: clamp(2rem, 1rem + 3.2vw, 4rem); }
.acct-lines li { color: #3b4557; }
.acct-lines li:last-child { color: var(--paper); }
.acct-lines li:nth-last-child(2) { color: #77808f; }
.acct-main { display: flex; flex-direction: column; justify-content: center; padding: var(--s-8) var(--gutter); }
.acct-main > .acct-in { width: 100%; max-width: 26rem; margin-inline: auto; }
.acct-in #auth { min-height: 31rem; }
.acct-top { display: none; }
.acct-legal { margin-top: var(--s-7); font-size: var(--t-xs); color: var(--dim); }
.acct-legal a { color: var(--mist); }
/* R2 L2: at laptop heights (1440×900) the sign-in column fits without a scroll: 3 rem less padding, a shorter gap to the legal line */
@media (min-width: 861px) and (max-height: 980px) { .acct-main { padding-block: var(--s-6); } .acct-legal { margin-top: var(--s-5); } .acct-in #auth { min-height: 29rem; } }
/* R3-L5: the sign-up form (three fields, four ways in) is the tallest state. At laptop heights it is set a step smaller, so
   the whole column, legal line included, fits 1440x900 with room to spare; the scene's lines scale with the height too. */
@media (min-width: 861px) and (max-height: 1140px) {
  .acct-main { padding-block: var(--s-5); }
  .acct-in #auth.inpage { font-size: clamp(15px, 1.5vh, 17px); }
  .acct-in #auth.inpage h1 { font-size: clamp(2rem, 1.2rem + 3.4vh, 2.75rem); margin-bottom: .35em; }
  .acct-in #auth .asub { margin-bottom: 1.1em; }
  .acct-in #auth .aform { gap: .75em; }
  .acct-in #auth input { min-height: 2.6em; padding-block: .5em; }
  .acct-in #auth .abtn { min-height: 2.75em; }
  .acct-legal { margin-top: var(--s-4); }
  .acct-scene { padding-bottom: var(--s-6); }
  .acct-lines { font-size: clamp(2rem, 1rem + 4.6vh, 4rem); }
}
@media (max-width: 860px) {
  .acct { grid-template-columns: 1fr; }
  .acct-scene { display: none; }
  .acct-main { justify-content: flex-start; padding-top: var(--s-5); }
  .acct-top { display: block; margin-bottom: var(--s-8); }
}

/* ---- shell for wizard and settings ----------------------------------------------------------------------------- */
.shell { padding-top: 4rem; min-height: 100vh; }
.loading { padding: var(--s-9) 0; color: var(--dim); text-align: center; }
.toast-host { position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%); z-index: 300; display: grid; gap: .5rem; pointer-events: none; }
.toast-msg { padding: .8rem 1.2rem; border-radius: var(--r-pill); background: var(--paper); color: var(--night); font-weight: 600; font-size: var(--t-sm); box-shadow: var(--e-2); animation: toast-in var(--d-3) var(--ease-out); }
.toast-msg.bad { background: #ffd9d5; color: #4a120d; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }
dialog.dlg { border: 1px solid var(--line); border-radius: var(--r-3); background: var(--night-2); color: var(--paper); padding: var(--s-6); width: min(92vw, 30rem); box-shadow: var(--e-3); }
dialog.dlg::backdrop { background: rgba(2, 3, 5, .72); }
.dlg h2 { font-size: var(--t-xl); font-stretch: 108%; font-weight: 680; letter-spacing: -.02em; line-height: 1.15; }
.dlg p { margin-top: .7rem; color: var(--mist); }
.dlg .field { margin-top: var(--s-5); }
.dlg-acts { display: flex; justify-content: flex-end; gap: .6rem; margin-top: var(--s-6); flex-wrap: wrap; }
.secret { display: flex; gap: .5rem; align-items: stretch; margin-top: var(--s-4); }
.secret code { flex: 1; min-width: 0; padding: .8rem 1rem; border-radius: var(--r-2); background: #070a18; border: 1px solid var(--line); font-size: var(--t-xs); overflow-wrap: anywhere; user-select: all; color: var(--paper); }

/* ---- welcome wizard -------------------------------------------------------------------------------------------- */
.wiz { max-width: 1080px; margin-inline: auto; padding: clamp(1.5rem, 5vh, 4rem) var(--gutter) var(--s-9); }
.wiz-steps { display: flex; gap: .4rem; margin-bottom: clamp(1.5rem, 5vh, 3.5rem); counter-reset: step; }
.wiz-steps li { flex: 1; counter-increment: step; font-size: var(--t-xs); font-weight: 600; color: var(--dim); padding-top: .7rem; border-top: 3px solid var(--line); transition: color var(--d-2) ease, border-color var(--d-2) ease; }
.wiz-steps li::before { content: counter(step) ". "; }
.wiz-steps li.is-done { color: var(--mist); border-color: var(--go); }
.wiz-steps li[aria-current="step"] { color: var(--paper); border-color: var(--paper); }
.wiz-step { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; animation: wiz-in var(--d-3) var(--ease-out); }
.wiz-step.solo { grid-template-columns: minmax(0, 36rem); }
@keyframes wiz-in { from { opacity: 0; transform: translateY(14px); } }
.wiz-step h1 { font-size: var(--t-2xl); }
.wiz-step .lede { margin-top: var(--s-4); font-size: var(--t-lg); }
.wiz-form { display: grid; gap: var(--s-4); margin-top: var(--s-6); }
.wiz-acts { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-top: var(--s-5); }
.wiz-aside { padding: var(--s-6); border-radius: var(--r-4); background: var(--night-2); border: 1px solid var(--line-soft); }
.wiz-aside h2 { font-size: var(--t-sm); font-weight: 600; color: var(--dim); margin-bottom: var(--s-4); }
.results { display: grid; gap: .3rem; }
.results button { text-align: left; padding: .7rem .9rem; border-radius: var(--r-2); border: 1px solid var(--line-soft); background: var(--night-2); cursor: pointer; display: grid; }
.results button:hover { border-color: var(--line); background: var(--night-3); }
.results button[aria-pressed="true"] { border-color: var(--screen); background: var(--c-brand-dim); }
.results small { color: var(--dim); }
.msg:empty { display: none; }
.seg { display: inline-flex; align-self: flex-start; padding: 3px; border-radius: var(--r-pill); background: var(--night-3); border: 1px solid var(--line-soft); }
.seg button { min-height: 2.5rem; padding: 0 1.1rem; border: 0; border-radius: var(--r-pill); background: none; color: var(--mist); font-weight: 600; font-size: var(--t-sm); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--paper); color: var(--night); }
.presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: .5rem; }
.presets button { min-height: 3.25rem; padding: .5rem .9rem; border-radius: var(--r-2); border: 1px solid var(--line-soft); background: var(--night-2); font-weight: 650; font-stretch: 106%; letter-spacing: -.01em; cursor: pointer; text-align: left; }
.presets button:hover { border-color: var(--line); background: var(--night-3); }
.presets button[aria-pressed="true"] { border-color: var(--screen); background: var(--c-brand-dim); color: var(--paper); }
/* R2 M8: once the key exists the grid folds to the chosen tool, so the key sits in view at 1440×900 */
.wiz-form.is-made .presets { grid-template-columns: repeat(2, max-content); } .wiz-form.is-made .presets button:not([aria-pressed="true"]):not(.more) { display: none; }
.wiz-form.is-made .field .hint { display: none; } .presets button.more { background: none; border-style: dashed; color: var(--mist); }
.wiz-form ~ div { scroll-margin-top: var(--s-6); }
.tvmock { aspect-ratio: 16 / 9; border-radius: 10px; background: #070a18; border: 6px solid #020304; box-shadow: 0 0 0 1px #262c38, 0 30px 60px rgba(0, 0, 0, .5), 0 0 90px rgba(96, 160, 255, .14); display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 5%; padding: 6% 6%; }
.tvmock h3 { font-size: clamp(.9rem, 2vw, 1.25rem); font-weight: 700; font-stretch: 110%; letter-spacing: -.02em; }
.tvmock p { font-size: clamp(.6rem, 1.2vw, .78rem); color: var(--mist); margin-top: .3em; }
.tvmock-code { display: flex; gap: .18em; margin-top: .8em; font-family: var(--mono); font-weight: 600; font-size: clamp(.9rem, 2vw, 1.3rem); }
.tvmock-code span { width: 1.25em; height: 1.6em; display: grid; place-items: center; border-radius: .2em; border: 1px solid var(--line); color: var(--paper); }
.tvmock-qr { width: clamp(3.75rem, 8vw, 5.75rem); border-radius: 8px; overflow: hidden; background: var(--paper); }
.tvmock-qr svg { width: 100%; height: auto; }
.tvmock-stand { width: 22%; height: 14px; margin: 0 auto; background: linear-gradient(90deg, #0a0b0e, #23272e 50%, #0a0b0e); clip-path: polygon(12% 0, 88% 0, 100% 100%, 0 100%); }
.done-list { display: grid; gap: .1rem; margin-top: var(--s-5); }
.done-list li { display: flex; gap: .8rem; align-items: baseline; padding: .8rem 0; border-top: 1px solid var(--line-soft); }
.done-list li b { font-weight: 600; } .done-list li span { color: var(--mist); margin-left: auto; text-align: right; }
@media (max-width: 860px) {
  .wiz-step { grid-template-columns: 1fr; }
  .wiz-steps li { font-size: 0; padding-top: 0; }
  .wiz-steps li::before { content: none; }
}

/* ---- settings ---------------------------------------------------------------------------------------------------- */
.set { display: grid; grid-template-columns: 13rem minmax(0, 1fr); gap: clamp(1.5rem, 5vw, 5rem); max-width: 1180px; margin-inline: auto; padding: clamp(1.5rem, 5vh, 3.5rem) var(--gutter) var(--s-10); }
.set-nav { position: sticky; top: 5.5rem; align-self: start; display: grid; gap: .1rem; }
.set-nav a { padding: .55rem .8rem; border-radius: var(--r-1); color: var(--mist); text-decoration: none; font-weight: 500; font-size: var(--t-sm); }
.set-nav a:hover { color: var(--paper); background: var(--night-2); }
.set-nav a[aria-current="true"] { color: var(--paper); background: var(--night-3); }
.set-head h1 { font-size: var(--t-3xl); }
.set-head p { margin-top: var(--s-3); color: var(--mist); }
.set-sec { padding-top: var(--s-8); scroll-margin-top: 5rem; }
.set-sec > h2 { font-size: var(--t-xl); font-stretch: 108%; font-weight: 680; letter-spacing: -.02em; line-height: 1.15; }
.set-sec > h2 + p { margin-top: .5rem; color: var(--mist); max-width: 38em; }
.set-sec h3 { font-size: var(--t-sm); font-weight: 600; color: var(--dim); margin-top: var(--s-6); }
.rows { margin-top: var(--s-4); border-top: 1px solid var(--line-soft); }
.row { display: flex; align-items: center; gap: var(--s-4); padding: .95rem 0; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.row-main { flex: 1; min-width: 12rem; }
.row-main b { font-weight: 600; display: block; }
.row-main small { color: var(--dim); font-size: var(--t-xs); display: block; margin-top: .1rem; overflow-wrap: anywhere; }
.row-acts { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.empty { padding: var(--s-5); margin-top: var(--s-4); border-radius: var(--r-2); border: 1px dashed var(--line); color: var(--mist); font-size: var(--t-sm); }
.inline-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: var(--s-4); margin-top: var(--s-5); align-items: end; }
.inline-form .btn { justify-self: start; }
.set-acts { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: var(--s-5); align-items: center; }
.plan-card { display: flex; flex-wrap: wrap; gap: var(--s-5); align-items: center; justify-content: space-between; margin-top: var(--s-4); padding: var(--s-5) var(--s-6); border-radius: var(--r-3); background: var(--night-2); border: 1px solid var(--line-soft); }
.plan-card b { font-size: var(--t-xl); font-stretch: 108%; font-weight: 700; letter-spacing: -.02em; display: block; }
.plan-card span { color: var(--mist); font-size: var(--t-sm); }
.danger { margin-top: var(--s-5); padding: var(--s-5) var(--s-6); border-radius: var(--r-3); border: 1px solid #4a2421; background: #130b0b; display: flex; flex-wrap: wrap; gap: var(--s-4); align-items: center; justify-content: space-between; }
.danger p { color: #e7b9b4; max-width: 34em; font-size: var(--t-sm); }
.switch { position: relative; display: inline-flex; align-items: center; gap: .7rem; cursor: pointer; font-weight: 600; font-size: var(--t-sm); min-height: 2.75rem; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch i { width: 2.9rem; height: 1.7rem; border-radius: 99px; background: var(--night-4); border: 1px solid var(--line); position: relative; transition: background var(--d-2) ease; flex: none; }
.switch i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 1.2rem; height: 1.2rem; border-radius: 50%; background: var(--mist); transition: transform var(--d-2) var(--ease-spring), background var(--d-2) ease; }
.switch input:checked + i { background: #173c2c; border-color: #1f5c43; }
.switch input:checked + i::after { transform: translateX(1.2rem); background: var(--go); }
.switch input:focus-visible + i { box-shadow: var(--focus); }
@media (max-width: 860px) {
  .set { grid-template-columns: 1fr; }
  .set-nav { position: static; display: flex; overflow-x: auto; gap: .2rem; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scrollbar-width: none; }
  .set-nav a { white-space: nowrap; min-height: 2.75rem; display: inline-flex; align-items: center; }
}

/* ---- the wizard's live moments: the halo that waits for a heartbeat, the gold ask, the stamp ------------------------- */
.plain { color: var(--paper); font-weight: 600; } .fine { font-size: var(--t-xs); margin-top: var(--s-5); }
.keyline { margin-top: var(--s-6); } .wiz-step .codeblock { margin-top: var(--s-4); }
.halo { position: relative; flex: none; width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 3px solid var(--c-surface-3); display: block; transition: border-color var(--d-3) ease, background var(--d-3) ease, transform var(--d-3) var(--ease-spring); }
.halo::before { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 3px solid transparent; border-top-color: var(--screen); animation: halo-wait 1.1s linear infinite; }
.halo::after { content: ""; position: absolute; left: 50%; top: 50%; width: .9rem; height: .5rem; margin: -.42rem 0 0 -.45rem; border-left: 3px solid var(--c-on-signal); border-bottom: 3px solid var(--c-on-signal); transform: rotate(-45deg) scale(0); transition: transform var(--d-3) var(--ease-spring) .12s; }
.halo.is-on { border-color: var(--go); background: var(--go); transform: scale(1.06); } .halo.is-on::before { animation: halo-ping 1s var(--ease-out) 1 forwards; border-color: var(--go); } .halo.is-on::after { transform: rotate(-45deg) scale(1); }
@keyframes halo-wait { to { transform: rotate(360deg); } }
@keyframes halo-ping { from { transform: scale(1); opacity: .9; } to { transform: scale(2.1); opacity: 0; } }
.wiz-lit { display: flex; align-items: center; gap: var(--s-4); }
.wiz-lit b { display: block; font-size: var(--t-lg); font-weight: 650; letter-spacing: -.01em; } .wiz-lit span { display: block; color: var(--mist); font-size: var(--t-sm); margin-top: .15rem; }
.wiz-live { margin-top: var(--s-6); padding: var(--s-5); border-radius: var(--r-3); background: var(--night-2); border: 1px solid var(--line-soft); transition: border-color var(--d-3) ease, background var(--d-3) ease; }
.wiz-live.is-live { border-color: var(--go); background: var(--c-live-surface); }
.wiz-live .wiz-acts { margin-top: var(--s-4); } .wiz-live .fine { margin-top: 0; }
.wiz-gold { position: relative; }
.wiz-gold::before { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -1; background: radial-gradient(70% 60% at 50% 0%, rgba(255, 200, 87, .22), transparent 70%); animation: gold-in 1.2s var(--ease-out) backwards; }
@keyframes gold-in { from { opacity: 0; } }
.wiz-ask { margin-top: var(--s-6); padding: clamp(1.5rem, 4vw, 2.25rem); border-radius: var(--r-4); background: var(--lamp); color: var(--c-on-ask); box-shadow: 0 30px 90px rgba(255, 200, 87, .18); animation: wiz-in var(--d-4) var(--ease-out) .15s backwards; }
.wiz-ask-from { font-size: var(--t-sm); font-weight: 650; }
.wiz-ask-title { font-size: clamp(1.75rem, 1rem + 2.6vw, 2.75rem); font-weight: 720; font-stretch: 112%; letter-spacing: -.03em; line-height: 1.05; margin-top: .5rem; }
.wiz-ask-how { margin-top: 1rem; font-weight: 550; display: inline-flex; padding: .45rem .9rem; border-radius: var(--r-pill); background: var(--c-on-ask); color: var(--lamp); font-size: var(--t-sm); }
.wiz-stamp { display: inline-flex; align-items: center; gap: .8rem; margin-bottom: var(--s-5); padding: .4rem 1.1rem .4rem .4rem; border-radius: var(--r-pill); background: var(--c-live-surface); color: var(--go); font-weight: 650; animation: wiz-in var(--d-4) var(--ease-spring) backwards; }
.wiz-stamp .halo { width: 2rem; height: 2rem; }
.next-h { margin-top: var(--s-7); font-size: var(--t-sm); font-weight: 600; color: var(--dim); }
.next-cards { display: grid; gap: .6rem; margin-top: var(--s-3); }
.next-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .2rem var(--s-5); align-items: center; padding: var(--s-4) var(--s-5); border-radius: var(--r-3); background: var(--night-2); border: 1px solid var(--line-soft); }
.next-card b { font-weight: 650; } .next-card p { grid-column: 1; color: var(--mist); font-size: var(--t-sm); } .next-card .btn { grid-column: 2; grid-row: 1 / span 2; }
@media (max-width: 760px) { .next-card { grid-template-columns: 1fr; } .next-card .btn { grid-column: 1; grid-row: auto; margin-top: .6rem; justify-self: start; } }

/* ---- demo shell ---------------------------------------------------------------------------------------------------- */
.demo { height: 100vh; height: 100svh; display: grid; grid-template-rows: auto 1fr; background: #020304; }
.demo-bar { display: flex; align-items: center; gap: var(--s-4); padding: .5rem clamp(.75rem, 2vw, 1.5rem); min-height: 3.5rem; border-bottom: 1px solid var(--line-soft); background: var(--night); }
.demo-bar p { color: var(--mist); font-size: var(--t-sm); margin-right: auto; }
.demo-bar p b { color: var(--paper); font-weight: 600; }
.demo-bar .seg button { min-height: 2.25rem; }
.demo-stage { position: relative; min-height: 0; display: grid; place-items: center; padding: clamp(0rem, 2vh, 1.5rem); overflow: hidden; }
.demo-frame { position: relative; width: min(100%, calc((100svh - 3.5rem - 5.5rem) * 16 / 9)); aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #070a18; box-shadow: 0 0 0 1px #262c38, 0 0 0 7px #020304, 0 0 0 8px #1b1f26, 0 40px 120px rgba(0, 0, 0, .7), 0 0 160px rgba(96, 160, 255, .12); }
.demo-frame iframe { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; border: 0; transform-origin: 0 0; }
.demo.is-phone .demo-frame { width: min(92vw, calc((100svh - 3.5rem - 5.5rem) * 390 / 844)); aspect-ratio: 390 / 844; border-radius: 38px; box-shadow: 0 0 0 1px #3a3d45, 0 0 0 9px #0b0c10, 0 0 0 10px #2a2d35, 0 40px 120px rgba(0, 0, 0, .7); }
.demo.is-phone .demo-frame iframe { width: 390px; height: 844px; }
.demo-keys { position: absolute; left: 50%; bottom: .6rem; transform: translateX(-50%); font-size: var(--t-xs); color: var(--dim); white-space: nowrap; }
@media (max-width: 760px) {
  .demo-bar p span, .demo-keys, .demo-bar .seg { display: none; }
  .demo-stage { padding: 0; }
  .demo .demo-frame, .demo.is-phone .demo-frame { width: 100%; height: 100%; aspect-ratio: auto; border-radius: 0; box-shadow: none; }
  .demo .demo-frame iframe, .demo.is-phone .demo-frame iframe { width: 100%; height: 100%; transform: none !important; }
}

.callout-warn { border-left-color: var(--stop); margin-bottom: var(--s-5); } .callout-warn b { color: var(--paper); }
.wiz-confirm { padding: var(--s-5); border-radius: var(--r-3); background: var(--night-2); border: 1px solid var(--line); animation: wiz-in var(--d-3) var(--ease-out); }
.wiz-confirm-q { font-size: var(--t-xl); font-weight: 700; font-stretch: 110%; letter-spacing: -.02em; line-height: 1.15; } .wiz-confirm-q b { font-family: var(--mono); letter-spacing: .08em; color: var(--screen); font-stretch: 100%; }
.callout.undo { display: flex; align-items: center; gap: var(--s-4); justify-content: space-between; border-left-color: var(--stop); margin-bottom: var(--s-3); } .callout.undo b { color: var(--paper); }
@media (max-width: 760px) { .callout.undo { flex-direction: column; align-items: flex-start; } }

/* Account page on a phone: the same room, lit from above by the screen and warmed from below by the lamp. */
@media (max-width: 860px) {
  .acct-main { position: relative; isolation: isolate; }
  .acct-main::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 22rem; z-index: -1; pointer-events: none; background: radial-gradient(90% 100% at 50% 0%, rgba(143, 165, 255, .18), transparent 72%); }
}
.demo-keys kbd { display: inline-block; min-width: 1.7em; padding: .12em .45em; margin: 0 .12em; border-radius: 6px; border: 1px solid var(--line); background: var(--night-3); color: var(--paper); font-family: var(--font); font-size: .85em; font-weight: 600; text-align: center; }
