:root {
  color-scheme: light;
  --bg: #f8fafd;
  --surface: #ffffff;
  --surface-2: #f0f4f9;
  --surface-3: #e8eef7;
  --ink: #1f1f1f;
  --muted: #5f6368;
  --dim: #80868b;
  --line: #d9e2ee;
  --line-soft: #edf1f7;
  --violet: #0b57d0;
  --violet-dark: #0842a0;
  --violet-soft: #d3e3fd;
  --mint: #188038;
  --mint-soft: #e6f4ea;
  --coral: #d93025;
  --coral-soft: #fce8e6;
  --amber: #b06000;
  --amber-soft: #fef7e0;
  --blue: #1a73e8;
  --blue-soft: #e8f0fe;
  --green: #188038;
  --green-soft: #e6f4ea;
  --danger: #d93025;
  --shadow: 0 8px 28px rgba(60, 64, 67, .12), 0 1px 3px rgba(60, 64, 67, .16);
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 28px;
  --sidebar: 256px;
  --font: "Google Sans", "Google Sans Text", Roboto, Arial, ui-sans-serif, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); overflow-x: hidden; }
body { min-width: 0; margin: 0; overflow-x: hidden; color: var(--ink); background: var(--bg); font-family: var(--font); -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip-link { position: fixed; left: 16px; top: -60px; z-index: 100; background: var(--ink); color: white; padding: 10px 14px; border-radius: 8px; }
.skip-link:focus { top: 12px; }
.shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; width: var(--sidebar); display: flex; flex-direction: column; padding: 24px 14px 18px; border-right: 0; background: var(--bg); }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 10px 28px; }
.brand strong, .mobile-brand strong { display: block; font-size: 16px; letter-spacing: -.02em; }
.brand small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.brand-mark { width: 34px; height: 34px; flex: 0 0 34px; display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 3px; border-radius: 12px; background: white; box-shadow: 0 1px 3px rgba(60,64,67,.22); }
.brand-mark span { position: static; width: auto; height: auto; border: 0; border-radius: 8px 3px 3px 3px; background: #4285f4; transform: none; }
.brand-mark span:nth-child(2) { border-radius: 3px 8px 3px 3px; background: #ea4335; }
.brand-mark span:nth-child(3) { border-radius: 3px 3px 3px 8px; background: #fbbc04; }
.brand-mark span:last-child { border: 0; border-radius: 3px 3px 8px 3px; background: #34a853; transform: none; }
.nav-list { display: grid; gap: 4px; }
.nav-list a { min-height: 46px; display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 12px; padding: 0 12px; border-radius: 12px; color: var(--muted); font-size: 14px; font-weight: 550; transition: background .15s, color .15s, transform .15s; }
.nav-list a:hover { color: var(--ink); background: rgba(255,255,255,.55); }
.nav-list a.active { color: #041e49; background: var(--violet-soft); }
.nav-list a:active { transform: scale(.98); }
.nav-list b { min-width: 23px; padding: 2px 7px; border-radius: 999px; background: rgba(0,0,0,.055); font-size: 11px; text-align: center; }
.sidebar-bottom { margin-top: auto; display: grid; gap: 10px; }
.sync-card { display: flex; gap: 11px; align-items: center; padding: 13px 12px; background: rgba(255,255,255,.68); border: 1px solid var(--line-soft); border-radius: 13px; }
.sync-card strong, .profile strong { display: block; font-size: 12px; font-weight: 650; }
.sync-card span, .profile small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.sync-orbit { position: relative; width: 25px; height: 25px; flex: 0 0 25px; border: 1px solid #acd1c8; border-radius: 50%; }
.sync-orbit:before, .sync-orbit:after { content: ""; position: absolute; border: 1px solid #acd1c8; border-radius: 50%; }
.sync-orbit:before { inset: 4px -3px; transform: rotate(56deg); }
.sync-orbit:after { inset: 4px -3px; transform: rotate(-56deg); }
.sync-orbit i { position: absolute; z-index: 1; left: 9px; top: 9px; width: 5px; height: 5px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 3px var(--mint-soft); }
.profile { display: grid; grid-template-columns: 34px 1fr 16px; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; }
.profile:hover { background: rgba(255,255,255,.55); }
.profile > svg { width: 16px; color: var(--dim); }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: #d7c9ff; color: var(--violet-dark); font-size: 12px; font-weight: 700; }

.workspace { min-width: 0; min-height: 100vh; margin-left: var(--sidebar); }
.topbar { position: sticky; top: 0; z-index: 15; min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px clamp(22px, 4vw, 54px); border-bottom: 1px solid rgba(217,226,238,.8); background: rgba(255,255,255,.92); backdrop-filter: blur(16px); }
.mobile-brand { display: none; align-items: center; gap: 10px; }
.mobile-brand .brand-mark { width: 30px; height: 30px; flex-basis: 30px; border-radius: 9px; }
.mobile-brand .brand-mark span { left: 6px; top: 6px; width: 18px; }
.mobile-brand .brand-mark span:last-child { top: 16px; }
.search-trigger { width: min(420px, 40vw); display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); background: rgba(255,255,255,.65); cursor: pointer; text-align: left; }
.search-trigger:hover { border-color: #c6beb2; background: var(--surface); }
.search-trigger svg { width: 18px; }
.search-trigger span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.search-trigger kbd { margin-left: auto; padding: 2px 6px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-2); color: var(--dim); font: 10px var(--font); }
.top-actions { display: flex; align-items: center; gap: 8px; }
.demo-pill { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: rgba(255,255,255,.55); font-size: 11px; }
.demo-pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); }
.icon-button, .primary-button, .secondary-button, .ghost-button { border: 0; cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s; }
.icon-button:active, .primary-button:active, .secondary-button:active, .ghost-button:active { transform: translateY(1px); }
.icon-button { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.65); }
.icon-button:hover { background: var(--surface); }
.primary-button, .secondary-button, .ghost-button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 16px; border-radius: 11px; font-size: 13px; font-weight: 650; }
.primary-button { color: white; background: #0b57d0; box-shadow: none; }
.primary-button:hover { background: #0842a0; box-shadow: 0 2px 6px rgba(11,87,208,.25); }
.primary-button.violet { background: var(--violet); }
.secondary-button { border: 1px solid var(--line); background: var(--surface); }
.secondary-button:hover { background: var(--surface-2); }
.ghost-button { background: transparent; color: var(--violet-dark); }
.ghost-button:hover { background: var(--violet-soft); }
.compact { min-height: 40px; padding: 0 13px; }
.compact svg { width: 17px; }

main { min-width: 0; max-width: 100%; min-height: calc(100vh - 72px); padding: 42px clamp(22px, 4vw, 56px) 80px; }
.page { width: min(1240px, 100%); min-width: 0; max-width: 100%; margin: 0 auto; animation: page-in .24s ease-out; }
@keyframes page-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.page-loading { min-height: 60vh; display: grid; place-content: center; justify-items: center; gap: 14px; color: var(--muted); font-size: 13px; }
.loading-mark { width: 38px; height: 38px; border: 2px solid var(--line); border-top-color: var(--violet); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.eyebrow { margin: 0 0 10px; color: var(--violet); font-size: 11px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.page-title { min-width: 0; margin: 0; overflow-wrap: break-word; font-size: clamp(31px, 4.2vw, 53px); line-height: 1.02; letter-spacing: -.052em; font-weight: 640; }
.page-intro { max-width: 680px; margin: 15px 0 0; color: var(--muted); font-size: 16px; line-height: 1.65; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 34px; }
.page-head .page-title { font-size: clamp(30px, 3.3vw, 43px); }
.page-actions { display: flex; gap: 9px; flex-wrap: wrap; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin: 44px 0 16px; }
.section-head h2 { margin: 0; font-size: 20px; letter-spacing: -.025em; }
.section-head a, .section-head button { color: var(--violet-dark); font-size: 12px; font-weight: 650; border: 0; background: none; cursor: pointer; }

.home-hero { position: relative; min-width: 0; max-width: 100%; overflow: hidden; min-height: 360px; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); border: 1px solid #d9d2c8; border-radius: var(--radius-lg); background: #eee9df; box-shadow: var(--shadow); }
.hero-copy { position: relative; z-index: 2; min-width: 0; display: flex; flex-direction: column; justify-content: center; padding: clamp(32px, 5vw, 70px); }
.hero-copy .page-title { max-width: 610px; }
.hero-copy .page-intro { max-width: 560px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; }
.hero-visual { position: relative; min-width: 0; max-width: 100%; min-height: 360px; overflow: hidden; }
.hero-visual:after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #eee9df 0, transparent 35%), linear-gradient(0deg, rgba(25,22,19,.2), transparent 45%); }
.hero-visual img { width: 100%; height: 100%; object-fit: cover; }
.hero-date { position: absolute; z-index: 2; right: 22px; bottom: 20px; padding: 8px 11px; border-radius: 8px; color: white; background: rgba(30,27,24,.7); backdrop-filter: blur(8px); font-size: 11px; }
.hero-change { position: absolute; z-index: 3; left: 18px; top: 24px; width: 190px; padding: 13px; border: 1px solid rgba(255,255,255,.48); border-radius: 13px; color: white; background: rgba(38,31,29,.72); backdrop-filter: blur(12px); box-shadow: 0 12px 30px rgba(0,0,0,.16); }
.hero-change small { display: block; opacity: .72; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.hero-change strong { display: block; margin-top: 5px; font-size: 13px; }
.stats-strip { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.stat { position: relative; padding: 18px 20px; }
.stat + .stat:before { content: ""; position: absolute; left: 0; top: 17px; bottom: 17px; width: 1px; background: var(--line-soft); }
.stat strong { display: block; font-size: 22px; letter-spacing: -.035em; }
.stat span { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }

.subject-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.subject-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); cursor: pointer; transition: transform .2s, box-shadow .2s, border .2s; }
.subject-card:hover { transform: translateY(-3px); border-color: #c9c2b7; box-shadow: var(--shadow); }
.subject-photo { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-3); }
.subject-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.subject-card:hover .subject-photo img { transform: scale(1.025); }
.subject-photo .photo-count { position: absolute; right: 9px; bottom: 9px; padding: 5px 8px; border-radius: 7px; color: white; background: rgba(24,22,20,.68); backdrop-filter: blur(7px); font-size: 10px; }
.subject-body { padding: 16px; }
.subject-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.subject-body h3 { margin: 0; font-size: 15px; letter-spacing: -.015em; }
.subject-body p { min-height: 34px; margin: 8px 0 14px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.subject-meta { display: flex; justify-content: space-between; gap: 8px; color: var(--dim); font-size: 10px; }
.confidence-ring { --score: 96%; position: relative; width: 29px; height: 29px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: conic-gradient(var(--mint) var(--score), var(--surface-3) 0); }
.confidence-ring:after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--surface); }
.confidence-ring span { position: relative; z-index: 1; font-size: 8px; font-weight: 700; }
.change-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.change-card { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); cursor: pointer; }
.change-card:hover { border-color: #c7beb2; }
.change-type { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.change-type i { width: 7px; height: 7px; border-radius: 50%; background: var(--violet); }
.change-card h3 { margin: 13px 0 6px; font-size: 14px; }
.change-card p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }

.ask-banner { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 24px; margin-top: 44px; padding: 24px 28px; border-radius: var(--radius-lg); background: var(--ink); color: white; }
.ask-banner h2 { margin: 0; font-size: 21px; letter-spacing: -.025em; }
.ask-banner p { margin: 7px 0 0; color: rgba(255,255,255,.64); font-size: 12px; }
.ask-banner .primary-button { color: var(--ink); background: white; box-shadow: none; }

.filter-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.filter-chip { padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: var(--surface); cursor: pointer; font-size: 11px; }
.filter-chip.active { border-color: var(--ink); color: white; background: var(--ink); }
.usecase-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.usecase-card { --accent: var(--violet); position: relative; min-height: 220px; display: flex; flex-direction: column; overflow: hidden; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); cursor: pointer; transition: transform .2s, box-shadow .2s; }
.usecase-card:before { content: ""; position: absolute; right: -38px; top: -42px; width: 125px; height: 125px; border: 18px solid color-mix(in srgb, var(--accent) 17%, transparent); border-radius: 50%; }
.usecase-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.usecase-card.coral { --accent: var(--coral); }.usecase-card.blue { --accent: var(--blue); }.usecase-card.mint { --accent: var(--mint); }.usecase-card.amber { --accent: var(--amber); }.usecase-card.green { --accent: var(--green); }
.usecase-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; color: var(--accent); background: color-mix(in srgb, var(--accent) 13%, white); font-weight: 750; }
.usecase-card small { margin-top: 22px; color: var(--accent); font-size: 10px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.usecase-card h3 { margin: 7px 0 8px; font-size: 17px; letter-spacing: -.02em; }
.usecase-card p { margin: 0 0 20px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.usecase-found { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 13px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 10px; }
.usecase-found svg { width: 15px; color: var(--accent); }

.detail-hero { position: relative; overflow: hidden; min-height: 390px; display: grid; align-items: end; border-radius: var(--radius-lg); background: var(--ink); color: white; box-shadow: var(--shadow); }
.detail-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .72; }
.detail-hero:after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(20,18,16,.9), rgba(20,18,16,.05) 75%); }
.detail-hero-copy { position: relative; z-index: 1; padding: 34px; }
.detail-hero .eyebrow { color: #d9ccff; }
.detail-hero h1 { max-width: 700px; margin: 0; font-size: clamp(32px, 4vw, 52px); letter-spacing: -.05em; }
.detail-hero p { max-width: 650px; margin: 12px 0 0; color: rgba(255,255,255,.72); line-height: 1.5; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 20px; }
.detail-meta span { padding: 7px 10px; border: 1px solid rgba(255,255,255,.24); border-radius: 999px; background: rgba(20,18,16,.34); backdrop-filter: blur(7px); font-size: 10px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 16px; color: var(--muted); font-size: 12px; }
.back-link svg { width: 16px; transform: rotate(180deg); }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .65fr); gap: 18px; margin-top: 20px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 17px 19px; border-bottom: 1px solid var(--line-soft); }
.panel-head h2, .panel-head h3 { margin: 0; font-size: 15px; }
.panel-head span { color: var(--muted); font-size: 10px; }
.panel-body { padding: 19px; }
.state-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.state-chip { padding: 7px 10px; border-radius: 999px; color: var(--mint); background: var(--mint-soft); font-size: 10px; font-weight: 600; }
.timeline-list { position: relative; display: grid; gap: 0; }
.timeline-list:before { content: ""; position: absolute; left: 12px; top: 14px; bottom: 14px; width: 1px; background: var(--line); }
.timeline-event { position: relative; display: grid; grid-template-columns: 25px 1fr auto; gap: 12px; align-items: start; padding: 13px 0; }
.timeline-event i { position: relative; z-index: 1; width: 9px; height: 9px; margin: 5px 0 0 8px; border: 2px solid var(--surface); border-radius: 50%; background: var(--violet); box-shadow: 0 0 0 1px var(--violet); }
.timeline-event.unverifiable i { background: var(--amber); box-shadow: 0 0 0 1px var(--amber); }
.timeline-event h3 { margin: 0; font-size: 13px; }
.timeline-event p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.timeline-event button { padding: 5px 8px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); background: var(--surface); cursor: pointer; font-size: 9px; }
.coverage-meter { height: 7px; overflow: hidden; border-radius: 999px; background: var(--surface-3); }
.coverage-meter span { display: block; height: 100%; border-radius: inherit; background: var(--mint); }
.coverage-copy { margin: 10px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.view-grid { display: grid; grid-template-columns: 1fr 50px 50px; gap: 0; margin-top: 14px; font-size: 10px; }
.view-grid > * { padding: 8px 5px; border-top: 1px solid var(--line-soft); text-align: center; }
.view-grid > :nth-child(3n+1) { text-align: left; color: var(--muted); }
.view-grid .yes { color: var(--mint); }.view-grid .no { color: var(--danger); }

.ask-page { display: grid; grid-template-columns: minmax(0, 1.25fr) 320px; gap: 18px; align-items: start; }
.chat-card { min-height: 640px; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 17px 20px; border-bottom: 1px solid var(--line-soft); }
.agent-avatar { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 12px; color: var(--violet-dark); background: var(--violet-soft); }
.agent-avatar svg { width: 18px; }
.chat-head strong { display: block; font-size: 13px; }.chat-head small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.chat-status { margin-left: auto; display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; }.chat-status i { width: 6px; height: 6px; border-radius: 50%; background: var(--mint); }
.messages { flex: 1; min-height: 430px; display: flex; flex-direction: column; gap: 16px; padding: 25px; overflow: auto; }
.message { max-width: min(650px, 88%); }
.message.user { align-self: flex-end; }
.message-bubble { padding: 13px 15px; border-radius: 15px; color: var(--ink); background: var(--surface-2); font-size: 13px; line-height: 1.55; }
.message.user .message-bubble { border-bottom-right-radius: 5px; color: white; background: var(--ink); }
.message.agent .message-bubble { border-bottom-left-radius: 5px; }
.message.agent .message-bubble h3 { margin: 0 0 7px; font-size: 15px; letter-spacing: -.015em; }
.message-meta { display: flex; align-items: center; gap: 8px; margin: 7px 3px 0; color: var(--dim); font-size: 9px; }
.message.user .message-meta { justify-content: flex-end; }
.confidence-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 7px; border-radius: 999px; color: var(--mint); background: var(--mint-soft); font-weight: 650; }
.confidence-badge.low { color: var(--amber); background: var(--amber-soft); }
.evidence-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 11px; }
.evidence-mini { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; }
.evidence-mini img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.evidence-mini span { display: block; padding: 8px; color: var(--muted); font-size: 9px; }
.answer-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.answer-actions button, .choice-button { padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: var(--surface); cursor: pointer; font-size: 10px; }
.answer-actions button:hover, .choice-button:hover { color: var(--violet-dark); border-color: #c3b7eb; }
.answer-coverage { margin-top: 9px; padding: 9px 10px; border-radius: 8px; color: var(--amber); background: var(--amber-soft); font-size: 10px; line-height: 1.45; }
.choice-row { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.chat-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 14px; border-top: 1px solid var(--line-soft); background: var(--surface); }
.chat-form textarea { min-height: 46px; max-height: 120px; resize: none; padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px; outline: none; background: var(--bg); color: var(--ink); font-size: 12px; }
.chat-form textarea:focus { border-color: #ad9cdd; box-shadow: 0 0 0 3px var(--violet-soft); }
.chat-form button { width: 46px; height: 46px; display: grid; place-items: center; border: 0; border-radius: 12px; color: white; background: var(--violet); cursor: pointer; }
.chat-form button svg { width: 18px; }
.chat-form button:disabled { opacity: .45; cursor: default; }
.quick-panel { display: grid; gap: 12px; }
.quick-card { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.quick-card h2 { margin: 0 0 12px; font-size: 14px; }
.prompt-list { display: grid; gap: 7px; }
.prompt-button { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 11px; border: 1px solid var(--line-soft); border-radius: 9px; color: var(--muted); background: var(--bg); cursor: pointer; text-align: left; font-size: 10px; line-height: 1.4; }
.prompt-button:hover { color: var(--ink); border-color: #c7beb1; background: var(--surface); }
.prompt-button svg { width: 13px; flex: 0 0 auto; }
.memory-mini { display: grid; gap: 9px; }.memory-mini div { display: flex; gap: 8px; color: var(--muted); font-size: 10px; line-height: 1.45; }.memory-mini svg { width: 14px; flex: 0 0 auto; color: var(--violet); }

.source-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; }
.source-card { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.source-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; color: var(--blue); background: var(--blue-soft); }
.source-card h3 { margin: 15px 0 6px; font-size: 15px; }.source-card p { min-height: 35px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.source-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line-soft); color: var(--dim); font-size: 9px; }
.activity-list { display: grid; }.activity-row { display: grid; grid-template-columns: 48px 10px 1fr auto; gap: 12px; align-items: start; padding: 15px 0; border-top: 1px solid var(--line-soft); }.activity-row:first-child { border: 0; }.activity-row time { color: var(--dim); font-size: 10px; }.activity-row i { width: 8px; height: 8px; margin-top: 2px; border-radius: 50%; background: var(--mint); }.activity-row i.attention { background: var(--amber); }.activity-row strong { display: block; font-size: 12px; }.activity-row span { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.pipeline { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }.pipeline-step { position: relative; min-height: 115px; padding: 14px; border-radius: 12px; background: var(--surface-2); }.pipeline-step:not(:last-child):after { content: "→"; position: absolute; z-index: 2; right: -10px; top: 44px; color: var(--dim); }.pipeline-step b { display: block; color: var(--violet); font: 10px ui-monospace, monospace; }.pipeline-step strong { display: block; margin-top: 13px; font-size: 11px; }.pipeline-step span { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; line-height: 1.4; }
.honesty-callout { display: flex; align-items: flex-start; gap: 12px; margin-top: 18px; padding: 16px; border: 1px solid #e7d9ae; border-radius: 13px; color: #6f5418; background: #fcf5df; font-size: 11px; line-height: 1.55; }.honesty-callout svg { flex: 0 0 auto; color: var(--amber); }

.memory-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }.memory-item { padding: 14px 0; border-top: 1px solid var(--line-soft); }.memory-item:first-child { border-top: 0; padding-top: 0; }.memory-item strong { display: block; font-size: 12px; }.memory-item p { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; }.memory-item small { display: inline-block; margin-top: 8px; padding: 4px 7px; border-radius: 999px; color: var(--violet-dark); background: var(--violet-soft); font-size: 8px; }

.modal { width: min(840px, calc(100vw - 30px)); max-height: min(780px, calc(100vh - 30px)); padding: 0; overflow: hidden auto; border: 0; border-radius: 20px; background: var(--surface); box-shadow: 0 24px 90px rgba(25,22,18,.28); }.modal::backdrop { background: rgba(26,23,20,.48); backdrop-filter: blur(5px); }.modal-head { position: sticky; top: 0; z-index: 3; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line-soft); background: rgba(255,254,251,.94); backdrop-filter: blur(12px); }.modal-head h2 { margin: 0; font-size: 16px; }.modal-close { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); cursor: pointer; }.modal-close svg { width: 16px; }.modal-body { padding: 22px; }.modal-photo { width: 100%; max-height: 420px; object-fit: cover; border-radius: 14px; }.evidence-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }.evidence-detail div { padding: 13px; border-radius: 10px; background: var(--surface-2); }.evidence-detail small { display: block; color: var(--dim); font-size: 9px; text-transform: uppercase; letter-spacing: .06em; }.evidence-detail strong { display: block; margin-top: 5px; font-size: 11px; line-height: 1.45; }.trace-list { display: grid; gap: 9px; }.trace-step { display: grid; grid-template-columns: 24px 1fr; gap: 10px; padding: 12px; border-radius: 10px; background: var(--surface-2); }.trace-step i { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; color: var(--mint); background: var(--mint-soft); font: 10px var(--font); }.trace-step.refused i, .trace-step.needs_input i { color: var(--amber); background: var(--amber-soft); }.trace-step strong { display: block; font-size: 11px; }.trace-step span { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.45; }.search-modal-form { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }.search-modal-form input { width: 100%; padding: 7px 0; border: 0; outline: 0; background: transparent; font-size: 17px; }.search-results { padding: 10px; }.search-result { width: 100%; display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 10px; border: 0; border-radius: 11px; background: transparent; cursor: pointer; text-align: left; }.search-result:hover { background: var(--surface-2); }.search-result img { width: 44px; height: 44px; object-fit: cover; border-radius: 9px; }.search-result strong { display: block; font-size: 12px; }.search-result span { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }.search-result svg { width: 15px; color: var(--dim); }
.toast { position: fixed; z-index: 90; left: 50%; bottom: 24px; max-width: min(430px, calc(100vw - 30px)); padding: 11px 15px; border-radius: 10px; color: white; background: var(--ink); box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translate(-50%, 15px); transition: opacity .2s, transform .2s; font-size: 11px; }.toast.show { opacity: 1; transform: translate(-50%, 0); }
.noscript { position: fixed; z-index: 100; inset: auto 20px 20px; padding: 14px; color: white; background: var(--danger); border-radius: 10px; text-align: center; }
.mobile-nav { display: none; }

@media (max-width: 1120px) {
  :root { --sidebar: 216px; }
  .subject-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .usecase-grid { grid-template-columns: repeat(2, 1fr); }
  .pipeline { grid-template-columns: repeat(3, 1fr); }.pipeline-step:nth-child(3):after { display: none; }
  .source-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 840px) {
  .sidebar { display: none; }
  .workspace { margin: 0; }
  .topbar { min-height: 62px; padding: 9px 16px; }
  .mobile-brand { display: flex; }
  .search-trigger { width: 40px; height: 40px; justify-content: center; padding: 0; border-radius: 11px; }
  .search-trigger span, .search-trigger kbd, .demo-pill, .top-actions .primary-button { display: none; }
  main { min-height: calc(100vh - 62px); padding: 26px 16px 92px; }
  .mobile-nav { position: fixed; z-index: 30; inset: auto 0 0; display: grid; grid-template-columns: repeat(5, 1fr); padding: 7px 8px calc(7px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(250,248,243,.95); backdrop-filter: blur(18px); }
  .mobile-nav a { min-height: 48px; display: grid; place-items: center; align-content: center; gap: 3px; border-radius: 10px; color: var(--muted); font-size: 9px; }
  .mobile-nav a svg { width: 19px; height: 19px; }.mobile-nav a.active { color: var(--violet-dark); background: var(--violet-soft); }
  .home-hero { grid-template-columns: 1fr; }.hero-copy { padding: 32px 25px; }.hero-visual { min-height: 280px; }.hero-visual:after { background: linear-gradient(0deg, rgba(25,22,19,.3), transparent); }
  .stats-strip { grid-template-columns: repeat(2, 1fr); }.stat:nth-child(3):before { display: none; }.stat:nth-child(n+3) { border-top: 1px solid var(--line-soft); }
  .change-list { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .ask-page { grid-template-columns: 1fr; }.quick-panel { grid-template-columns: repeat(2, 1fr); }.chat-card { min-height: 600px; }
  .page-head { align-items: flex-start; flex-direction: column; }.page-actions { width: 100%; }
  .memory-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .page-title { font-size: 35px; }.page-intro { font-size: 14px; }.page-head .page-title { font-size: 31px; }
  .subject-grid, .usecase-grid, .source-grid, .quick-panel { grid-template-columns: 1fr; }
  .subject-card { display: grid; grid-template-columns: 122px 1fr; }.subject-photo { aspect-ratio: auto; min-height: 145px; }.subject-body p { min-height: 0; }
  .ask-banner { grid-template-columns: 1fr; padding: 22px; }.ask-banner .primary-button { width: 100%; }
  .detail-hero { min-height: 350px; }.detail-hero-copy { padding: 25px; }.detail-hero h1 { font-size: 35px; }
  .pipeline { grid-template-columns: 1fr 1fr; }.pipeline-step:nth-child(3):after { display: block; }.pipeline-step:nth-child(even):after { display: none; }
  .messages { padding: 18px 14px; }.message { max-width: 95%; }.evidence-row { grid-template-columns: 1fr; }
  .evidence-detail { grid-template-columns: 1fr; }.modal-body { padding: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { scroll-behavior: auto !important; animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

@media (prefers-contrast: more) {
  :root { --line: #9d978d; --muted: #4c4943; }
}

/* Material 3 / Google-product finish and photo-library surfaces. */
:focus-visible { outline: 3px solid rgba(11, 87, 208, .32); outline-offset: 2px; }
.page-title { font-weight: 500; letter-spacing: -.038em; }
.eyebrow { color: #0b57d0; letter-spacing: .08em; }
.primary-button, .secondary-button, .ghost-button, .filter-chip { border-radius: 999px; }
.primary-button.violet { background: #0b57d0; }
.secondary-button { border-color: #c4c7c5; }
.search-trigger { border: 0; border-radius: 999px; background: #eef3f8; }
.search-trigger:hover { border: 0; background: #e8eef7; }
.icon-button { border: 0; border-radius: 50%; background: transparent; }
.demo-pill { border-color: #c4c7c5; background: white; }
.demo-pill.live { border-color: #a8dab5; color: #137333; background: #e6f4ea; }
.demo-pill.live i { background: #188038; box-shadow: 0 0 0 3px rgba(52,168,83,.15); }
.home-hero { border: 0; background: #e9f0ff; box-shadow: none; }
.hero-visual:after { background: linear-gradient(90deg, #e9f0ff 0, transparent 35%), linear-gradient(0deg, rgba(32,33,36,.22), transparent 45%); }
.subject-card, .change-card, .panel, .usecase-card, .source-card, .quick-card, .chat-card { border-color: #dde3ea; }
.subject-card:hover, .usecase-card:hover { border-color: #b7c7df; box-shadow: 0 4px 14px rgba(60,64,67,.13); }
.ask-banner { background: #0b57d0; }
.agent-avatar { border-radius: 50%; color: #0b57d0; background: #d3e3fd; }
.chat-form button { border-radius: 50%; background: #0b57d0; }
.filter-chip.active { border-color: #0b57d0; color: #041e49; background: #d3e3fd; }
.modal { width: min(1000px, calc(100vw - 30px)); border-radius: 28px; }
.modal-head { background: rgba(255,255,255,.94); }

.photo-preview-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: 92px; gap: 5px; overflow: hidden; border-radius: 22px; background: #dfe5ed; }
.photo-preview-grid .gallery-tile { min-height: 0; grid-column: span 1; grid-row: span 2; border-radius: 0; }
.photo-preview-grid .gallery-tile:first-child { grid-column: span 2; grid-row: span 4; }
.photo-preview-grid .gallery-tile:nth-child(4) { grid-column: span 2; }

.gallery-page { width: min(1500px, 100%); overflow: hidden; }
.gallery-head { margin-bottom: 20px; }
.gallery-toolbar { position: sticky; z-index: 8; top: 72px; max-width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 0 0 32px; padding: 10px 0; overflow: hidden; background: rgba(248,250,253,.93); backdrop-filter: blur(14px); }
.gallery-toolbar .filter-row { min-width: 0; max-width: 100%; flex: 1; margin: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.gallery-toolbar .filter-row::-webkit-scrollbar { display: none; }
.gallery-toolbar > span { flex: 0 0 auto; color: var(--muted); font-size: 12px; }
.gallery-month { margin-top: 30px; }
.gallery-month > header { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 12px; padding: 0 4px; }
.gallery-month h2 { margin: 0; font-size: 20px; font-weight: 500; letter-spacing: -.025em; }
.gallery-month header span { color: var(--muted); font-size: 11px; }
.gallery-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-flow: dense; grid-auto-rows: 96px; gap: 5px; }
.gallery-tile { position: relative; min-width: 0; min-height: 0; grid-row: span 2; overflow: hidden; padding: 0; border: 0; border-radius: 8px; background: #e8eaed; cursor: pointer; }
.gallery-tile.shape-0, .gallery-tile.shape-6 { grid-column: span 2; grid-row: span 3; }
.gallery-tile.shape-3 { grid-column: span 2; }
.gallery-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .28s ease, filter .28s ease; }
.gallery-tile:hover img { transform: scale(1.025); filter: brightness(.88); }
.gallery-overlay { position: absolute; inset: auto 0 0; display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; padding: 32px 12px 11px; color: white; background: linear-gradient(transparent, rgba(0,0,0,.64)); opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s; text-align: left; }
.gallery-tile:hover .gallery-overlay, .gallery-tile:focus-visible .gallery-overlay { opacity: 1; transform: none; }
.gallery-overlay strong { overflow: hidden; font-size: 12px; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.gallery-overlay small { flex: 0 0 auto; font-size: 9px; opacity: .82; }
.photo-ai-state { position: absolute; z-index: 2; top: 9px; right: 9px; padding: 5px 8px; border-radius: 999px; color: #174ea6; background: rgba(232,240,254,.94); font-size: 9px; font-weight: 650; box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.photo-ai-state.error { color: #a50e0e; background: rgba(252,232,230,.95); }
.empty-gallery { min-height: 300px; display: grid; place-content: center; justify-items: center; color: var(--muted); text-align: center; }
.empty-gallery > svg { width: 42px; height: 42px; color: #0b57d0; }
.empty-gallery h2 { margin: 16px 0 4px; color: var(--ink); font-weight: 500; }
.empty-gallery p { margin: 0; }

.photo-viewer { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .65fr); min-height: min(680px, calc(100vh - 50px)); }
.photo-viewer-image { min-height: 520px; display: grid; place-items: center; overflow: hidden; background: #111317; }
.photo-viewer-image img { width: 100%; height: 100%; max-height: min(730px, calc(100vh - 50px)); object-fit: contain; }
.photo-viewer-info { min-width: 0; display: flex; flex-direction: column; background: white; }
.photo-viewer-info .modal-head { position: static; }
.photo-viewer-body { display: flex; flex: 1; flex-direction: column; gap: 18px; padding: 22px; overflow-y: auto; }
.photo-viewer-body > p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.photo-viewer-body .evidence-detail { grid-template-columns: 1fr; margin: 0; }
.model-proof { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; color: #174ea6; background: #e8f0fe; }
.model-proof .gemini-spark { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; color: white; background: linear-gradient(135deg, #1a73e8, #a142f4 70%, #d93025); }
.model-proof small, .model-proof strong, .model-proof span { display: block; }
.model-proof small { font-size: 9px; text-transform: uppercase; letter-spacing: .06em; }
.model-proof strong { margin-top: 3px; font-size: 12px; }
.model-proof span { margin-top: 3px; color: #3c4043; font-size: 9px; }
.photo-viewer-body > .secondary-button { margin-top: auto; }

.dropzone { min-height: 120px; display: grid; place-content: center; justify-items: center; gap: 6px; margin-top: 14px; border: 2px dashed #b7c7df; border-radius: 18px; color: var(--muted); background: #f8fafd; text-align: center; transition: border-color .15s, background .15s; }
.dropzone svg { width: 26px; color: #0b57d0; }
.dropzone strong { color: var(--ink); font-size: 12px; }
.dropzone span { font-size: 10px; }
.dropzone.dragging { border-color: #0b57d0; background: #e8f0fe; }

@media (max-width: 1120px) {
  .gallery-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .photo-preview-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .photo-preview-grid .gallery-tile:nth-child(n+6) { display: none; }
}

@media (max-width: 840px) {
  .mobile-brand .brand-mark span { position: static; width: auto; height: auto; }
  .gallery-toolbar { top: 62px; }
  .gallery-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 78px; }
  .photo-viewer { grid-template-columns: 1fr; }
  .photo-viewer-image { min-height: 310px; max-height: 50vh; }
  .photo-viewer-image img { max-height: 50vh; }
}

@media (max-width: 560px) {
  .photo-preview-grid { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 70px; }
  .photo-preview-grid .gallery-tile:first-child { grid-column: span 2; grid-row: span 3; }
  .gallery-toolbar { align-items: flex-start; flex-direction: column; gap: 8px; margin-bottom: 22px; }
  .gallery-toolbar > span { display: none; }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 90px; gap: 3px; }
  .gallery-tile.shape-0, .gallery-tile.shape-6 { grid-column: span 2; grid-row: span 3; }
  .gallery-overlay { opacity: 1; transform: none; }
  .import-options { grid-template-columns: 1fr !important; }
}
