:root{
  color-scheme:dark;
  --accent:#9cb8ff;--accent-hover:#bdd0ff;--accent-soft:rgba(130,164,255,.13);
  --ink:#f0f2f8;--muted:#a6abba;--line:rgba(211,222,255,.10);
  --bg:#0c0e14;--paper:rgba(28,32,43,.60);--solid:#1b1f2a;
  --field:rgba(8,11,19,.32);--field-border:rgba(213,224,255,.15);
  --glass:rgba(26,30,40,.68);--glass-strong:rgba(29,33,44,.86);
  --green:#8ad5b0;--danger:#ff9da9;--radius:20px;
  --ready-bg:rgba(71,167,116,.13);--warning-bg:rgba(225,170,75,.12);--warning-ink:#efc987;
  --primary-bg:#dce6ff;--primary-ink:#172440;
  --shadow:0 14px 46px rgba(0,0,0,.12);--focus:#a3bfff;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);
  background:var(--bg);font-synthesis:none;
}
:root[data-theme="light"]{
  color-scheme:light;--accent:#235fc9;--accent-hover:#174ba6;--accent-soft:rgba(64,111,214,.09);
  --ink:#202736;--muted:#667183;--line:rgba(44,65,102,.12);
  --bg:#edf0f6;--paper:rgba(255,255,255,.64);--solid:#fff;
  --field:rgba(255,255,255,.55);--field-border:rgba(54,78,116,.20);
  --glass:rgba(255,255,255,.60);--glass-strong:rgba(255,255,255,.86);
  --green:#246a4b;--danger:#ae3349;--ready-bg:rgba(44,143,97,.09);
  --warning-bg:rgba(192,133,33,.10);--warning-ink:#865b1e;
  --primary-bg:#255fc9;--primary-ink:#fff;
  --shadow:0 14px 46px rgba(55,78,114,.07);--focus:#346dd2;
}
*{box-sizing:border-box;scrollbar-width:thin;scrollbar-color:var(--field-border) transparent}
body{margin:0;font-size:14px;line-height:1.55;background:transparent;min-height:100vh}
body::before{
  content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;
  background:linear-gradient(rgba(7,11,20,.22),rgba(7,11,20,.38)),url('/assets/night-dunes-v1.webp') center center/cover no-repeat,var(--bg);
}
[data-theme="light"] body::before{background:linear-gradient(rgba(237,242,249,.73),rgba(237,242,249,.82)),url('/assets/night-dunes-v1.webp') center center/cover no-repeat,var(--bg)}
::selection{background:var(--accent-soft);color:var(--ink)}
button,input,select,textarea{font:inherit;color:inherit}
button,a,input,textarea,select{-webkit-tap-highlight-color:transparent}
button,a{touch-action:manipulation}
button{cursor:pointer}
button:disabled{cursor:wait;opacity:.5}
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,summary:focus-visible{outline:2px solid var(--focus);outline-offset:4px}
input,textarea{caret-color:var(--accent)}
input,select,textarea{width:100%;padding:12px 14px;border:1px solid var(--field-border);border-radius:12px;background:var(--field)}
select option{background:var(--solid);color:var(--ink)}
input::placeholder,textarea::placeholder{color:var(--muted);opacity:1}
textarea{resize:vertical}
h1,h2,h3,p{margin:0}
h1{font-size:32px;line-height:1.2;letter-spacing:-.035em;font-weight:620;text-wrap:balance}
h2{font-size:20px;line-height:1.3;letter-spacing:-.025em;font-weight:600}
h3{font-size:15px;font-weight:600}
a{color:var(--accent);text-underline-offset:4px}
small,.muted{color:var(--muted)}
svg.icon{width:20px;height:20px;flex-shrink:0;vertical-align:middle;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}
.boot{padding:15vh 24px;text-align:center}
.btn{border:1px solid transparent;background:var(--primary-bg);color:var(--primary-ink);border-radius:11px;padding:10px 16px;font-weight:600;font-size:13px;display:inline-flex;gap:8px;align-items:center;justify-content:center;text-decoration:none;white-space:nowrap;transition:background .16s ease,color .16s ease}
.btn:hover{background:var(--accent-hover);color:var(--primary-ink)}
.btn.secondary{background:rgba(145,160,191,.06);color:var(--ink);border-color:var(--line)}
.btn.secondary:hover{background:var(--accent-soft);border-color:var(--field-border)}
.btn.ghost{background:transparent;color:var(--muted);padding:8px}
.btn.ghost:hover{color:var(--ink);background:var(--accent-soft)}
.btn.small{padding:7px 11px;font-size:12px}
.badge{display:inline-flex;align-items:center;gap:7px;padding:5px 9px;font-size:11px;letter-spacing:.005em;color:var(--muted);background:var(--field);border:1px solid var(--line);border-radius:8px;white-space:nowrap}
.badge.ready{color:var(--green);background:var(--ready-bg);border-color:transparent}
.badge.warn{color:var(--warning-ink);background:var(--warning-bg);border-color:transparent}
.dot{width:5px;height:5px;display:inline-block;border-radius:50%;background:currentColor}
.shell{display:grid;grid-template-columns:252px minmax(0,1fr);min-height:100vh}
.sidebar,.topbar,.section,.welcome,.inline-form,.chat-layout,.result,.tool-frame{
  background:var(--paper);backdrop-filter:blur(24px) saturate(135%);-webkit-backdrop-filter:blur(24px) saturate(135%);
  border:1px solid var(--line);box-shadow:var(--shadow);
}
.sidebar{position:sticky;top:16px;height:calc(100dvh - 32px);display:flex;flex-direction:column;border-radius:22px;margin:16px 0 16px 16px;padding:27px 13px 14px;background:var(--glass);backdrop-filter:blur(36px) saturate(140%);-webkit-backdrop-filter:blur(36px) saturate(140%)}
.brand{text-decoration:none;color:var(--ink);font-weight:720;font-size:21px;letter-spacing:-.04em;display:block;padding:0 12px}
.brand b{color:var(--accent);font-weight:750}
.workspace-label{margin:6px 12px 30px;font-size:11px;color:var(--muted);letter-spacing:.01em}
.nav{display:grid;gap:4px}
.nav a{display:flex;align-items:center;gap:12px;text-decoration:none;color:var(--muted);padding:11px 12px;border-radius:11px;font-size:13px;font-weight:450;transition:background .16s ease,color .16s ease}
.nav a svg{width:18px;height:18px}
.nav a:hover{background:var(--accent-soft);color:var(--ink)}
.nav a.active{background:var(--accent-soft);color:var(--accent);font-weight:600}
.nav-plan{margin-left:auto;font-size:10px;color:var(--muted);font-weight:550}
.nav-group{padding:24px 12px 9px;color:var(--muted);font-size:10px;font-weight:550;letter-spacing:.08em;text-transform:uppercase}
.sidebar-bottom{margin-top:auto;padding-top:20px}
.private-note{padding:13px 12px;color:var(--muted);font-size:11px;border-bottom:1px solid var(--line);margin-bottom:13px;display:flex;gap:10px;align-items:center}
.private-note svg{width:16px;height:16px}
.user{display:flex;align-items:center;gap:10px;padding:0 5px}
.avatar{width:34px;height:34px;display:grid;place-items:center;border-radius:50%;color:var(--accent);background:var(--accent-soft);font-size:12px;font-weight:600;flex-shrink:0}
.user-text{flex:1;min-width:0}
.user-text strong{font-size:12px;font-weight:550;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.user-text small{font-size:10px;display:block;margin-top:2px}
.workspace{min-width:0}
.topbar{position:sticky;top:16px;z-index:25;height:64px;display:flex;align-items:center;justify-content:space-between;gap:14px;margin:16px 24px 0;padding:0 23px;border-radius:18px;background:var(--glass);backdrop-filter:blur(32px) saturate(140%);-webkit-backdrop-filter:blur(32px) saturate(140%)}
.breadcrumb{font-size:12px;color:var(--muted);display:flex;gap:11px;align-items:center;min-width:0}
.breadcrumb>span:last-child{color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.topbar-right{display:flex;gap:16px;align-items:center;font-size:11px;color:var(--muted);flex-shrink:0}
.theme-toggle{display:inline-flex;align-items:center;gap:8px;justify-content:center;border:0;border-radius:9px;background:transparent;padding:8px 9px;color:var(--muted);font-size:11px}
.theme-toggle:hover{background:var(--accent-soft);color:var(--ink)}
.theme-toggle svg{width:17px;height:17px}
.content{max-width:1400px;margin:auto;padding:40px}
.page-heading{display:flex;justify-content:space-between;align-items:center;gap:24px;margin-bottom:29px}
.page-heading p{color:var(--muted);font-size:13px;line-height:1.7;margin-top:10px;max-width:72ch}
.page-heading>.toolbar{justify-content:flex-end;flex-wrap:wrap}
.section{padding:27px;border-radius:var(--radius)}
.section+.section{margin-top:24px}
.section-title{display:flex;justify-content:space-between;gap:14px;align-items:center;margin-bottom:20px}
.section-title>a{font-size:12px;text-decoration:none}
.section-title>a:hover{text-decoration:underline}
.welcome{position:relative;padding:32px;border-radius:var(--radius);display:flex;justify-content:space-between;gap:30px;align-items:center;margin-bottom:26px;background:linear-gradient(120deg,rgba(125,156,220,.12),rgba(130,111,181,.05)),var(--paper)}
.welcome h2{font-size:25px;line-height:1.3;font-weight:550;max-width:28ch;letter-spacing:-.025em}
.welcome p{margin-top:12px;max-width:65ch;font-size:13px;line-height:1.75;color:var(--muted)}
.welcome .btn{flex-shrink:0}
.tool-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:36px}
.tool-row{display:flex;align-items:center;gap:15px;padding:21px 0;border-top:1px solid var(--line);text-decoration:none;color:inherit;min-width:0}
.tool-row:hover .tool-name{color:var(--accent)}
.tool-mark{color:var(--accent);flex-shrink:0;width:30px}
.tool-mark .icon{width:19px;height:19px}
.tool-info{flex:1;min-width:0}
.tool-name{font-weight:550;display:block;font-size:14px;letter-spacing:-.01em}
.tool-name .badge{margin-left:9px;vertical-align:middle}
.tool-info p{color:var(--muted);font-size:12px;line-height:1.6;margin-top:5px}
.tool-arrow{color:var(--muted);opacity:.65}
.tool-arrow .icon{width:16px;height:16px}
.searchbar{display:flex;align-items:center;gap:12px;margin-bottom:24px;flex-wrap:wrap}
.search-input{flex:1;min-width:180px;max-width:400px}
.filters{display:flex;gap:5px}
.chip{display:inline-flex;align-items:center;justify-content:center;background:transparent;color:var(--muted);border:1px solid var(--line);border-radius:10px;padding:9px 14px;font-size:12px;white-space:nowrap;text-decoration:none}
.chip.active{background:var(--accent-soft);color:var(--accent);border-color:var(--field-border)}
.chip:hover:not(.active){color:var(--ink);background:var(--field)}
.settings-tabs{margin-bottom:28px}
.empty{padding:42px 20px;text-align:center;color:var(--muted);border:1px dashed var(--field-border);border-radius:14px;font-size:13px}
.empty h3{color:var(--ink);margin-bottom:8px}
.empty .btn{margin-top:18px}
.split{display:grid;grid-template-columns:1fr 1fr;gap:24px}
.statline{display:flex;gap:24px;color:var(--muted);margin-bottom:29px;font-size:11px}
.statline strong{color:var(--ink);font-weight:550;font-variant-numeric:tabular-nums}
.notice{background:var(--accent-soft);border:1px solid var(--line);border-radius:12px;padding:13px 16px;color:var(--accent);font-size:12px;line-height:1.7;margin:0 0 22px;max-width:100%}
.notice.warning{background:var(--warning-bg);color:var(--warning-ink);border-color:transparent}
.error{padding:12px 16px;border-radius:12px;background:rgba(218,77,104,.12);color:var(--danger);font-size:13px;margin-bottom:20px}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}
.field{display:block;font-weight:550;font-size:12px}
.field input,.field select,.field textarea{margin-top:8px;font-weight:400;font-size:13px}
.field small{display:block;font-weight:400;margin-top:7px;font-size:11px;line-height:1.6}
.field+.field{margin-top:20px}
.form-grid .field+.field{margin-top:0}
.form-actions{display:flex;gap:12px;align-items:center;margin-top:24px}
.form-panel{max-width:800px}
.inline-form{padding:26px;border-radius:var(--radius);margin-bottom:24px}
.inline-form>.description{margin-top:8px;max-width:68ch}
.project-form-grid{margin-top:20px}
.project-assignee-field{grid-column:1/-1}
.project-row{display:flex;gap:18px;align-items:center;padding:21px 0;border-top:1px solid var(--line)}
.project-row .grow{flex:1}
.project-row h3{margin:0}
.project-title-line{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:5px}
.site-health{display:inline-flex;align-items:center;gap:7px;flex-shrink:0;font-size:12px;font-weight:550;font-variant-numeric:tabular-nums}
.site-health.online{color:var(--green)}
.site-health.offline{color:var(--danger)}
.site-health.checking{color:var(--muted)}
.site-lamp{width:10px;height:10px;border-radius:50%;border:1px solid currentColor;background:transparent;flex-shrink:0}
.site-lamp.online{color:var(--green);background:var(--green)}
.site-lamp.offline{color:var(--danger);background:var(--danger)}
.site-lamp.checking{color:var(--muted)}
.project-assignee{display:block;margin-top:8px;color:var(--muted);font-size:12px;line-height:1.5}
.project-assignee strong{color:var(--ink);font-weight:550}
.project-domain{color:var(--muted);font-size:12px;text-decoration:none;overflow-wrap:anywhere}
.project-row .avatar{border-radius:12px;width:42px;height:42px}
.project-access-panel{margin:0 0 20px 60px;padding:20px;border-radius:14px;background:var(--field);max-width:760px}
.project-access-panel[hidden],.project-access-panel [hidden]{display:none}
.project-access-panel h4{margin:0 0 8px;font-size:16px}
.project-access-panel .description{margin:0 0 20px;max-width:65ch}
.project-access-panel summary{cursor:pointer;font-weight:700}
.project-access-panel summary+.description{margin-top:12px}
.metrics-connect-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}
.metrics-connect-grid form{min-width:0}
.metrics-connect-grid .field input{width:100%}
.access-fields{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-bottom:18px}
.access-fields .field+.field{margin-top:0}
.project-access-panel textarea{font-family:ui-monospace,SFMono-Regular,Consolas,monospace}
.project-list{padding-top:6px;padding-bottom:6px}
.project-list-row{display:grid;grid-template-columns:minmax(150px,1.1fr) minmax(180px,1.5fr) auto 20px;align-items:center;gap:20px;min-height:72px;padding:14px 6px;border-bottom:1px solid var(--line);color:var(--ink);text-decoration:none}
.project-list-row:last-child{border-bottom:0}
.project-list-row:hover .project-list-name,.project-list-row:hover>.icon{color:var(--accent)}
.project-list-name{font-size:15px;font-weight:600;overflow-wrap:anywhere}
.project-list-url{color:var(--muted);font-size:13px;overflow-wrap:anywhere}
.project-list-row>.icon{width:17px;height:17px;color:var(--muted)}
.project-list-row .site-health{justify-self:end}
.project-work-status{display:inline-flex;align-items:center;gap:8px;width:max-content;max-width:100%;padding:6px 10px;border:1px solid var(--line);border-radius:9px;color:var(--ink);font-size:12px;font-weight:600;white-space:nowrap}
.project-work-status:before{content:"";width:7px;height:7px;border-radius:50%;background:var(--muted)}
.project-work-status.active:before{background:var(--green)}
.project-work-status.paused:before{background:var(--warning-ink)}
.project-work-status.done{color:var(--muted)}
.project-back{display:inline-flex;align-items:center;gap:8px;margin-bottom:22px;color:var(--muted);font-size:13px;text-decoration:none}
.project-back .icon{width:16px;height:16px}
.project-back:hover{color:var(--accent)}
.project-detail-grid{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(270px,.9fr);gap:20px;align-items:start}
.project-detail-grid>.section{margin:0}
.project-detail-grid .section-title{align-items:center}
.project-detail-grid .form-grid{margin-top:20px}
.project-facts dl{margin:16px 0 0}
.project-facts dl>div{display:grid;grid-template-columns:130px minmax(0,1fr);gap:12px;padding:10px 0;border-top:1px solid var(--line)}
.project-facts dt{color:var(--muted);font-size:12px}
.project-facts dd{margin:0;min-width:0;overflow-wrap:anywhere}
.project-facts dd a{display:inline-flex;align-items:center;gap:5px;overflow-wrap:anywhere}
.project-facts dd a .icon{width:14px;height:14px}
.project-connections{margin-top:20px}
.project-connections>.toolbar{margin:16px 0}
.project-connections .project-access-panel{margin-left:0;max-width:none}
@media(max-width:950px){.project-detail-grid{grid-template-columns:1fr}}
@media(max-width:700px){.project-list-row{grid-template-columns:minmax(0,1fr) minmax(96px,130px);gap:4px 12px;padding:16px 0}.project-list-name{grid-column:1}.project-list-url{grid-column:1;grid-row:2}.project-list-row .site-health{grid-column:2;grid-row:1/3;justify-self:end;flex-shrink:1;line-height:1.35}.project-list-row>.icon{display:none}.project-facts dl>div{grid-template-columns:110px minmax(0,1fr)}}
@media(max-width:760px){.project-access-panel{margin-left:0}.access-fields,.metrics-connect-grid{grid-template-columns:1fr}.project-access-panel .form-actions{align-items:flex-start;flex-direction:column}}
.tool-frame{width:100%;height:calc(100dvh - 235px);min-height:620px;border-radius:var(--radius)}
.back-link{display:inline-flex;gap:7px;align-items:center;text-decoration:none;color:var(--muted);font-size:12px;margin-bottom:20px}
.chat-layout{display:grid;grid-template-columns:220px minmax(0,1fr) 258px;border-radius:var(--radius);overflow:hidden;min-height:650px;height:calc(100dvh - 255px)}
.chat-history-rail,.chat-skills-rail{display:flex;min-height:0;background:var(--field);overflow:hidden}
.chat-history-rail{border-right:1px solid var(--line)}
.chat-skills-rail{border-left:1px solid var(--line)}
.chat-history{display:flex;flex-direction:column;flex:1;width:100%;min-width:0;min-height:0;padding:15px 13px 12px}
.chat-history>.btn{width:100%;min-width:0;flex-shrink:0}
.chat-sidebar-label{padding:14px 6px 6px;color:var(--muted);font-size:11px;font-weight:600}
.chat-history-list{min-width:0;min-height:0;overflow-y:auto}
.chat-link{display:block;width:100%;max-width:100%;min-width:0;text-align:left;border:0;padding:10px;background:transparent;color:var(--muted);border-radius:10px;margin-bottom:4px;white-space:normal;overflow:hidden;overflow-wrap:anywhere;font-size:12px;line-height:1.4}
.chat-link-title{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
.chat-link-project{display:block;margin-top:5px;color:var(--muted);font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chat-history-empty{padding:10px 6px;color:var(--muted);font-size:12px;line-height:1.5}
.chat-link.active,.chat-link:hover{background:var(--accent-soft);color:var(--accent)}
.chat-skills{display:flex;flex-direction:column;flex:1;width:100%;min-width:0;min-height:0;padding:14px 10px 12px}
.chat-skills-heading{display:flex;align-items:center;justify-content:space-between;padding:0 5px 10px}
.chat-skills-heading h2{font-size:13px;letter-spacing:0}
.chat-skills-heading span{color:var(--muted);font-size:11px;font-variant-numeric:tabular-nums}
.chat-skills input{padding:9px 11px;font-size:12px}
.chat-skills-list{flex:1;min-height:0;overflow-y:auto;margin-top:9px;padding-right:4px}
.chat-skill-choice{display:flex;align-items:flex-start;gap:10px;width:100%;padding:10px 9px;border:1px solid transparent;border-radius:11px;background:transparent;color:var(--ink);text-align:left;margin-bottom:3px}
.chat-skill-choice:hover{background:var(--accent-soft)}
.chat-skill-choice.active{background:var(--accent-soft);border-color:var(--field-border)}
.chat-skill-choice[hidden]{display:none}
.chat-skill-mark{display:grid;place-items:center;flex-shrink:0;width:29px;height:29px;border-radius:8px;background:var(--accent-soft);color:var(--accent)}
.chat-skill-mark .icon{width:16px;height:16px}
.chat-skill-copy{display:block;min-width:0}
.chat-skill-copy strong{display:block;font-size:12px;font-weight:600;line-height:1.35}
.chat-skill-copy small{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2;color:var(--muted);font-size:11px;line-height:1.35;margin-top:3px}
.chat-skill-empty{padding:10px 5px;color:var(--muted);font-size:12px}
.chat-main{display:flex;flex-direction:column;min-width:0;min-height:0}
.chat-toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:15px 22px;border-bottom:1px solid var(--line);font-size:12px}
.chat-toolbar>span{color:var(--muted)}
.chat-toolbar>span svg{margin-right:5px;color:var(--accent);width:17px;height:17px}
.chat-context{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(160px,.8fr);gap:8px 14px;padding:13px 22px;border-bottom:1px solid var(--line)}
.chat-context label{display:flex;flex-direction:column;gap:5px;min-width:0;color:var(--muted);font-size:11px;font-weight:550}
.chat-context select{width:100%;padding:8px 10px;color:var(--ink);font-size:12px}
.chat-context p{grid-column:1/-1;color:var(--muted);font-size:11px}
.chat-selected-skill{display:flex;flex-direction:column;min-width:0;color:var(--muted);font-size:11px}
.chat-selected-skill strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--ink);font-size:12px;line-height:1.5;margin-top:5px}
.chat-selected-skill small{font-size:10px;line-height:1.4;margin-top:3px}
@media(max-width:500px){.chat-context{grid-template-columns:1fr}}
.messages{flex:1;min-height:0;overflow:auto;padding:28px;scroll-behavior:smooth}
.message{margin-bottom:25px;max-width:80ch}
.message .speaker{font-weight:600;font-size:11px;color:var(--accent);margin-bottom:7px}
.message.user-message{margin-left:auto;padding:15px 18px;background:var(--accent-soft);border-radius:16px;max-width:85%}
.message.user-message .speaker{color:var(--muted)}
.message-body{white-space:pre-wrap;overflow-wrap:anywhere;font-size:14px;line-height:1.8}
.message-attachment{display:inline-flex;align-items:center;gap:6px;max-width:100%;margin-top:9px;padding:6px 9px;border:1px solid var(--line);border-radius:8px;color:var(--muted);font-size:11px;overflow-wrap:anywhere}
.message-attachment .icon{width:14px;height:14px;flex-shrink:0}
.chat-empty{max-width:440px;margin:70px auto 20px;text-align:center}
.chat-empty>.icon{width:34px;height:34px;color:var(--accent);margin-bottom:20px}
.chat-empty h2{font-weight:550;font-size:23px}
.chat-composer{padding:17px 22px 13px;border-top:1px solid var(--line)}
.compose-row{display:flex;align-items:flex-end;gap:12px}
.compose-row textarea{flex:1;min-width:0;resize:none;min-height:78px;max-height:200px;background:var(--field)}
.chat-compose-actions{display:flex;align-items:center;gap:7px;flex-shrink:0}
.chat-icon-button{display:grid;place-items:center;width:42px;height:42px;padding:0}
.chat-icon-button .icon{width:18px;height:18px}
.chat-icon-button.recording{color:#e65454;border-color:#e65454;box-shadow:0 0 0 3px rgba(230,84,84,.15)}
.chat-attachment-preview{display:flex;align-items:center;justify-content:space-between;gap:10px;max-width:100%;margin-bottom:10px;padding:7px 10px;background:var(--field);border:1px solid var(--line);border-radius:9px;font-size:12px}
.chat-attachment-preview[hidden]{display:none}
.chat-attachment-preview span{display:flex;align-items:center;gap:7px;min-width:0;overflow-wrap:anywhere}
.chat-attachment-preview .icon{width:15px;height:15px;flex-shrink:0}
.chat-attachment-preview button{display:grid;place-items:center;flex-shrink:0;width:25px;height:25px;border:0;border-radius:6px;background:transparent;color:var(--muted)}
.chat-attachment-preview button:hover{background:var(--accent-soft);color:var(--accent)}
.skills-layout{display:grid;grid-template-columns:250px minmax(0,1fr);gap:24px}
.skill-choice{display:block;width:100%;text-align:left;padding:17px;background:var(--paper);border:1px solid var(--line);border-radius:13px;margin-bottom:10px}
.skill-choice.active{border-color:var(--field-border);background:var(--accent-soft)}
.skill-choice strong{font-weight:550;font-size:13px}
pre{font:12px/1.8 ui-monospace,"SFMono-Regular",Consolas,monospace;white-space:pre-wrap;overflow-wrap:anywhere;max-width:100%;margin:0}
.skill-content{max-height:65vh;overflow:auto;color:var(--muted)}
.table-wrap{overflow:auto}
table{border-collapse:collapse;width:100%;text-align:left;font-size:12px}
th{color:var(--muted);font-size:10px;letter-spacing:.06em;text-transform:uppercase;font-weight:550;padding:13px 14px;background:var(--field)}
td{padding:16px 14px;border-top:1px solid var(--line);font-variant-numeric:tabular-nums}
details{border-top:1px solid var(--line);padding:17px 0}
summary{cursor:pointer;display:flex;gap:15px;align-items:center;font-size:12px}
summary .grow{flex:1}
details pre{margin-top:16px;max-height:400px;overflow:auto;background:var(--field);padding:18px;border-radius:12px}
.result{margin-top:24px;padding:24px;border-radius:var(--radius)}
.result pre{max-height:600px;overflow:auto;margin-top:16px}
.settings-grid{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(270px,1fr);gap:24px}
.settings-grid .section+.section{margin-top:0}
.settings-grid .section>p{color:var(--muted);margin-top:10px;margin-bottom:24px;font-size:13px;line-height:1.7}
.team-item{display:flex;align-items:center;gap:12px;padding:16px 0;border-top:1px solid var(--line)}
.team-item .grow{flex:1}
.team-item strong{font-weight:550;font-size:13px}
.team-item small{display:block;font-size:11px;overflow-wrap:anywhere;margin-top:3px}
.settings-note{margin-top:22px;color:var(--muted);font-size:11px;line-height:1.7}
.login{min-height:100dvh;display:grid;grid-template-columns:1fr 1fr}
.login-theme{position:fixed;right:28px;top:24px;z-index:10}
.login-theme .theme-toggle{background:var(--glass);backdrop-filter:blur(24px);border:1px solid var(--line);padding:10px 14px}
.login-story{display:flex;flex-direction:column;justify-content:space-between;background:linear-gradient(140deg,rgba(104,132,191,.12),transparent 70%);padding:48px 60px;border-right:1px solid var(--line)}
.login-story .brand{padding:0}
.login-copy{padding:80px 0;max-width:500px}
.login-copy h1{font-size:48px;line-height:1.14;letter-spacing:-.04em;font-weight:550}
.login-copy p{margin-top:25px;font-size:15px;color:var(--muted);line-height:1.8}
.login-features{margin-top:38px;display:grid;gap:18px;color:var(--muted);font-size:13px}
.login-features div{display:flex;gap:12px;align-items:center}
.login-features .icon{color:var(--accent);width:18px;height:18px}
.login-story>small{font-size:11px}
.login-form{display:flex;align-items:center;justify-content:center;padding:60px 48px}
.login-form form{width:100%;max-width:385px;padding:30px;background:var(--paper);backdrop-filter:blur(24px);border:1px solid var(--line);border-radius:24px;box-shadow:var(--shadow)}
.login-form h2{font-size:25px;font-weight:550;line-height:1.3}
.login-form .lead{color:var(--muted);font-size:13px;line-height:1.75;margin:12px 0 28px}
.login-form .btn{width:100%;margin-top:26px;padding:12px}
.login-meta{margin-top:23px;font-size:10px;line-height:1.7;color:var(--muted);text-align:center}
.login-meta .icon{width:13px;height:13px;margin-right:3px}
.mobile-menu{display:none}
#toast{position:fixed;bottom:24px;right:24px;max-width:calc(100vw - 48px);padding:14px 20px;border:1px solid var(--field-border);border-radius:14px;background:var(--glass-strong);backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px);color:var(--ink);box-shadow:var(--shadow);z-index:99;font-size:12px}
#toast[data-error=true]{color:var(--danger)}
.toolbar{display:flex;gap:10px;align-items:center}
.counter{font-size:12px;font-weight:400;color:var(--muted)}
.readable{max-width:72ch}
.section p.description{color:var(--muted);margin:10px 0 24px;font-size:13px;line-height:1.7}
.inline-heading{display:flex;align-items:center;gap:10px;margin-bottom:16px}
.inline-heading .icon{color:var(--accent)}
@media(min-width:1600px){.content{padding:44px 50px}}
@media(max-width:1100px){
 .shell{grid-template-columns:218px minmax(0,1fr)}
 .sidebar{margin-left:12px;padding:24px 9px 14px}
 .brand{font-size:18px}.workspace-label{font-size:10px}
 .content{padding:30px 24px}.topbar{margin-left:18px;margin-right:18px;padding:0 18px}
 .tool-list{column-gap:24px}.settings-grid{grid-template-columns:1fr}
 .login-story{padding:40px}.login-copy h1{font-size:40px}
 .login-form{padding:40px 28px}
 .chat-layout{grid-template-columns:190px minmax(0,1fr) 220px}
 .skills-layout{grid-template-columns:215px minmax(0,1fr)}
}
@media(max-width:760px){
 h1{font-size:27px}.shell{display:block}
 .sidebar{position:fixed;left:0;top:12px;width:238px;height:calc(100dvh - 24px);margin:0 0 0 12px;z-index:50;transform:translateX(calc(-100% - 24px));transition:transform .22s cubic-bezier(.2,.8,.2,1);background:var(--glass-strong)}
 .sidebar.open{transform:translateX(0)}.mobile-menu{display:inline-flex}
 .topbar{height:60px;margin:12px 12px 0;top:12px;padding:0 10px;border-radius:16px;gap:8px}
 .breadcrumb{gap:5px;font-size:11px;flex:1}
 .breadcrumb>span:not(:last-child){display:none}
 .breadcrumb>span:last-child{max-width:130px}
 .topbar-right{gap:4px}.topbar-right .badge{font-size:10px;padding:5px 7px}.topbar-right .plan-badge~.provider-badge{display:none}
 .theme-toggle{padding:8px}.theme-label{display:none}
 .content{padding:28px 16px}.page-heading{display:block;margin-bottom:24px}
 .page-heading p{font-size:12px;line-height:1.75}.page-heading>.btn{margin-top:19px}
 .page-heading>.toolbar{justify-content:flex-start;margin-top:19px}
 .tool-list{grid-template-columns:1fr}.section{padding:20px;border-radius:18px}
 .welcome{padding:24px;display:block;margin-bottom:24px;border-radius:18px}
 .welcome .btn{margin-top:22px}.welcome h2{font-size:22px}.welcome p{font-size:12px}
 .statline{gap:12px;flex-wrap:wrap;font-size:10px}
 .split,.form-grid{grid-template-columns:1fr}.form-grid .field+.field{margin-top:0}
 .filters{max-width:100%;overflow:auto}.chip{font-size:11px;padding:9px 12px}
 .search-input{max-width:none}.searchbar .filters{width:100%}
 .project-row{flex-wrap:wrap}.project-row .grow{min-width:170px}.project-row .btn{margin-left:60px}
 .project-title-line{align-items:flex-start;flex-direction:column;gap:5px}.site-health{font-size:11px}
 .skills-layout{grid-template-columns:1fr}.skill-content{max-height:60vh}
 .chat-layout{display:flex;flex-direction:column;min-height:0;height:auto}
 .chat-history-rail{order:0;border-right:0;border-bottom:1px solid var(--line)}
 .chat-skills-rail{order:1;border-left:0;border-bottom:1px solid var(--line)}
 .chat-history{max-height:none;padding:10px}
 .chat-history>.btn{width:auto;align-self:flex-start}
 .chat-sidebar-label{display:none}
 .chat-history-list{display:flex;gap:6px;overflow-x:auto;overflow-y:hidden;margin-top:8px}
 .chat-link{min-width:130px;max-width:150px;margin:0;flex-shrink:0}
 .chat-skills{flex:0 0 auto;padding:11px 10px 10px}
 .chat-skills-heading{padding-bottom:8px}
 .chat-skills-list{max-height:146px;overflow-y:auto}
 .chat-main{order:2;flex:0 0 auto;height:650px;min-height:0}.chat-toolbar{padding:12px;font-size:11px}
 .messages{padding:20px 15px}
 .chat-context{padding:12px;gap:8px}.chat-context p{font-size:10px}
 .chat-composer{padding:12px}.compose-row{gap:8px;flex-wrap:wrap}.compose-row textarea{flex-basis:100%}.chat-compose-actions{width:100%;justify-content:flex-end}.compose-row .btn{padding:12px}.compose-row .chat-icon-button{padding:0}
 .compose-row .send-label{display:none}.chat-empty{margin-top:32px}.chat-empty p{font-size:12px}
 .tool-frame{min-height:720px;border-radius:18px}
 .login{display:block}.login-story{padding:28px 24px 20px;border-right:0;border-bottom:1px solid var(--line)}
 .login-copy{padding:38px 0 0}.login-copy h1{font-size:34px}
 .login-copy p{margin-top:16px;font-size:13px}.login-features,.login-story>small{display:none}
 .login-form{padding:26px 18px}.login-form form{padding:25px;max-width:440px}
 .login-form h2{font-size:23px}.login-theme{right:16px;top:19px}
 .settings-grid{gap:18px}summary{flex-wrap:wrap}.section-title h2{font-size:18px}
 .toolbar{flex-wrap:wrap}.settings-tabs{margin-bottom:25px}
}
@media(max-width:370px){.topbar-right .badge{max-width:120px;overflow:hidden;text-overflow:ellipsis;font-size:9px}.breadcrumb>span:last-child{max-width:90px}}
@supports not (backdrop-filter:blur(1px)){.sidebar,.topbar,.section,.welcome,.inline-form,.chat-layout,.result,.login-form form{background:var(--solid)}}
@media(prefers-reduced-transparency:reduce){.sidebar,.topbar,.section,.welcome,.inline-form,.chat-layout,.result,.login-form form{background:var(--solid);backdrop-filter:none;-webkit-backdrop-filter:none}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
/* Native SEO audit workflow. */
.audit-layout {display:grid;grid-template-columns:minmax(0,1.3fr) minmax(260px,.7fr);gap:24px;align-items:start}
.audit-create,.audit-archive {min-width:0;margin-top:0}
.wallet-summary{background:linear-gradient(135deg,rgba(123,92,255,.16),rgba(42,171,151,.08));}
.wallet-balance{margin:0;font-size:clamp(3rem,8vw,5rem);font-weight:700;line-height:1;letter-spacing:-.06em;}
.wallet-balance span{font-size:1rem;font-weight:500;letter-spacing:0;color:var(--text-secondary);}
.wallet-note{display:block;margin-top:4px;color:var(--text-secondary);}
.wallet-positive{color:#43b58a;font-weight:650;}
.audit-create .description {max-width:62ch}
.audit-options {margin:20px 0}.audit-options summary {margin-bottom:18px}
.audit-check {display:flex;gap:12px;align-items:flex-start;margin:24px 0;cursor:pointer}
.audit-check input {width:18px;height:18px;flex:0 0 auto;margin-top:3px;accent-color:var(--accent)}
.audit-check small {display:block;max-width:56ch;margin-top:6px;color:var(--muted);line-height:1.5}
.audit-history {display:flex;justify-content:space-between;gap:12px;align-items:center;padding:18px 0;border-bottom:1px solid var(--line);text-decoration:none;color:var(--ink)}
.audit-history strong {overflow-wrap:anywhere}.audit-history small{display:block;color:var(--muted);margin-top:5px}
.audit-history:hover strong {text-decoration:underline}.audit-archive #auditList {max-height:520px;overflow:auto}
.audit-progress progress {width:100%;height:8px;accent-color:var(--accent)}
.audit-progress small,.audit-report .section-title p,#auditSaveState {color:var(--muted);line-height:1.6}
.audit-report .section-title {align-items:flex-start;flex-wrap:wrap;gap:20px}
#auditResult {scroll-margin-top:100px}
#auditResult h2:focus {outline:2px solid var(--focus);outline-offset:6px;border-radius:4px}
.audit-limitations {margin:24px 0}.audit-limitations p {max-width:75ch;line-height:1.6;color:var(--muted)}
.audit-editor-label small {display:block;font-weight:400}
#auditBody {width:100%;min-height:540px;font-family:inherit;font-size:14px;line-height:1.75;resize:vertical;tab-size:2}
@media(max-width:1050px){.audit-layout{grid-template-columns:1fr}.audit-archive #auditList{max-height:260px}}
@media(max-width:640px){.audit-report .toolbar{width:100%;flex-wrap:wrap}.audit-report .toolbar .btn{flex:1;white-space:normal}#auditBody{min-height:440px}.audit-layout{gap:16px}}
.skill-list {max-height:75vh;overflow:auto;align-self:start;padding-right:6px}
.skill-list .search-input {margin-bottom:14px}
.skill-choice[hidden] {display:none}
.skill-choice small {display:block;line-height:1.5;margin-top:4px}
.skill-tools {margin-bottom:20px;flex-wrap:wrap}
@media(max-width:640px){.skill-list{max-height:330px}}

.account-form{padding:16px 0 8px}
#settingsForm{margin-top:22px}
.audit-log .toolbar{align-items:flex-end;gap:12px}
.audit-log .toolbar .field{margin-bottom:0;min-width:0}
.audit-summary time{font-variant-numeric:tabular-nums;color:var(--muted)}
.audit-target{overflow-wrap:anywhere;color:var(--muted)}
.audit-table-scroll{overflow-x:auto}
.audit-log table{width:100%;border-collapse:collapse;text-align:left;table-layout:fixed}
.audit-log th,.audit-log td{padding:12px 10px;border-bottom:1px solid var(--line);vertical-align:top;overflow-wrap:anywhere}
.audit-log th small{display:block;font-weight:400;color:var(--muted)}
@media(max-width:760px){.audit-summary{flex-wrap:wrap;gap:8px}.audit-summary time{flex-basis:100%}.audit-log .toolbar{flex-wrap:wrap}.audit-log .toolbar .field{flex-basis:100%}.audit-log th,.audit-log td{padding:10px 5px}}

/* Keep the viewport, wallpaper and app chrome stationary between routes. */
html{overflow-y:scroll;scrollbar-gutter:stable}
.content{width:100%;min-height:calc(100svh - 96px);overflow-anchor:none}
body::before{height:100lvh;bottom:auto}
.tool-frame{display:block;background:transparent}
.tool-preload{position:fixed;left:-200vw;top:0;width:calc(100vw - 350px);visibility:hidden;pointer-events:none}
.route-status{position:absolute;right:24px;top:calc(100% + 8px);font-size:11px;color:var(--muted);background:var(--solid);padding:6px 10px;border-radius:8px;pointer-events:none}
.chip,.tool-row,.skill-choice{transition:background-color .18s ease,border-color .18s ease,color .18s ease}
.tool-arrow{transition:transform .18s cubic-bezier(.16,1,.3,1)}
.tool-row:hover .tool-arrow{transform:translateX(3px)}
@media(max-width:760px){.tool-preload{width:calc(100vw - 32px)}}
@media(prefers-reduced-motion:reduce){.tool-row:hover .tool-arrow{transform:none}}
