/* SEO's dark glass surface is scoped to this route. */
body.seo-mode { background: #0a0910; color: #f2eff9; color-scheme: dark; }
body.seo-mode #topbarProjectSwitcher { display: none !important; }
body.seo-mode .content { min-width: 0; background: radial-gradient(ellipse at 25% 0%, #6f3ca220, transparent 53%), radial-gradient(ellipse at 65% 100%, #4a206b19, transparent 55%), #0a0910; }
body.seo-mode .sidebar { background: #13111bbf; border-color: #ffffff0d; box-shadow: -14px 0 50px #00000026; backdrop-filter: blur(28px); }
body.seo-mode .menu-item { color: #aaa3b9; }
body.seo-mode .menu-item:hover { background: #ffffff08; color: #fff; }
body.seo-mode .menu-item.active { color: #f4eaff; background: linear-gradient(110deg, #704ba94d, #9e71d52b); border: 1px solid #b88be929; box-shadow: inset 0 1px #ffffff12, 0 8px 25px #34114c40; }
body.seo-mode .sidebar-footer { background: #ffffff04; border-color: #ffffff0d; }
body.seo-mode .admin-avatar { background: #a575cf1c; border: 1px solid #c7a1ef19; }
body.seo-mode .admin-name, body.seo-mode .admin-title { color: #92899f; border-color: #ffffff0d; }
body.seo-mode .project-switcher-track { background: #ffffff07; border: 1px solid #ffffff0c; box-shadow: inset 0 1px #ffffff0c; }
body.seo-mode .header-project-button { background: linear-gradient(110deg, #593a82, #9e73c7); box-shadow: 0 5px 25px #6d379a20; color: #fff; }
body.seo-mode .status-pill { background: #9c7cc215; color: #d8c4ed; border: 1px solid #b98ce821; }
body.seo-mode .avatar-circle { background: #8863ac36; color: #dbc2f3; }
body.seo-mode .hamburger { background: #ffffff0d; border-color: #ffffff13; }
body.seo-mode .hamburger span { background: #dfcfee; }
#seoView { --seo-text: #eeeaf6; --seo-muted: #a59bb4; --seo-line: #e0ceff18; --seo-purple: #c8a4f4; display: none; position: relative; min-width: 0; color: var(--seo-text); font-family: inherit; }
#seoView.active { display: flex; flex-direction: column; min-height: calc(100dvh - 130px); }
#seoView *, #seoView *::before, #seoView *::after { box-sizing: border-box; }
#seoView [hidden] { display: none !important; }
#seoView button, #seoView input, #seoView textarea, #seoView select { font: inherit; }
#seoView button { cursor: pointer; }
#seoView button:disabled { opacity: .45; cursor: wait; }
#seoView button:focus-visible, #seoView input:focus-visible, #seoView textarea:focus-visible, #seoView select:focus-visible, #seoView summary:focus-visible, #seoView a:focus-visible { outline: 2px solid #c4a1f0; outline-offset: 4px; }
#seoView .seo-head { display: flex; align-items: center; justify-content: flex-end; gap: 20px; padding: 14px 6px 24px; }
#seoView .seo-title-line { display: flex; align-items: center; gap: 14px; }
#seoView .seo-title-line h1 { font-size: 30px; font-weight: 700; letter-spacing: -.8px; line-height: 1.2; margin: 0; direction: ltr; }
#seoView .seo-orbit { width: 9px; height: 9px; border-radius: 50%; background: #d3b5ff; box-shadow: 0 0 15px #bd8dffb3, 0 0 35px #a15bdf73; }
#seoView .seo-head-divider { width: 1px; height: 20px; background: #d8c1ff24; }
#seoView .seo-head-caption { color: #c4b8d5; font-size: 14px; }
#seoView .seo-head p { color: var(--seo-muted); font-size: 13px; margin: 13px 23px 0 0; }
#seoView .seo-icon-button { width: 44px; height: 44px; border: 1px solid #d7bdff22; background: linear-gradient(145deg, #ffffff0c, #ffffff03); border-radius: 15px; color: #dfd3ef; display: inline-flex; justify-content: center; align-items: center; font-size: 26px; flex-shrink: 0; box-shadow: inset 0 1px #ffffff0b; }
#seoView svg { width: 22px; height: 22px; flex-shrink: 0; }
#seoView .seo-workspace { position: relative; display: flex; flex: 1; flex-direction: column; min-height: 560px; width: min(100%, 1040px); align-self: center; }
#seoView .seo-empty { margin: auto; padding: 36px 18px 64px; text-align: center; }
#seoView .seo-pen { width: 86px; height: 86px; margin: 0 auto 28px; display: grid; place-items: center; border-radius: 28px; color: #d6bcf8; background: linear-gradient(140deg, #b883ef20, #ffffff03 60%); border: 1px solid #dcc4ff26; box-shadow: 0 0 70px #a255da13, inset 0 1px #ffffff15; transform: rotate(-7deg); }
#seoView .seo-pen svg { width: 38px; height: 38px; transform: rotate(7deg); }
#seoView .seo-empty h2 { font-size: clamp(26px, 2.8vw, 38px); font-weight: 700; line-height: 1.6; margin: 0 0 14px; letter-spacing: -.7px; color: #f0e8fb; }
#seoView .seo-empty p { color: var(--seo-muted); font-size: 14px; line-height: 2.05; margin: 0; }
#seoView .seo-suggestions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 30px; }
#seoView .seo-suggestions button { border-radius: 20px; background: #ffffff04; color: #bdb0ce; border: 1px solid #c7a4ed1f; padding: 9px 15px; font-size: 12px; transition: background .2s, border-color .2s; }
#seoView .seo-suggestions button:hover { background: #ab7ae018; border-color: #c7a4ed55; color: #e7d9f8; }
#seoView .seo-composer-wrap { width: min(100%, 920px); margin: auto auto 0; padding: 8px 0 10px; }
#seoView .seo-context { display: flex; align-items: center; gap: 7px; color: #92859f; font-size: 11px; padding: 0 16px 11px; flex-wrap: wrap; }
#seoView .seo-reference-dot { background: #b38ad8; height: 5px; width: 5px; border-radius: 50%; box-shadow: 0 0 9px #c38aee65; }
#seoView .seo-config { margin-right: auto; direction: ltr; overflow-wrap: anywhere; max-width: 60%; }
#seoView .seo-composer { border-radius: 26px; padding: 17px 18px 13px; border: 1px solid #ba92e13d; background: linear-gradient(125deg, #8b5bba15, #e9d2ff07 45%, #80509c13); backdrop-filter: blur(24px) saturate(130%); -webkit-backdrop-filter: blur(24px) saturate(130%); box-shadow: 0 15px 55px #0003, 0 0 48px #9b48d40b, inset 0 1px #edd7ff16; }
#seoView textarea { background: transparent; border: 0; color: #eae3f3; resize: vertical; width: 100%; line-height: 1.9; padding: 2px 4px; outline: none; min-width: 0; }
#seoView textarea::placeholder { color: #9685a9; opacity: 1; }
#seoView #seoInput { font-size: 15px; min-height: 58px; max-height: 190px; resize: none; }
#seoView .seo-composer-actions { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
#seoView .seo-composer-actions > span { color: #776b86; font-size: 10px; }
#seoView .seo-send { width: 42px; height: 42px; border: 1px solid #e9d5ff44; border-radius: 15px; display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(145deg, #cdaaf0, #9063bc); color: #21132d; box-shadow: inset 0 1px #fff5, 0 4px 18px #8955bc38; flex-shrink: 0; }
#seoView .seo-send:hover { filter: brightness(1.1); }
#seoView .seo-text-button { border: 0; color: #ad97c5; font-size: 11px; background: transparent; padding: 7px; }
#seoView #seoNewChat { margin-right: auto; }
#seoView .seo-status { font-size: 11px; color: #bba4d1; line-height: 1.9; min-height: 21px; margin: 8px 12px 0; }
#seoView .seo-status.is-error { color: #f4a5bc; }
#seoView .seo-thread:empty { display: none; }
#seoView .seo-thread { width: min(100%, 880px); margin: 0 auto; padding: 14px 4px 24px; }
#seoView .seo-message { padding: 22px 24px; margin: 0 0 24px; border: 1px solid var(--seo-line); border-radius: 24px; overflow-wrap: anywhere; }
#seoView .seo-message-user { background: #b081df10; max-width: 85%; margin-left: auto; border-color: #b88ee822; }
#seoView .seo-message-user > p { color: #ddd0eb; white-space: pre-wrap; line-height: 1.9; margin-bottom: 0; }
#seoView .seo-message-assistant { background: linear-gradient(135deg, #ffffff05, #ffffff02); backdrop-filter: blur(16px); box-shadow: inset 0 1px #ffffff08; }
#seoView .seo-message-label { color: #a992c0; font-size: 11px; margin-bottom: 12px; }
#seoView .seo-markdown { line-height: 2.15; font-size: 15px; color: #d2c9dd; }
#seoView .seo-markdown h1 { font-size: 27px; line-height: 1.7; color: #f1e7fc; margin: 8px 0 26px; }
#seoView .seo-markdown h2 { color: #e6d5f8; font-size: 21px; line-height: 1.8; margin: 30px 0 12px; }
#seoView .seo-markdown h3 { font-size: 17px; margin: 22px 0 9px; color: #d4bce9; }
#seoView .seo-markdown p { margin: 0 0 16px; }
#seoView .seo-markdown ul, #seoView .seo-markdown ol { padding-right: 23px; }
#seoView .seo-markdown a { color: #c9a1ef; text-decoration: underline; text-underline-offset: 4px; }
#seoView .seo-markdown blockquote { border-right: 2px solid #aa7ad1; background: #9d69c70b; margin: 18px 0; padding: 12px 18px; }
#seoView .seo-markdown pre { white-space: pre-wrap; direction: ltr; background: #0003; padding: 16px; border-radius: 12px; font-size: 12px; }
#seoView .seo-table-wrap { max-width: 100%; overflow: auto; margin: 20px 0; border: 1px solid var(--seo-line); border-radius: 13px; }
#seoView table { width: 100%; border-collapse: collapse; font-size: 13px; }
#seoView th, #seoView td { padding: 12px; border-bottom: 1px solid var(--seo-line); text-align: right; min-width: 110px; }
#seoView th { background: #a477c415; color: #e1cbed; }
#seoView .seo-sources { border-top: 1px solid var(--seo-line); padding-top: 16px; margin-top: 24px; font-size: 12px; color: #bda5d0; }
#seoView summary { cursor: pointer; }
#seoView .seo-sources a { display: block; color: #bda5d0; padding: 8px 0; }
#seoView .seo-research-note { color: #b5a0b9; font-size: 11px; margin-top: 15px; line-height: 1.9; }
#seoView .seo-copy { margin-top: 12px; }
#seoView .seo-thinking { color: #c3a3df; font-size: 13px; padding: 16px; border-right: 2px solid #a273cf; margin: 15px 0; }
#seoView .seo-update-launch { position: fixed; left: 24px; bottom: 14px; z-index: 10005; display: inline-flex; align-items: center; gap: 9px; padding: 12px 18px; color: #d9c6ed; border: 1px solid #c7a4ed30; border-radius: 18px; background: linear-gradient(145deg, #30213cce, #19131fdb); backdrop-filter: blur(24px); box-shadow: 0 6px 30px #0004, inset 0 1px #fff1; font-size: 13px; }
#seoView .seo-update-dot { width: 5px; height: 5px; border-radius: 50%; background: #cb99f3; }
#seoView .seo-update-panel { position: fixed; left: 24px; bottom: 24px; width: min(390px, calc(100vw - 48px)); max-height: calc(100dvh - 120px); z-index: 10020; display: flex; flex-direction: column; border-radius: 25px; border: 1px solid #c9a0ed38; background: linear-gradient(150deg, #2b1d36e8, #17121feb 55%); backdrop-filter: blur(34px) saturate(140%); -webkit-backdrop-filter: blur(34px) saturate(140%); box-shadow: 0 20px 90px #0008, 0 0 70px #843aba13, inset 0 1px #ead2ff1c; padding: 21px; }
#seoView .seo-update-panel header, #seoView .seo-modal-panel header { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 22px; }
#seoView .seo-update-panel h2, #seoView .seo-modal-panel h2 { color: #f1e5fc; font-size: 23px; margin: 6px 0 0; }
#seoView .seo-panel-eyebrow { font-size: 11px; color: #a894bb; }
#seoView .seo-update-messages { min-height: 140px; max-height: 265px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #9c70b74d transparent; font-size: 13px; line-height: 2; }
#seoView .seo-update-intro { color: #b7a8c5; margin: 0 0 16px; }
#seoView .seo-update-example { border-right: 2px solid #b787dd55; padding: 8px 12px; color: #a996b9; }
#seoView .seo-update-user { padding: 9px 12px; border-radius: 13px; background: #b784da16; margin: 10px 0; color: #decaed; }
#seoView .seo-update-reply { padding: 10px 0; color: #c4abd8; margin: 4px 0; }
#seoView .seo-rules-details { color: #9985ad; font-size: 11px; padding: 14px 0; border-top: 1px solid var(--seo-line); margin-top: 16px; }
#seoView .seo-rules-details summary { display: flex; justify-content: space-between; gap: 10px; }
#seoView .seo-rules-details pre { font: inherit; white-space: pre-wrap; max-height: 120px; overflow: auto; line-height: 1.9; color: #bdabcd; }
#seoView .seo-update-form { display: flex; gap: 10px; align-items: flex-end; padding: 10px; border: 1px solid #d2aff02b; border-radius: 17px; background: #ffffff04; }
#seoView .seo-update-form textarea { font-size: 12px; min-height: 46px; resize: none; }
#seoView .seo-update-form .seo-send { width: 36px; height: 36px; border-radius: 12px; order: -1; }
#seoView .seo-modal { position: fixed; inset: 0; z-index: 10040; background: #08060c9c; backdrop-filter: blur(12px); display: flex; align-items: center; justify-content: center; padding: 22px; }
#seoView .seo-modal-panel { width: min(100%, 440px); max-height: calc(100dvh - 44px); overflow: auto; padding: 28px; border: 1px solid #cfa3f231; background: linear-gradient(145deg, #30213bed, #17121ff5 65%); border-radius: 27px; box-shadow: 0 20px 90px #0008, inset 0 1px #fff1; }
#seoView .seo-modal-panel label { color: #ccbadb; font-size: 12px; display: block; margin: 18px 0 9px; }
#seoView .seo-modal-panel select, #seoView .seo-modal-panel input { width: 100%; min-height: 45px; min-width: 0; border-radius: 13px; border: 1px solid #b990d729; background: #07040f35; padding: 10px 13px; color: #ecdef7; font-size: 13px; }
#seoView .seo-modal-panel input { direction: ltr; text-align: left; }
#seoView .seo-modal-panel select option { color: #efdefd; background: #20172b; }
#seoView .seo-model-label { display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; }
#seoView .seo-field-hint { font-size: 11px; line-height: 1.9; color: #9683a9; margin-top: 12px; }
#seoView .seo-primary { color: #25142e; border: 1px solid #e2c9fa42; background: linear-gradient(135deg, #cfaef1, #a577cc); border-radius: 13px; padding: 12px 20px; font-size: 12px; }
#seoView .seo-settings-footer { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--seo-line); }
#seoView .seo-settings-footer > span { font-size: 10px; color: #8d7b9d; }
#seoView .seo-mobile-update { display: none; }
@media (max-width: 900px) {
  #seoView .seo-composer-actions > span { display: none; }
  #seoView .seo-head-caption { font-size: 12px; }
}
@media (max-width: 768px) {
  body.seo-mode .topbar { background: linear-gradient(140deg, #30233bd9, #17131fe8); border-color: #d7bdff1a; box-shadow: 0 12px 45px #0006; }
  body.seo-mode .content { padding: 14px 12px 105px; min-height: 100dvh; }
  body.seo-mode .sidebar { background: #16111ff5; }
  #seoView.active { min-height: calc(100dvh - 125px); }
  #seoView .seo-head { padding: 10px 5px 22px; }
  #seoView .seo-title-line { gap: 10px; }
  #seoView .seo-title-line h1 { font-size: 26px; }
  #seoView .seo-head p { font-size: 11px; margin-right: 18px; }
  #seoView .seo-icon-button { width: 40px; height: 40px; border-radius: 13px; }
  #seoView .seo-workspace { min-height: calc(100dvh - 230px); }
  #seoView .seo-empty { padding: 30px 8px 46px; }
  #seoView .seo-pen { width: 70px; height: 70px; margin-bottom: 22px; border-radius: 23px; }
  #seoView .seo-empty h2 { font-size: 27px; }
  #seoView .seo-empty p { font-size: 12px; }
  #seoView .seo-suggestions { gap: 7px; margin-top: 24px; }
  #seoView .seo-suggestions button { font-size: 10px; padding: 8px 11px; }
  #seoView .seo-context { font-size: 10px; padding: 0 8px 10px; }
  #seoView .seo-config { max-width: 53%; font-size: 9px; }
  #seoView .seo-composer { border-radius: 22px; padding: 14px 14px 11px; }
  #seoView #seoInput { font-size: 13px; }
  #seoView .seo-composer-wrap { padding-bottom: 0; }
  #seoView .seo-update-launch { display: none; }
  #seoView .seo-mobile-update { display: flex; width: 100%; align-items: center; gap: 10px; padding: 15px 0 5px; background: none; border: 0; border-top: 1px solid var(--seo-line); color: #d3b8ea; font-size: 12px; margin-top: 16px; }
  #seoView .seo-mobile-update > span:last-child { margin-right: auto; }
  #seoView .seo-update-panel { left: 12px; right: 12px; bottom: 96px; width: auto; max-height: calc(100dvh - 125px); padding: 19px; }
  #seoView .seo-modal { padding: 14px; }
  #seoView .seo-modal-panel { padding: 23px; border-radius: 23px; max-height: calc(100dvh - 28px); }
  #seoView .seo-message { padding: 18px 16px; border-radius: 20px; }
  #seoView .seo-message-user { max-width: 93%; }
  #seoView .seo-markdown { font-size: 13px; }
  #seoView .seo-markdown h1 { font-size: 23px; }
  #seoView .seo-markdown h2 { font-size: 19px; }
  #seoView .seo-markdown h3 { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { #seoView * { scroll-behavior: auto !important; transition: none !important; } }

#seoView .seo-learning-status { margin: 0; padding: 8px 18px; color: #d8c7ff; font-size: 11px; line-height: 1.8; border-top: 1px solid rgba(180,140,255,.12); }

/* The conversation archive is physically left of the RTL writing surface. */
#seoView .seo-layout { display: grid; direction: ltr; grid-template-columns: 250px minmax(0, 1fr); gap: 26px; width: 100%; flex: 1; align-items: start; }
#seoView .seo-main { direction: rtl; min-width: 0; display: flex; flex-direction: column; min-height: calc(100dvh - 150px); }
#seoView .seo-workspace { min-width: 0; width: 100%; min-height: 580px; flex: 1; }
#seoView .seo-conversations { direction: rtl; position: sticky; top: 20px; min-width: 0; border: 1px solid #caa6f222; background: linear-gradient(145deg, #a56cdd0d, #ffffff03); border-radius: 22px; padding: 20px 14px; display: flex; flex-direction: column; max-height: calc(100dvh - 170px); box-shadow: inset 0 1px #ffffff07; backdrop-filter: blur(22px); }
#seoView .seo-conversations > header { display: flex; align-items: center; justify-content: space-between; padding: 0 6px 16px; }
#seoView .seo-conversations h2 { color: #e6d7f5; font-size: 20px; margin: 4px 0 0; }
#seoView .seo-create-chat { width: 100%; border: 1px solid #b78bdf40; border-radius: 13px; padding: 11px 14px; color: #e2cefa; background: #9560c51a; text-align: right; margin-bottom: 16px; }
#seoView .seo-conversation-list { overflow-y: auto; min-height: 120px; scrollbar-width: thin; scrollbar-color: #9b72c04d transparent; }
#seoView .seo-conversation-item { display: flex; flex-direction: column; gap: 8px; width: 100%; border: 1px solid transparent; border-radius: 13px; padding: 12px; margin-bottom: 6px; background: transparent; color: #b8acc8; text-align: right; }
#seoView .seo-conversation-item:hover { background: #a16ed712; }
#seoView .seo-conversation-item[aria-current="true"] { background: linear-gradient(120deg, #a775d324, #bb8df010); color: #f0e0ff; border-color: #ba8ce332; }
#seoView .seo-conversation-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.8; font-size: 12px; overflow-wrap: anywhere; }
#seoView .seo-conversation-item small { color: #8e7e9f; font-size: 10px; }
#seoView .seo-history-note, #seoView .seo-history-empty { color: #8f7f9f; font-size: 11px; line-height: 1.9; padding: 12px 6px 0; }
#seoView .seo-history-note { border-top: 1px solid #d0b4ee16; margin-top: 12px; }
#seoView .seo-head-actions { display: flex; gap: 8px; }
#seoView .seo-history-open, #seoView .seo-history-close, #seoView .seo-history-backdrop { display: none; }
#seoView .seo-message { padding: 20px; }
#seoView .seo-empty { padding-left: 10px; padding-right: 10px; }
#seoView .seo-empty h2 { font-size: clamp(24px, 2.5vw, 34px); }
@media (max-width: 1150px) and (min-width: 981px) { #seoView .seo-layout { grid-template-columns: 210px minmax(0, 1fr); gap: 16px; } }
@media (max-width: 980px) {
  #seoView .seo-layout { display: block; }
  #seoView .seo-main { min-height: calc(100dvh - 180px); }
  #seoView .seo-workspace { min-height: 500px; }
  #seoView .seo-history-open, #seoView .seo-history-close { display: inline-flex; }
  #seoView .seo-conversations { display: none; position: fixed; top: 88px; left: 12px; bottom: 102px; width: min(320px, calc(100vw - 24px)); max-height: none; z-index: 10018; background: linear-gradient(145deg, #261932f5, #13101cf7); box-shadow: 0 20px 80px #0008; }
  #seoView .seo-conversations.is-open { display: flex; }
  #seoView .seo-history-backdrop:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 10017; background: #07050c80; border: 0; backdrop-filter: blur(3px); }
  #seoView .seo-head { gap: 10px; }
  #seoView .seo-head-actions { flex-shrink: 0; }
}
/* SEO has its own viewport frame; only its content panes scroll. */
body.seo-mode { margin: 0; height: 100dvh; overflow: hidden; overscroll-behavior: none; }
body.seo-mode .app { height: 100dvh; min-height: 0; max-height: 100dvh; overflow: hidden; }
body.seo-mode .content { height: 100%; min-height: 0; display: flex; flex-direction: column; padding: 16px 24px; overflow: hidden; }
body.seo-mode .topbar { flex: 0 0 auto; margin-bottom: 14px; }
body.seo-mode .sidebar { height: 100%; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
#seoView.active { flex: 1 1 0; min-height: 0; height: 100%; overflow: hidden; }
#seoView .seo-layout { flex: 1 1 0; height: 100%; min-height: 0; align-items: stretch; }
#seoView .seo-main { height: 100%; min-height: 0; overflow: hidden; }
#seoView .seo-head { flex: 0 0 auto; padding: 8px 6px 16px; }
#seoView .seo-workspace { flex: 1 1 0; height: 100%; min-height: 0; overflow: hidden; }
#seoView .seo-thread { position: relative; flex: 1 1 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; overflow-anchor: none; margin: 0 auto; scrollbar-width: thin; scrollbar-color: #a376cc55 transparent; }
#seoView .seo-empty { flex: 1 1 0; min-height: 0; overflow-y: auto; margin: 0; padding: 24px 12px; }
#seoView .seo-composer-wrap { flex: 0 0 auto; margin: 0 auto; padding: 10px 0 0; }
#seoView #seoInput { max-height: min(160px, 20dvh); }
#seoView .seo-conversations { min-height: 0; }
#seoView .seo-conversation-list { flex: 1 1 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
#seoView .seo-conversations > header, #seoView .seo-create-chat, #seoView .seo-history-note { flex: 0 0 auto; }
#seoView .seo-create-chat { display: flex; align-items: center; gap: 6px; }
#seoView .seo-conversations > header { gap: 8px; padding: 0 0 16px; }
#seoView .seo-conversations > header > div { min-width: 0; }
#seoView .seo-articles-toggle { width: 36px; height: 36px; border-radius: 12px; }
@media (min-width: 981px) {
  body.seo-mode .content { padding-left: 0; }
  body.seo-mode .topbar { margin-left: 24px; }
  #seoView .seo-conversations { position: relative; top: 0; height: 100%; max-height: none; padding: 18px 12px 76px; border-radius: 0; border-width: 0 1px 0 0; box-shadow: none; }
  #seoView .seo-history-note { margin: 12px 0 0; }
  #seoView.articles-collapsed .seo-layout { grid-template-columns: 64px minmax(0, 1fr); gap: 20px; }
  #seoView.articles-collapsed .seo-conversations { padding: 14px 8px 76px; align-items: center; }
  #seoView.articles-collapsed .seo-conversations > header { justify-content: center; padding: 0 0 12px; }
  #seoView.articles-collapsed .seo-conversations > header > div,
  #seoView.articles-collapsed .seo-conversation-list,
  #seoView.articles-collapsed .seo-history-note,
  #seoView.articles-collapsed .seo-create-label { display: none; }
  #seoView.articles-collapsed .seo-create-chat { width: 44px; height: 44px; padding: 0; justify-content: center; font-size: 24px; }
  #seoView.articles-collapsed .seo-articles-toggle svg { transform: rotate(180deg); }
  #seoView .seo-update-launch { left: 16px; bottom: 26px; }
  #seoView.articles-collapsed .seo-update-launch { left: 10px; width: 44px; height: 44px; padding: 10px; justify-content: center; }
  #seoView.articles-collapsed .seo-update-launch span { display: none; }
}
@media (max-width: 980px) {
  body.seo-mode .content { padding: 8px 14px 104px; }
  #seoView .seo-layout { display: block; }
  #seoView .seo-conversations { top: 80px; bottom: 100px; height: auto; padding: 18px 14px; }
  #seoView .seo-articles-toggle { display: none; }
  #seoView .seo-update-launch { display: none; }
  #seoView .seo-mobile-update { display: flex; }
  #seoView .seo-head { padding-top: 4px; padding-bottom: 12px; }
  #seoView .seo-composer-wrap { padding-top: 8px; }
  #seoView .seo-status { margin-top: 4px; }
  #seoView .seo-pen { width: 64px; height: 64px; margin-bottom: 16px; }
  #seoView .seo-empty { padding: 16px 10px; }
}

#seoView #seoInput:focus, #seoView #seoInput:focus-visible { outline: none; outline-offset: 0; box-shadow: none; }

/* Both article states scroll natively without a visible scroll indicator. */
#seoView .seo-thread, #seoView .seo-empty { scrollbar-width: none; -ms-overflow-style: none; }
#seoView .seo-thread::-webkit-scrollbar, #seoView .seo-empty::-webkit-scrollbar { display: none; width: 0; height: 0; }

/* Settings belong to the bottom action row of the articles drawer. */
#seoView .seo-history-actions { position: absolute; left: 12px; right: 12px; bottom: 10px; display: flex; direction: ltr; align-items: center; justify-content: space-between; gap: 10px; }
#seoView .seo-history-actions .seo-update-launch { position: static; left: auto; bottom: auto; min-height: 48px; padding: 12px 14px; }
#seoView .seo-history-actions #seoSettingsOpen { width: 44px; height: 48px; margin-left: auto; flex: 0 0 44px; }
@media (min-width: 981px) {
  #seoView .seo-head { display: none; }
  #seoView.articles-collapsed .seo-history-actions { left: 10px; right: 10px; }
  #seoView.articles-collapsed .seo-history-actions #seoSettingsOpen { display: none; }
  #seoView.articles-collapsed .seo-history-actions .seo-update-launch { width: 44px; min-height: 44px; height: 44px; padding: 10px; }
}
@media (max-width: 980px) {
  #seoView .seo-conversations { padding-bottom: 76px; }
  #seoView .seo-history-actions { justify-content: flex-end; }
}

/* Article keyword requirements */
#seoView .seo-keyword-row input:focus,
#seoView .seo-keyword-row input:focus-visible { outline: none; outline-offset: 0; box-shadow: none; }
.seo-keywords-open{white-space:nowrap;direction:ltr;border:1px solid var(--seo-line,rgba(200,180,230,.2));border-radius:10px;padding:8px 12px!important}
.seo-keywords-panel{max-width:620px!important}.seo-keywords-labels,.seo-keyword-row{display:grid;grid-template-columns:minmax(0,1fr) 110px 38px;gap:10px;align-items:center}.seo-keywords-labels{font-size:12px;color:var(--seo-muted);margin:14px 0 8px}.seo-keyword-rows{display:grid;gap:10px;max-height:45dvh;overflow-y:auto;scrollbar-width:none}.seo-keyword-row input{min-width:0;width:100%;margin:0!important}.seo-keyword-row .seo-icon-button{width:36px;height:36px}.seo-keyword-report{margin:16px 0;padding:12px 16px;border:1px solid rgba(180,150,230,.2);border-radius:14px;background:rgba(130,100,190,.06)}.seo-keyword-report p{font-size:13px;margin:8px 0}.seo-keywords-panel #seoKeywordAdd{margin-top:12px}@media(max-width:600px){.seo-keywords-labels,.seo-keyword-row{grid-template-columns:minmax(0,1fr) 84px 32px;gap:6px}.seo-composer-actions>span{display:none}.seo-keywords-open{padding:7px 9px!important}}


/* Article navigation spans the entire viewport, including the header area. */
@media(min-width:981px){
 body.seo-mode{--seo-rail-width:250px;--seo-rail-gap:26px}
 body.seo-mode:has(#seoView.articles-collapsed){--seo-rail-width:64px;--seo-rail-gap:20px}
 body.seo-mode .topbar{margin-left:calc(var(--seo-rail-width) + var(--seo-rail-gap))}
 #seoView .seo-main{grid-column:2;grid-row:1}
 #seoView .seo-conversations{position:fixed;left:0;top:0;bottom:0;width:var(--seo-rail-width);height:100dvh;max-height:none;box-sizing:border-box;z-index:40}
}
@media(min-width:981px) and (max-width:1150px){
 body.seo-mode{--seo-rail-width:210px;--seo-rail-gap:16px}
}
@media(max-width:980px){
 #seoView .seo-conversations{left:0;top:0;bottom:0;height:100dvh;max-height:none;width:min(320px,calc(100vw - 40px));box-sizing:border-box;border-radius:0;border-width:0 1px 0 0;padding-top:calc(18px + env(safe-area-inset-top));padding-bottom:calc(76px + env(safe-area-inset-bottom))}
}

/* Prompt reset and article actions */
#seoView .seo-reset-default{display:block;width:100%;margin-top:14px;padding:11px 14px;border:1px solid var(--seo-line);border-radius:12px;background:rgba(180,140,220,.07);color:#dcc8ef;font:inherit;font-size:13px;cursor:pointer}
#seoView .seo-conversation-menu{position:fixed;z-index:10045;min-width:170px;padding:6px;border:1px solid #ffffff20;border-radius:13px;background:#16131ef5;box-shadow:0 12px 40px #0007;backdrop-filter:blur(20px)}
#seoView .seo-conversation-menu[hidden]{display:none}#seoView .seo-conversation-menu button{display:block;width:100%;padding:11px 14px;border:0;border-radius:9px;background:transparent;color:#f1acbb;text-align:right;font:inherit;font-size:13px;cursor:pointer}#seoView .seo-conversation-menu button:hover{background:#f196ae14}#seoView .seo-conversation-menu button:disabled{opacity:.45;cursor:default}
#seoView .seo-conversation-item{-webkit-touch-callout:none;user-select:none;touch-action:pan-y}
#seoView .seo-danger-button{border:1px solid #e593a33d;border-radius:12px;padding:11px 16px;background:#8b34454d;color:#ffd4dd;font:inherit;font-size:13px;cursor:pointer}
#seoView .seo-delete-name{font-size:15px;line-height:1.9;overflow-wrap:anywhere;color:#e4d8ef}#seoView #seoResetDialog,#seoView #seoDeleteDialog{z-index:10046}#seoView #seoResetDialog input{width:100%;box-sizing:border-box}
