/* Keep the original theme. The rules below cover the companion UI and its template slots. */
:root{color-scheme:dark}
[hidden]{display:none!important}
.skip{position:absolute;left:1rem;top:-6rem;background:var(--warm-accent);color:var(--bg);padding:.5rem 1rem;z-index:110}
.skip:focus{top:.5rem}
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid var(--warm-accent);outline-offset:3px}
.desktop-nav a[aria-current="page"]{color:var(--warm-accent)}
.brand{white-space:nowrap}
.companion-page-hero{display:grid;grid-template-columns:minmax(0,.88fr) minmax(0,1.12fr);gap:clamp(1.5rem,5vw,4rem);align-items:center;padding:clamp(2.5rem,6vw,5rem) 0}
.companion-page-hero.solo{display:block;max-width:56rem}
.companion-page-hero h1{font-size:clamp(3rem,6.3vw,5.75rem);line-height:.9}
.companion-page-hero .lead{margin:0;max-width:58ch}
.companion-content{padding-block:clamp(2rem,5vw,4rem);border-top:1px solid var(--line)}
.companion-content h2{font-size:clamp(2.2rem,4vw,3.6rem)}
.companion-content p,.companion-content summary{line-height:1.65}
.companion-content p{color:var(--muted)}
.companion-content p.kicker{color:var(--warm-accent)}
.companion-demo-layout{display:grid;grid-template-columns:minmax(0,.72fr) minmax(0,1.28fr);gap:clamp(1.5rem,5vw,4rem);align-items:center}
.companion-demo-layout .lead{max-width:42ch}
.companion-demo-layout .panel{min-width:0}
.companion-content .editorial{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,19rem),1fr));gap:clamp(1.3rem,4vw,3rem)}
.companion-content .editorial h2{font-size:clamp(2rem,3.5vw,3.1rem)}
.companion-content details{padding:.78rem 0;border-bottom:1px solid var(--line)}
.companion-content summary{cursor:pointer;font-weight:700}
.companion-content .directory{grid-template-columns:repeat(2,minmax(0,1fr))}
.companion-content .directory a{font-size:.9rem}
.companion-hub .home-character img{filter:brightness(.85) saturate(.82)}
.companion-hub .home-character p{font-size:.9rem;line-height:1.6}
.companion-hub .home-character h3 span{float:none;font:700 .67rem Inter,Arial,sans-serif;letter-spacing:.1em;margin-left:.5rem;color:var(--warm-accent)}
.companion-hub .home-character>div{height:clamp(15rem,32vw,26rem)}
.companion-hub .manifesto .lead{color:#24252a}
.companion-hub .feature-ticker a{font-size:.75rem}
.companion-hub .companion-feature-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.companion-hub .companion-feature-grid .feature-card{min-height:12rem}
[data-chat]{overflow:hidden;border:1px solid var(--line);background:var(--panel);box-shadow:0 18px 48px #0006}
[data-chat] .chat-head{padding:.8rem 1rem;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:.7rem}
[data-chat] .chat-head div{flex:1;min-width:0}
[data-chat] .chat-head p{margin:0;color:var(--muted);font-size:.84rem}
.avatar{display:grid;place-items:center;width:2.55rem;height:2.55rem;background:var(--warm-accent);color:#2b1b0e;font-weight:850;flex:none}
.avatar.aiko,.avatar.custom{background:var(--cool-accent);color:#102034}
.avatar.lena{background:#c7e2ff;color:#14273d}
[data-chat] .chat-controls,[data-chat] .chat-body,[data-chat] .compose,[data-chat] .builder{padding:.68rem 1rem}
[data-chat] .chat-controls{display:flex;align-items:center;gap:.55rem;flex-wrap:wrap;border-bottom:1px solid var(--line)}
[data-chat] .chat-controls label{color:var(--muted);font-size:.88rem}
[data-chat] .chat-controls select{margin-right:auto}
[data-chat] .chat-body{display:flex;flex-direction:column;gap:.55rem;height:10rem;overflow:auto;overscroll-behavior:contain}
[data-chat] .bubble{margin:0;max-width:87%;align-self:flex-start;background:var(--panel2);color:var(--text);padding:.6rem .8rem;border:1px solid var(--line);overflow-wrap:anywhere;line-height:1.5}
[data-chat] .bubble.user{align-self:flex-end;background:var(--warm-accent);color:#24160b;border-color:transparent}
[data-chat] .prompt-list{padding:.15rem 1rem;display:flex;flex-wrap:wrap;gap:.35rem}
[data-chat] .prompt-list button,[data-chat] .minor{border:1px solid var(--line);background:transparent;color:var(--text);padding:.34rem .55rem;font-size:.84rem}
[data-chat] button:hover{border-color:var(--warm-accent)}
[data-chat] button:disabled{opacity:.5;cursor:not-allowed}
[data-chat] .compose{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.55rem;margin:0}
[data-chat] .button{min-height:42px;padding:10px 15px;border:1px solid var(--line);background:var(--panel2);color:var(--text);cursor:pointer}
[data-chat] .button.primary{background:var(--warm-accent);color:#111;border-color:var(--warm-accent)}
[data-chat] input,[data-chat] select,[data-chat] textarea{width:100%;min-width:0;background:var(--bg);border:1px solid var(--line);padding:.5rem .6rem;color:var(--text);font:inherit}
[data-chat] select{width:auto;max-width:100%}
[data-chat] .note{color:var(--muted);font-size:.85rem;padding:0 1rem .72rem;margin:0}
[data-voice-status]:empty{display:none}
[data-chat] .builder{display:grid;gap:.55rem;border-bottom:1px solid var(--line);margin:0}
[data-chat] .builder label{display:grid;gap:.15rem;color:var(--muted);font-size:.9rem}
[data-chat] .builder select{width:100%}
.builder-fields{display:grid;grid-template-columns:1fr 1fr;gap:.55rem}
.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
@media(max-width:760px){
 .companion-page-hero,.companion-demo-layout{grid-template-columns:1fr}
 .companion-content .directory,.companion-hub .companion-feature-grid{grid-template-columns:1fr}
 .companion-hub .feature-ticker a{font-size:.65rem}
 .companion-hub .home-character>div{height:clamp(14rem,65vw,22rem)}
 .companion-hub .home-character h3 span{display:block;margin:.35rem 0 0}
}
@media(max-width:390px){.builder-fields{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}

.landing-hero {
  border-bottom: 0;
  background: radial-gradient(ellipse at 78% 44%, rgba(255,91,104,.13), transparent 49%);
}

.landing-hero__inner {
  width: min(1240px, calc(100% - 96px));
  margin-inline: auto;
  padding-block: var(--fold-padding);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .93fr);
  align-items: center;
  gap: clamp(32px, 7vw, 108px);
}

.landing-hero__eyebrow {
  margin: 0 0 20px;
  color: var(--warm-accent);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.landing-hero h1 {
  max-width: 100%;
  margin: 0;
  font-size: clamp(4.25rem, min(7.5vw, 13svh), 7.5rem);
  line-height: .86;
}

.landing-hero h1 em {
  display: block;
  color: var(--warm-accent);
  font-style: normal;
}

.landing-hero__lead {
  max-width: 39ch;
  margin: 25px 0 0;
  color: #c6c3c6;
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  line-height: 1.65;
}

.landing-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.landing-hero__actions .button {
  min-height: 50px;
  padding: 12px 19px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: .875rem;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: none;
}

.landing-hero__actions .primary:hover {
  background: #ff7782;
}

.landing-hero__actions .primary span {
  font-size: 1.14rem;
}

.landing-hero__actions .landing-hero__secondary {
  border-color: #535054;
  background: #151417;
  color: var(--text);
}

.landing-hero__actions .landing-hero__secondary:hover {
  border-color: var(--warm-accent);
}

.landing-hero__details {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 0;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  color: #c6c3c6;
  font-size: .8125rem;
  line-height: 1.3;
}

.landing-hero__details li + li {
  display: flex;
  align-items: center;
}

.landing-hero__details li + li::before {
  content: "";
  width: 3px;
  height: 3px;
  margin-inline: 11px;
  border-radius: 50%;
  background: var(--warm-accent);
}

.landing-hero__art {
  position: relative;
  justify-self: center;
  width: min(100%, 390px, max(160px, calc((100svh - var(--fold-header) - var(--fold-shortcuts) - 2 * var(--fold-padding) - 2px) * .7486)));
}

.landing-hero__art::before {
  content: "";
  position: absolute;
  inset: 13px -13px -13px 13px;
  border: 1px solid rgba(255,91,104,.38);
  border-radius: 14px;
  pointer-events: none;
}

.landing-hero__art img {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(255,255,255,.19);
  border-radius: 14px;
  background: #171417;
}

@media (max-width: 760px) {
  .landing-hero__inner {
    width: min(100% - 40px, 510px);
    grid-template-columns: 1fr;
    gap: 22px;
    padding-block: var(--fold-padding);
  }

  .landing-hero h1 {
    font-size: clamp(3.375rem, 10vw, 5.25rem);
  }

  .landing-hero__eyebrow {
    margin-bottom: 14px;
  }

  .landing-hero__lead {
    margin-top: 18px;
  }

  .landing-hero__actions {
    margin-top: 20px;
  }

  .landing-hero__details {
    margin-top: 16px;
  }

  .landing-hero__art {
    width: min(100% - 38px, 350px);
  }

  .landing-hero__art img {
    height: clamp(148px, 30svh, 270px);
    object-fit: cover;
    object-position: center 12%;
  }

  .landing-hero__art::before {
    inset: 8px -8px -8px 8px;
  }
}

@media (max-width: 360px) {
  .landing-hero__actions {
    gap: 8px;
  }

  .landing-hero__actions .button {
    padding-inline: 11px;
    font-size: .8125rem;
  }
}

.landing-fold {
  --fold-header: 76px;
  --fold-shortcuts: 64px;
  --fold-padding: clamp(20px, 3.6svh, 40px);
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: calc(100svh - var(--fold-header));
}

.landing-hero {
  display: grid;
  align-items: center;
  overflow: hidden;
}

.landing-hero__visual {
  position: relative;
  isolation: isolate;
  display: grid;
  justify-items: center;
}

.landing-hero__visual::before,
.landing-hero__visual::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset-inline: -14% -19%;
  height: clamp(24px, 4.4svh, 44px);
  transform: rotate(-12deg);
  pointer-events: none;
}

.landing-hero__visual::before {
  top: 30%;
  background: linear-gradient(90deg, transparent, var(--warm-accent) 23% 77%, transparent);
}

.landing-hero__visual::after {
  bottom: 17%;
  background: linear-gradient(90deg, transparent, var(--cool-accent) 23% 77%, transparent);
}

.landing-shortcuts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-height: var(--fold-shortcuts);
  border-block: 1px solid var(--line);
  background: #111217;
}

.landing-shortcuts a {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .55em;
  padding: 8px 10px;
  color: var(--text);
  text-align: center;
  font-size: .875rem;
  font-weight: 700;
  line-height: 1.25;
}

.landing-shortcuts a + a {
  border-left: 1px solid var(--line);
}

.landing-shortcuts a span {
  color: var(--cool-accent);
}

.landing-shortcuts a:hover {
  background: #1b1c23;
  color: var(--warm-accent);
}

.landing-shortcuts a:focus-visible {
  outline-offset: -4px;
}

@media (min-width: 761px) and (max-height: 720px) {
  .landing-hero h1 {
    font-size: clamp(3.5rem, min(7.5vw, 12svh), 6.5rem);
  }

  .landing-hero__lead,
  .landing-hero__actions {
    margin-top: 18px;
  }

  .landing-hero__details {
    margin-top: 16px;
  }
}

@media (max-width: 760px) {
  .landing-fold {
    --fold-header: 62px;
    --fold-shortcuts: 52px;
    --fold-padding: 23px;
  }

  .landing-hero__visual::before,
  .landing-hero__visual::after {
    inset-inline: -5%;
    height: 21px;
  }

  .landing-shortcuts a {
    padding-inline: 6px;
    font-size: .75rem;
  }
}

@media (max-width: 760px) and (max-height: 690px) {
  .landing-fold {
    --fold-padding: 15px;
  }

  .landing-hero__inner {
    gap: 17px;
  }

  .landing-hero h1 {
    font-size: clamp(2.5rem, 11vw, 3.375rem);
  }

  .landing-hero__eyebrow {
    margin-bottom: 10px;
  }

  .landing-hero__lead {
    margin-top: 12px;
    font-size: .875rem;
    line-height: 1.45;
  }

  .landing-hero__actions,
  .landing-hero__details {
    margin-top: 12px;
  }

  .landing-hero__actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 7px;
  }

  .landing-hero__actions .button {
    min-height: 44px;
    padding-inline: 5px;
    font-size: .75rem;
  }

  .landing-hero__actions .primary span {
    margin-left: 5px;
  }
}

@media (max-width: 760px) and (max-height: 600px) {
  .landing-fold {
    --fold-padding: 12px;
  }

  .landing-hero__inner {
    gap: 14px;
  }

  .landing-hero__art img {
    height: clamp(108px, 24svh, 145px);
    object-position: center 8%;
  }
}

/* Homepage chat, conversation formats and reading sections. */
.companion-hub #demo {
  border-radius: 23px;
  background: linear-gradient(155deg,#201d23,#121319 55%);
  border-color:#3b353e;
  scroll-margin-top: 85px;
}
:where(.companion-hub) #demo .chat-head { padding:1rem 1.25rem; background:linear-gradient(100deg,#302128,#1b1b22 68%); }
:where(.companion-hub) #demo .avatar,.reply-choice .initial { display:grid;place-items:center;border-radius:50%;font-weight:800; }
:where(.companion-hub) #demo .avatar { width:2.8rem;height:2.8rem;box-shadow:inset 0 0 0 1px #ffffff30; }
:where(.companion-hub) #demo .chat-controls { padding:.65rem 1.25rem;border:0; }
:where(.companion-hub) #demo .minor,:where(.companion-hub) #demo select,:where(.companion-hub) #demo .prompt-list button { border-radius:999px;background:#22232b;color:#e9e5e8; }
:where(.companion-hub) #demo .minor,:where(.companion-hub) #demo .prompt-list button { padding:.5rem .85rem; }
:where(.companion-hub) #demo select { padding:.45rem .6rem;min-height:38px; }
:where(.companion-hub) #demo .chat-body { height:clamp(8rem,13vw,11rem);padding:.85rem 1.25rem; }
:where(.companion-hub) #demo .bubble { border:0;border-radius:16px 16px 16px 4px;background:#2d2c36;color:#f6f2f3;padding:.72rem .95rem; }
:where(.companion-hub) #demo .bubble.user { border-radius:16px 16px 4px 16px;background:#51303b; }
:where(.companion-hub) #demo .prompt-list { padding:.5rem 1.25rem;gap:.4rem; }
:where(.companion-hub) #demo .compose { margin:.3rem 1.25rem .5rem;padding:.28rem;gap:.4rem;border:1px solid #514550;border-radius:18px;background:#111117; }
:where(.companion-hub) #demo .compose:focus-within { border-color:var(--cool-accent); }
:where(.companion-hub) #demo .compose input { border:0;background:transparent;border-radius:14px;padding:.55rem .65rem;font-size:1rem; }
:where(.companion-hub) #demo .compose .button { border:0;border-radius:14px;padding-inline:1.15rem; }
:where(.companion-hub) #demo .note { padding-inline:1.25rem; }
.reply-preview header p,.tone-inner header p,.starter-section>p { max-width:60ch; }
.sample-question { display:flex;align-items:baseline;flex-wrap:wrap;gap:.65rem;margin:1.5rem 0; }
.sample-question span,.tone-lines dt { font-weight:700;font-size:.84rem;color:var(--cool-accent); }
.sample-question p { margin:0;padding:.6rem 1rem;background:#24202a;border-radius:15px 15px 15px 4px;color:var(--text); }
.reply-row { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:clamp(.9rem,2.2vw,2rem); }
.reply-choice { display:flex;flex-direction:column;align-items:flex-start;padding:.5rem 0; }
.reply-choice h3 { display:flex;align-items:center;gap:.6rem;margin:0;font-size:1.4rem; }
.reply-choice .initial { width:28px;height:28px;font:700 13px Inter,Arial,sans-serif;background:#442630;color:#ff9ca4; }
.reply-choice.lena .initial { background:#2b3444;color:#a6cdff; }.reply-choice.aiko .initial { background:#393044;color:#e1bef5; }
.reply-choice blockquote { margin:1rem 0;padding:1rem 1.1rem;border-radius:4px 17px 17px;background:#1c1b22;line-height:1.6;color:#e3e0e5; }
.inline-action { display:inline-flex;align-items:center;gap:.65em;font-size:.9rem;min-height:40px;font-weight:700;color:var(--text); }
.inline-action::after,.character-picks a::after { content:"";width:.42em;height:.42em;transform:rotate(-45deg);border-right:1.6px solid var(--warm-accent);border-bottom:1.6px solid var(--warm-accent); }
.inline-action:hover { text-decoration:underline;text-underline-offset:4px; }.reply-choice .inline-action,.starter .inline-action { margin-top:auto; }
.companion-hub .companion-feature-grid { gap:16px; }
.companion-hub .feature-card {
  --tint:#ff98a2; --glow:#37242f;
  display:grid;grid-template-columns:42px 1fr auto;align-content:start;align-items:center;gap:0 .8rem;
  padding:clamp(18px,2.2vw,31px);border-radius:20px;border-color:#35313b;
  background:radial-gradient(ellipse at 100% 0,var(--glow),transparent 60%),#15151b;
}
.companion-hub .feature-card:hover { border-color:var(--tint);transform:translateY(-2px); }
.companion-hub .format-anime { --tint:#ddbbff;--glow:#30263e; }.companion-hub .format-realistic { --tint:#ffbdab;--glow:#392a29; }
.companion-hub .format-create { --tint:#a3cdff;--glow:#263241; }.companion-hub .format-roleplay { --tint:#ffa5b9;--glow:#382530; }
.companion-hub .feature-card>span { color:var(--tint);font-size:.68rem;font-weight:700; }
.companion-hub .feature-card::after { content:"";grid-area:1 / 3;width:9px;height:9px;border-top:2px solid var(--tint);border-right:2px solid var(--tint);margin-right:4px; }
.companion-hub .feature-card h3,.companion-hub .feature-card p { grid-column:1/-1; }
.companion-hub .feature-card h3 { margin:1rem 0 .45rem;font-size:clamp(1.7rem,2.5vw,2.45rem);line-height:1.02; }
.companion-hub .feature-card p { margin:0;max-width:49ch;font-size:.96rem;line-height:1.55; }
.format-icon { position:relative;display:grid;place-items:center;width:40px;height:40px;border-radius:13px;background:var(--glow);color:var(--tint); }
.format-icon.star i { background:currentColor;width:20px;height:24px;clip-path:polygon(50% 0,62% 36%,100% 50%,62% 62%,50% 100%,38% 63%,0 50%,38% 36%); }
.format-icon.coffee i { width:17px;height:12px;border:1.7px solid;border-radius:2px 2px 6px 6px; }
.format-icon.coffee:after { content:"";position:absolute;top:14px;left:27px;width:4px;height:6px;border:1.6px solid;border-left:0;border-radius:0 4px 4px 0; }
.format-icon.sliders i { background:currentColor;width:21px;height:1.5px;box-shadow:0 5px,0 -5px; }
.format-icon.sliders:after { content:"";width:3px;height:5px;background:currentColor;box-shadow:6px 5px,-4px -5px;position:absolute; }
.format-icon.tickets i { width:19px;height:13px;border:1.6px solid;border-radius:3px;transform:rotate(-18deg);box-shadow:3px 3px 0 -1px var(--glow),3px 3px 0 0 currentColor; }
.tone-inner { display:grid;grid-template-columns:1fr 1fr;align-items:center;gap:clamp(1rem,5vw,5rem);padding:clamp(1.3rem,3.6vw,3.2rem);background:linear-gradient(110deg,#29212a,#17171e 75%);border-radius:24px; }
.tone-inner h2,.chat-explainer h2,.starter-section h2,.reply-preview h2 { margin:0; }
.tone-lines { margin:0; }.tone-lines div { padding:.8rem 0; }.tone-lines div+div { border-top:1px solid var(--line); }
.tone-lines dd { margin:.3rem 0 0;font-size:1.04rem;line-height:1.45; }
.companion-hub .chat-explainer { grid-template-columns:1fr 1fr;align-items:start;gap:clamp(1.5rem,5vw,5rem); }
.chat-explainer article { padding-top:1rem; }.chat-explainer article::before { content:"";display:block;margin-bottom:1.2rem;background:var(--warm-accent);width:2rem;height:3px;border-radius:4px; }.chat-explainer article+article::before { background:var(--cool-accent); }
.character-picks { list-style:none;padding:0;margin:0; }.character-picks a { display:flex;gap:.9rem;align-items:baseline;border-bottom:1px solid var(--line);padding:.5rem 0; }
.character-picks b { min-width:3rem;color:var(--text); }.character-picks span { color:#c8c5ce;font-size:.94rem; }.character-picks a::after { margin-left:auto;flex:none;align-self:center; }.character-picks a:hover b { color:var(--warm-accent); }
.starter-section .editorial { gap:1rem;margin-top:1.35rem; }
.starter { display:flex;flex-direction:column;align-items:flex-start;padding:clamp(1.1rem,2vw,1.6rem);border-radius:19px;background:#19191f; }
.starter h3 { margin:0;font-size:1.35rem; }.starter blockquote { margin:1rem 0 0;border-left:2px solid var(--cool-accent);padding-left:.85rem;line-height:1.55; }.starter p { font-size:.92rem; }
@media(max-width:760px) {
  .reply-row,.tone-inner,.companion-hub .chat-explainer { grid-template-columns:1fr; }
  .reply-choice { border-top:1px solid var(--line);padding-top:1rem; }.reply-choice blockquote { margin:.6rem 0; }
  .companion-hub .companion-feature-grid .feature-card { min-height:0; }
  :where(.companion-hub) #demo .compose { margin-inline:.85rem; } :where(.companion-hub) #demo .chat-head,:where(.companion-hub) #demo .chat-controls,:where(.companion-hub) #demo .chat-body,:where(.companion-hub) #demo .prompt-list,:where(.companion-hub) #demo .note { padding-inline:.85rem; }
  :where(.companion-hub) #demo .prompt-list button,:where(.companion-hub) #demo .minor { min-height:40px; }
}

.home-create-chat {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .55rem .9rem;
  margin-top: 1.35rem;
}

.home-create-chat .button {
  min-height: 44px;
  padding: .65rem .9rem;
  border-radius: 7px;
  font-size: .875rem;
  letter-spacing: 0;
  text-transform: none;
}

.home-create-chat .button span {
  margin-left: .55rem;
}

.home-create-chat small {
  color: #c9c6cf;
  font-size: .8125rem;
}

.tone-inner .home-create-chat {
  margin-top: .65rem;
}
