.ai-mode-page {
  min-height: 100vh; color: var(--text);
  background: radial-gradient(ellipse at 85% 12%, #e6ecd9b3, transparent 42%),
    radial-gradient(ellipse at 12% 35%, #f2e5d680, transparent 38%), #f7f8f2;
}
.ai-mode-page :focus-visible { outline: 2px solid var(--green); outline-offset: 5px; }
.ai-mode-page main { padding: 0; }
.ai-mode-header {
  max-width: 1240px; margin: 0 auto; padding: 18px 40px;
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  border-bottom: 1px solid #193b3210;
}
.ai-mode-brand { display: flex; align-items: center; gap: 24px; }
.ai-mode-brand a { flex-shrink: 0; }
.ai-mode-brand img { display: block; width: 172px; height: auto; }
.ai-mode-brand > span { border-left: 1px solid var(--line); padding-left: 24px; font-size: 14px; font-weight: 600; color: var(--muted); }
.ai-mode-header-actions { display: flex; align-items: center; gap: 20px; }
.ai-mode-beta { font-size: 11px; font-weight: 600; border: 1px solid #d5decc; border-radius: 100px; padding: 5px 10px; color: var(--teal); background: #edf1e5; white-space: nowrap; }
.ai-mode-new-chat { display: flex; align-items: center; gap: 8px; border: 1px solid #d5decc; border-radius: 100px; background: #ffffff80; color: var(--navy); font: 600 13px var(--display); cursor: pointer; min-height: 44px; padding: 8px 16px; transition: background .2s, border-color .2s; }
.ai-mode-new-chat > span { font-size: 22px; font-weight: 400; }
.ai-mode-new-chat:hover { background: #fff; border-color: #9fb294; }
.ai-mode { max-width: 1000px; margin: 0 auto; padding: 32px 40px 28px; }
.ai-mode-intro { position: relative; text-align: left; margin: 0 auto 24px; padding-top: 12px; }
.ai-mode-badge { display: flex; align-items: center; gap: 8px; color: var(--teal); font-size: 12px; font-weight: 650; margin: 0 0 16px; letter-spacing: .045em; }
.ai-mode-badge > span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: #e4ecdb; font-size: 18px; }
.ai-mode-intro h1 { display: block; max-width: calc(100% - 270px); font-size: clamp(34px, 4.5vw, 52px); line-height: 1.08; margin: 0 0 18px; color: var(--navy); text-wrap: balance; }
.ai-mode-intro h1 > span { color: #59754b; }
.ai-mode-intro > p:last-child { max-width: calc(100% - 280px); margin: 0; font-size: 15px; line-height: 1.7; color: #59685c; }
.ai-mode-art { position: absolute; width: 260px; height: 250px; right: 0; top: -8px; pointer-events: none; }
.ai-mode-art img { width: 100%; height: auto; animation: ai-art-arrive .9s ease-out both; }
.ai-mode-art-tag { position: absolute; padding: 8px 12px; border: 1px solid #d5decc; border-radius: 100px; background: #ffffffeb; color: #355a46; font-size: 10px; font-weight: 600; box-shadow: 0 8px 24px #193b3208; white-space: nowrap; animation: ai-art-arrive .8s .15s ease-out both; }
.ai-mode-art-tag-value { left: -8px; top: 82px; transform: rotate(-6deg); }
.ai-mode-art-tag-you { right: 0; bottom: 36px; transform: rotate(5deg); }
.ai-mode-session { display: none; align-items: center; gap: 10px; padding-bottom: 24px; border-bottom: 1px solid #dbe2d4; margin-bottom: 24px; }
.ai-mode-session-icon { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid #d0ddc5; border-radius: 12px; background: #e7eddf; color: var(--green); font-size: 24px; }
.ai-mode-session strong { display: block; color: var(--navy); font-size: 14px; }
.ai-mode-session div > span { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
.ai-mode-session-note { margin-left: auto; font-size: 11px; color: #66765e; }
.ai-mode-session .ai-mode-new-chat { margin-left: 12px; }
.ai-mode .ai-form {
  width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 12px;
  border: 1px solid #d0d8c9; border-radius: 24px; background: #fff;
  padding: 20px 24px; box-shadow: 0 2px 4px #193b3203, 0 16px 48px #193b320c;
  bottom: 20px; z-index: 2; transition: border-color .2s, box-shadow .2s;
}
.ai-mode .ai-form:focus-within { border-color: #809580; box-shadow: 0 0 0 4px #193b320a, 0 16px 48px #193b3212; }
.ai-mode .ai-form textarea { min-width: 0; width: 100%; min-height: 54px; font: 400 17px/1.5 var(--display); padding: 0; background: transparent; color: var(--text); }
.ai-mode .ai-form textarea::placeholder { color: #758173; opacity: 1; }
.ai-mode .ai-form textarea:focus-visible { outline: 0; }
.ai-mode-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ai-mode-compose-hint { display: flex; align-items: center; gap: 7px; font-size: 11px; color: #68785f; }
.ai-mode-compose-hint > span { font-size: 16px; color: #59754b; }
.ai-mode .ai-form .ai-mode-send { position: relative; isolation: isolate; display: flex; align-items: center; gap: 7px; min-height: 44px; padding: 10px 17px; border: 0; border-radius: 100px; background: var(--navy); color: #fff; font: 600 13px/1.4 var(--display); flex-shrink: 0; }
.ai-mode-send svg { width: 18px; height: 18px; }
@property --ai-halo-angle { syntax: "<angle>"; initial-value: 45deg; inherits: false; }
@keyframes ai-halo-orbit { from { --ai-halo-angle: 45deg; } to { --ai-halo-angle: 405deg; } }
.ai-mode-send::before { content: ""; position: absolute; inset: -4px; z-index: -1; border-radius: inherit; background: conic-gradient(from var(--ai-halo-angle,45deg), #adc19c, #dfebd1, #f5e1bd, #e7bda9, #adc19c); filter: blur(7px); opacity: .85; animation: ai-halo-orbit 6s linear infinite; }
.ai-mode-send::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--navy); }
.ai-mode .ai-mode-send:hover::after { background: #2f5645; }
.ai-mode .ai-mode-send:disabled { cursor: wait; }
.ai-mode-examples { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin: 24px 0 28px; }
.ai-mode-examples button { position: relative; text-align: left; font: 400 12px/1.5 var(--display); border: 1px solid #dbe2d4; border-radius: 18px; padding: 22px 20px; color: var(--muted); background: linear-gradient(145deg, #ffffffc9, #ffffff75); cursor: pointer; display: flex; flex-direction: column; align-items: flex-start; transition: transform .2s, background .2s, border-color .2s, box-shadow .2s; }
.ai-mode-examples button > svg { box-sizing: content-box; width: 22px; height: 22px; padding: 10px; border-radius: 13px; background: #eaf0e3; margin-bottom: 16px; fill: none; stroke: var(--teal); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.ai-mode-examples button:nth-child(2) > svg { background: #f3e8dd; stroke: #99543d; }
.ai-mode-examples button:nth-child(3) > svg { background: #e6eeed; stroke: #386d6b; }
.ai-mode-examples strong { color: var(--navy); font-size: 14px; font-weight: 650; margin-bottom: 5px; }
.ai-mode-example-arrow { position: absolute; top: 15px; right: 16px; color: #81917c; font-size: 18px; }
.ai-mode-examples button:hover { background: #fff; border-color: #afbea6; box-shadow: 0 12px 28px #193b320c; transform: translateY(-4px); }
.ai-mode-examples button:hover > svg { transform: rotate(-6deg); }
.ai-mode-wizard-link { margin: -10px 0 24px; text-align: center; }
.ai-mode-wizard { border: 0; background: none; color: var(--teal); cursor: pointer; font: 600 13px var(--display); text-decoration: underline; text-underline-offset: 3px; }
.ai-mode-how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 20px 0; border-top: 1px solid #dbe2d4; }
.ai-mode-how p { position: relative; margin: 0; padding-left: 34px; font-size: 11px; line-height: 1.6; color: var(--muted); }
.ai-mode-how p > span { position: absolute; left: 0; top: 2px; color: #859379; font-size: 11px; font-weight: 600; letter-spacing: .04em; }
.ai-mode-how strong { display: block; color: #4b604a; font-size: 12px; font-weight: 600; }
.ai-mode-disclaimer { font-size: 11px; line-height: 1.6; color: var(--muted); text-align: center; margin: 18px auto 8px; }
.ai-mode-coverage { font-size: 12px; line-height: 1.6; text-align: center; margin: 16px 0; color: var(--muted); }
.ai-mode-coverage span { display: block; font-size: 11px; }
.ai-mode-coverage a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 100px; font-weight: 600; text-decoration: none; transition: background .2s; }
.ai-mode-coverage a:hover { background: #e6eddd; }
.ai-mode-coverage a > span { display: inline; font-size: 14px; }
.ai-mode-coverage svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ai-mode-notes { max-width: 580px; margin: 0 auto; text-align: center; font-size: 11px; line-height: 1.7; color: var(--muted); }
.ai-mode-notes summary { cursor: pointer; display: inline-block; text-decoration: underline; text-underline-offset: 3px; }
.ai-mode-notes p { margin: 10px 0; }
.ai-mode .ai-log { margin: 0; gap: 24px; }
.ai-mode .ai-mode-welcome { display: none; }
.ai-mode.has-conversation { padding-top: 40px; }
.ai-mode.has-conversation .ai-mode-intro, .ai-mode.has-conversation .ai-mode-examples,
.ai-mode.has-conversation .ai-mode-how, .ai-mode.has-conversation .ai-mode-wizard-link,
.ai-mode.has-wizard .ai-mode-intro, .ai-mode.has-wizard .ai-mode-examples,
.ai-mode.has-wizard .ai-mode-how, .ai-mode.has-wizard .ai-mode-wizard-link { display: none; }
.ai-mode.has-conversation .ai-mode-session, .ai-mode.has-wizard .ai-mode-session { display: flex; }
.ai-mode.has-conversation .ai-log { padding-bottom: 32px; }
.ai-mode.has-conversation .ai-msg.bot { box-sizing: border-box; width: 100%; max-width: 100%; background: #fff; border: 1px solid #dfe6d7; border-radius: 6px 24px 24px 24px; padding: 18px 24px 20px; font-size: 15px; line-height: 1.75; box-shadow: 0 1px 2px #193b3208, 0 12px 32px #193b320a; }
.ai-mode.has-conversation .ai-msg.bot::before { content: "Phone Pal"; display: flex; align-items: center; gap: 8px; height: 26px; margin: 0 0 10px; padding-left: 34px; background: url("/assets/logos/buddy.svg#mark") left center / 26px 26px no-repeat; color: var(--teal); font: 650 12px/1 var(--display); letter-spacing: .04em; }
.ai-mode.has-conversation .ai-msg.bot.thinking { width: auto; align-self: flex-start; padding: 12px 18px; border-style: dashed; box-shadow: none; background: #ffffffb3; }
.ai-mode.has-conversation .ai-msg.bot.thinking::before, .ai-mode.has-conversation .ai-msg.bot.ai-wiz::before { content: none; }
.ai-mode.has-conversation .ai-msg.bot.error { background: #fdf6f2; border-color: #ecd3c7; box-shadow: inset 3px 0 0 var(--coral); }
.ai-mode.has-conversation .ai-msg.bot.error::before { color: #9a4a3a; }
.ai-mode.has-conversation .ai-msg.bot .ai-deals { margin: 16px -10px 4px; padding: 10px; border-radius: 18px; background: #f3f6ee; }
.ai-mode.has-conversation .ai-msg.bot .ai-deal { border-color: #e2e8db; }
.ai-mode.has-conversation .ai-msg.bot .ai-feedback { margin: 16px -24px -20px; padding: 10px 24px; border-top: 1px solid #edf1e8; border-radius: 0 0 24px 24px; background: #fafbf7; color: var(--muted); font-size: 13px; }
.ai-mode.has-conversation .ai-msg.bot .ai-feedback button { min-height: 34px; padding: 4px 12px; border-radius: 100px; font-size: 13px; }
.ai-mode.has-conversation .ai-msg.user { background: #e7eddf; color: var(--text); border: 0; border-radius: 20px 20px 4px 20px; padding: 12px 18px; font-size: 15px; line-height: 1.65; max-width: 85%; }
.ai-mode .ai-msg:not(.ai-mode-welcome) { animation: ai-message-arrive .3s ease-out both; }
.ai-mode.has-conversation .ai-msg.thinking { display: flex; align-items: center; gap: 10px; color: #68785f; }
.ai-mode .ai-msg.thinking .spinner { flex-shrink: 0; border-color: #d5dfcc; border-top-color: var(--green); }
.ai-mode.is-thinking .ai-form { border-color: #a8b89b; }
.ai-mode .ai-deals { gap: 12px; margin: 20px 0 12px; }
.ai-mode .ai-deal { border-radius: 18px; padding: 20px; line-height: 1.5; transition: border-color .2s, box-shadow .2s, transform .2s; }
.ai-mode .ai-deal:hover { border-color: #b1c1a6; box-shadow: 0 8px 24px #193b3209; transform: translateY(-2px); }
.ai-mode .ai-deal.ai-top { border-color: #9fb294; background: linear-gradient(120deg, #f6faf2, #fff 50%); box-shadow: inset 3px 0 0 var(--green), 0 6px 24px #193b3206; }
.ai-mode .ai-feedback { margin-top: 14px; }
.ai-signal { margin: 18px 0 16px; padding: 20px; border: 1px solid #d5dfd1; border-radius: 18px; background: #f7faf4; color: var(--text); line-height: 1.5; }
.ai-signal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ai-signal-header h2 { margin: 0; color: var(--navy); font: 600 15px/1.35 var(--display); }
.ai-signal .ai-signal-header p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.ai-signal-source { flex-shrink: 0; padding: 4px 9px; border-radius: 100px; background: #e7efe4; color: #355a46; font-size: 10px; font-weight: 600; white-space: nowrap; }
.ai-signal-networks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; list-style: none; margin: 16px 0; padding: 0; }
.ai-signal-networks li { min-width: 0; padding: 11px 12px; border: 1px solid #e2e8de; border-radius: 11px; background: #fff; }
.ai-signal-network { display: flex; align-items: center; justify-content: space-between; gap: 6px; color: var(--navy); font-size: 13px; }
.ai-signal-dot { width: 8px; height: 8px; flex-shrink: 0; border-radius: 50%; background: #8c938d; }
.ai-signal-dot.indoor { background: #55876a; }
.ai-signal-dot.outdoor { background: #bf914d; }
.ai-signal-dot.none { background: #af726a; }
.ai-signal-rating, .ai-signal-incomplete { display: block; margin-top: 3px; color: #506253; font-size: 12px; }
.ai-signal-incomplete { color: #765d3a; font-size: 11px; }
.ai-signal .ai-signal-message { margin: 12px 0 0; color: #506253; font-size: 12px; line-height: 1.55; }
.ai-signal .ai-signal-warning { margin: 12px 0 0; padding: 10px 12px; border-left: 3px solid #bd8c4b; border-radius: 4px; background: #fbf3e7; color: #694d2e; font-size: 12px; line-height: 1.55; }
.ai-signal-footer { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-top: 14px; padding-top: 12px; border-top: 1px solid #e1e9dd; color: var(--muted); font-size: 11px; }
.ai-signal-footer a { color: var(--teal); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
@keyframes ai-art-arrive { from { opacity: 0; translate: 0 10px; } to { opacity: 1; translate: 0 0; } }
@keyframes ai-message-arrive { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  .ai-mode *, .ai-mode *::before, .ai-mode *::after { animation: none !important; transition: none !important; }
  .ai-mode-examples button:hover, .ai-mode-examples button:hover > svg, .ai-mode .ai-deal:hover { transform: none; }
  .ai-mode-page { scroll-behavior: auto; }
}
@media (max-width: 800px) {
  .ai-mode-art { width: 210px; top: 8px; }
  .ai-mode-art-tag { font-size: 9px; padding: 6px 9px; }
  .ai-mode-art-tag-you { bottom: 65px; }
  .ai-mode-intro h1 { max-width: calc(100% - 210px); font-size: 38px; }
  .ai-mode-intro > p:last-child { max-width: calc(100% - 220px); font-size: 14px; }
  .ai-mode-how { gap: 12px; }
}
@media (max-width: 600px) {
  .ai-mode-header { padding: 18px 20px; gap: 12px; }
  .ai-mode-brand { gap: 12px; }
  .ai-mode-brand img { width: 142px; }
  .ai-mode-brand > span { display: none; }
  .ai-mode-header-actions { gap: 10px; }
  .ai-mode-beta { font-size: 10px; padding: 4px 8px; }
  .ai-mode-new-chat { font-size: 11px; gap: 4px; padding: 6px 10px; }
  .ai-mode { padding: 28px 20px 24px; }
  .ai-mode-intro { margin-bottom: 22px; min-height: 0; padding-top: 0; }
  .ai-mode-badge { min-height: 78px; margin-bottom: 12px; }
  .ai-mode-art { width: 116px; height: 104px; top: -12px; right: 0; }
  .ai-mode-art-tag { display: none; }
  .ai-mode-intro h1 { font-size: clamp(30px, 8.5vw, 42px); max-width: 100%; margin: 0 0 14px; }
  .ai-mode-intro > p:last-child { max-width: 100%; font-size: 14px; }
  .ai-mode-intro > p:last-child br { display: none; }
  .ai-mode .ai-form { padding: 18px; border-radius: 20px; bottom: 12px; }
  .ai-mode .ai-form textarea { font-size: 16px; min-height: 54px; }
  .ai-mode .ai-form .ai-mode-send { font-size: 12px; padding: 10px 12px; }
  .ai-mode-toolbar { gap: 8px; }
  .ai-mode-compose-hint { font-size: 10px; max-width: 180px; line-height: 1.5; }
  .ai-mode-examples { grid-template-columns: 1fr; gap: 8px; margin: 20px 0 24px; }
  .ai-mode-examples button { padding: 14px 38px 14px 48px; min-height: 68px; justify-content: center; }
  .ai-mode-examples button > svg { position: absolute; left: 10px; top: 18px; margin: 0; width: 19px; height: 19px; padding: 6px; border-radius: 9px; }
  .ai-mode-example-arrow { top: 23px; }
  .ai-mode-how { grid-template-columns: 1fr; gap: 14px; padding: 20px 0 12px; }
  .ai-mode-how p { padding-left: 32px; }
  .ai-mode-how strong { display: inline; margin-right: 4px; }
  .ai-mode-session-note { display: none; }
  .ai-mode-session .ai-mode-new-chat { margin-left: auto; }
  .ai-mode.has-conversation { padding-top: 24px; }
  .ai-mode.has-conversation .ai-msg.user { max-width: 92%; }
  .ai-mode .ai-deal { padding: 14px; }
  .ai-mode.has-conversation .ai-msg.bot { padding: 14px 16px 16px; border-radius: 6px 20px 20px 20px; }
  .ai-mode.has-conversation .ai-msg.bot .ai-deals { margin-inline: -8px; padding: 8px; }
  .ai-mode.has-conversation .ai-msg.bot .ai-feedback { margin: 14px -16px -16px; padding: 10px 16px; border-radius: 0 0 20px 20px; }
  .ai-signal { padding: 16px; }
  .ai-signal-networks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 360px) {
  .ai-mode-beta { display: none; }
  .ai-mode .ai-form .ai-mode-send { gap: 4px; }
}
