/* Layout study: the sketch's conversation / highlights composition. */
@media (min-width: 1051px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
    --shared-panel-height: clamp(650px, calc(100svh - 175px), 790px);
    border-radius: 28px;
    overflow: visible;
    box-shadow: none;
  }
  .workspace .ai-guide, .workspace .experience {
    border-radius: 28px;
    border: 1px solid rgba(255,255,255,.54);
    box-shadow: 0 24px 60px rgba(22,25,28,.12);
    min-width: 0;
  }
  .workspace .ai-guide { order: 1; }
  .workspace .experience {
    order: 2;
    padding: 28px clamp(24px,2.2vw,36px) 26px;
    display: grid;
    grid-template-rows: auto minmax(0,1fr) auto;
    gap: 20px;
  }
  .workspace .answer-grid,
  .workspace .experience[data-mode="welcome"] .answer-grid {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 24px;
    min-height: 0;
    overflow: hidden;
  }
  .workspace .answer-grid:focus-visible { outline: 2px solid #397467; outline-offset: -2px; }
  .workspace .editorial-column {
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 22px;
  }
  .workspace .editorial-column .copy-column { align-self: stretch; }
  .workspace .experience .eyebrow { margin-bottom: 12px; }
  .workspace .experience #title,
  .workspace .experience[data-mode="welcome"] #title,
  .workspace .experience:not([data-mode="welcome"]) #title {
    font-size: clamp(30px, 2.45vw, 42px);
    line-height: 1.08;
    max-width: 20ch;
    margin-bottom: 12px;
  }
  .workspace .copy-column p { font-size: 15px; line-height: 1.45; }
  .workspace .mode-panel { display: block; height: auto; min-height: 0; }
  .workspace .mode-panel > :first-child { overflow: visible; }
  .workspace .guide-input { margin-bottom: 26px; }
  .workspace .evidence-bottom { align-items: stretch; }
  .workspace .report-actions { justify-content: flex-start; flex-wrap: wrap; }
}
@media (max-width: 1050px) {
  .workspace .ai-guide { order: 1; }
  .workspace .experience { order: 2; }
}

/* Annotated review — 9 November 2026. */
.workspace .guide-header { align-items: center; gap: 12px; }
.workspace .guide-title {
  margin: 0;
  font: normal 24px/1.2 Georgia, 'Times New Roman', serif;
  letter-spacing: -.025em;
}
.assistant-badge {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  gap: 8px;
  padding: 9px 13px;
  border-radius: 999px;
  background: #ebf5ed; /* Summa light green, tinted with white */
  color: #397467; /* Summa forest green */
  font: 500 12px/1.2 Roboto, Arial, sans-serif;
  white-space: nowrap;
}
.assistant-badge svg { width: 18px; height: 18px; }
.workspace .experience[data-mode="welcome"] .editorial-column { display: none; }
.workspace .experience #title { font-family: Georgia, serif; font-weight: 400; letter-spacing: -.045em; }
.workspace .guide-suggestions {
  display: flex;
  gap: 8px;
}
.workspace .guide-suggestions button {
  min-height: 32px;
  padding: 7px 13px;
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 999px;
  justify-content: center;
  text-align: center;
  font: 400 10px/1.2 Roboto, Arial, sans-serif;
  background: rgba(248,245,241,.72);
  color: var(--ink);
}
.workspace .guide-suggestions button:hover { background: rgba(255,253,250,.94); border-color: rgba(255,255,255,.5); transform: none; }
.workspace .guide-suggestions button:focus-visible { outline: 2px solid #397467; outline-offset: 3px; }
.workspace .guide-next { padding-bottom: 10px; }
@media (min-width:1051px) {
  .workspace .experience[data-mode="welcome"] .answer-grid { justify-content: center; }
}
@media (max-width:1050px) {
  .workspace .experience #title { font-size: 38px; line-height: 1.08; margin: 0 0 16px; }
  .workspace { gap: 16px; }
}
@media (max-width:600px) {
  .workspace .guide-title { font-size: 21px; }
  .assistant-badge { font-size: 11px; padding: 8px 10px; gap: 6px; }
  .assistant-badge svg { width: 16px; height: 16px; }
  .workspace .guide-header { gap: 8px; }
  .workspace .guide-suggestions button { min-height: 44px; padding: 10px 14px; font: 400 13px/1.35 Roboto, Arial, sans-serif; }
}

/* Unframed welcome grid: one surface per question, without a nested container. */
.workspace .welcome-panel {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  gap: 24px;
}
.workspace .start-routes { gap: 16px; padding: 0; }
.workspace .experience[data-mode="welcome"] .start-route {
  padding: 24px;
  min-height: 172px;
  justify-content: center;
}
@media (max-width:600px) {
  .workspace .welcome-panel { gap: 20px; }
  .workspace .start-routes { gap: 12px; }
  .workspace .experience[data-mode="welcome"] .start-route { padding: 22px; min-height: 148px; }
}

/* Balance the welcome content across the outlined inner area. */
@media (min-width:1051px) {
  .workspace .experience[data-mode="welcome"] .answer-grid { justify-content: flex-start; }
  .workspace .experience[data-mode="welcome"] .mode-panel { display: flex; flex: 1 0 auto; }
  .workspace .experience[data-mode="welcome"] .welcome-panel { flex: 1; min-height: 0; }
  .workspace .experience[data-mode="welcome"] .start-routes {
    flex: 1;
    grid-template-rows: repeat(2, minmax(172px, 1fr));
  }
}

/* Report figures and their currency symbols use Roboto Regular. */
.market-metrics .metric-amount,
.market-metrics .metric-unit,
.market-metrics .metric-currency,
.market-card .market-total,
.market-chart strong,
.metric-study .comparison-chart .comparison-value,
.metric-study .comparison-chart .comparison-year,
.metric-study .comparison-chart .comparison-tick {
  font-family: Roboto, Arial, sans-serif;
  font-weight: 400;
  letter-spacing: -.02em;
}

/* GRC illustration over the existing light-green page background. */
.illustrated-background .background-art { display: none; }
.illustrated-background::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url('assets/grc-thematic-cover-04.png') center center / cover no-repeat;
  pointer-events: none;
}
@media (max-width:600px) {
  .illustrated-background::after { background-size: 100% auto; background-position: center top; }
}

/* Center labels and icons consistently across pill controls. */
.workspace .guide-suggestions button,
.workspace .report-actions .pill,
.workspace .assistant-badge,
.site-navigation .nav-start {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.2;
}
.workspace .guide-suggestions button > span,
.workspace .report-actions .pill > span { display: block; line-height: inherit; }
.workspace .report-actions .pill svg,
.workspace .assistant-badge svg { flex-shrink: 0; display: block; }

/* Roboto's ink sits slightly below its line-box center: optically align pill text. */
.workspace .guide-suggestions button > span,
.workspace .report-actions .pill > span {
  position: relative;
  top: -1px;
}

/* Keep the report's content and action row on a shared, fixed-width grid. */
@media (min-width:1051px) {
  .workspace .experience {
    grid-template-columns: minmax(0, 1fr);
    justify-content: stretch;
  }
}

/* Align the question pills with the composer at each layout size. */
.workspace .guide-next { padding-inline: 18px; }
@media (max-width:600px) {
  .workspace .guide-next { padding-inline: 12px; }
}

/* Match the chat's native scrollbar at the outside edge of the report panel. */
@media (min-width:1051px) {
  .workspace .experience {
    --report-inline-inset: clamp(24px, 2.2vw, 36px);
    padding-inline: var(--report-inline-inset);
  }
  .workspace .answer-grid {
    width: calc(100% + 2 * var(--report-inline-inset));
    margin-left: calc(-1 * var(--report-inline-inset));
    padding-left: var(--report-inline-inset);
    padding-right: var(--report-inline-inset);
  }
}

/* Supporting captions share one readable type treatment. */
.workspace .evidence-footnote,
.workspace .welcome-panel-caption {
  font-size: 12px;
  line-height: 1.5;
}

/* Claude's supplied canvas loader: the artwork stays responsive and undistorted. */
.experience[data-mode="loading"] .editorial-column { display: none; }
.workspace .experience[data-mode="loading"] .answer-grid { justify-content: center; }
.workspace .experience[data-mode="loading"] .mode-panel { display: block; }
.report-loading { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 18px; padding: 12px 0; }
.loading-art { width: min(320px, 75%); flex: none; }
.loading-art[hidden] { display: none; }
.loading-copy { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.loading-kicker { color: #397467; font: 700 11px/1.4 Roboto, Arial, sans-serif; letter-spacing: .12em; }
.loading-copy h2 { margin: 0; color: var(--ink); font: 400 clamp(27px,2.3vw,34px)/1.1 Georgia,serif; letter-spacing: -.035em; }
.loading-copy p { margin: 0; color: #4c5255; font: 400 14px/1.5 Roboto,Arial,sans-serif; }
.mobile-tabs, .mobile-report-context { display: none; }
[hidden] { display: none !important; }

/* Mobile and tablet: one reading surface, persistent navigation and composer.
   These rules own the compact layout; desktop keeps its equal separate panels. */
@media (max-width:1050px) {
  :root { --compact-inset: 20px; --touch-size: 44px; }
  html { height: 100%; }
  body { height: var(--app-height, 100dvh); min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
  .site-navigation {
    position: relative; top: auto; left: auto; right: auto; transform: none;
    width: min(860px, calc(100% - 24px)); flex: none; min-height: 56px;
    margin: max(8px, env(safe-area-inset-top)) auto 0; padding: 6px 14px;
  }
  .site-navigation img { width: 140px; max-width: 40%; }
  .site-navigation .nav-start { min-height: var(--touch-size); font-size: 14px; padding: 8px 12px; }
  .page-shell {
    flex: 1; min-height: 0; width: 100%; display: flex; flex-direction: column;
    align-items: center; gap: 10px; padding: 10px max(12px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  }
  .mobile-tabs { display: grid; grid-template-columns: minmax(76px, .6fr) minmax(0, 1.4fr); flex: none; width: min(860px,100%); gap: 4px; padding: 4px; border-radius: 28px; background: rgba(255,255,255,.65); }
  .mobile-tabs button { min-width: 0; min-height: var(--touch-size); border: 0; border-radius: 24px; background: transparent; color: #397467; font: 500 14px/1.25 Roboto,Arial,sans-serif; padding: 10px 8px; display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; }
  .mobile-tabs [aria-selected="true"] { color: white; background: #397467; }
  #reportUpdated { font-size: 11px; line-height: 1.2; border: 1px solid currentColor; border-radius: 12px; padding: 2px 5px; }
  .workspace { flex: 1; min-height: 0; height: auto; display: flex; width: min(860px,100%); gap: 0; }
  .workspace .ai-guide, .workspace .experience {
    width: 100%; height: 100%; min-height: 0; max-height: none; margin: 0;
    border-radius: 24px; overflow: hidden; border: 1px solid rgba(255,255,255,.54);
  }
  .workspace .ai-guide { display: flex; flex-direction: column; }
  .workspace .guide-header { padding: 16px var(--compact-inset); gap: 8px; flex-wrap: wrap; }
  .workspace .guide-title { font-size: 24px; line-height: 1.2; }
  .workspace .assistant-badge { font-size: 12px; padding: 9px 11px; }
  .workspace .chat-thread { flex: 1; min-height: 0; padding: 0 var(--compact-inset); overflow: hidden; }
  .workspace .chat-message { padding: 20px 0; }
  .workspace .chat-message p, .workspace .chat-message.ai p { font-size: 16px; line-height: 1.55; overflow-wrap: anywhere; }
  .workspace .chat-role { font-size: 11px; }
  .workspace .evidence-link { min-height: var(--touch-size); font-size: 14px; padding-block: 12px; line-height: 1.4; color: var(--accent); }
  .workspace .guide-next { padding: 8px var(--compact-inset) 4px; }
  .workspace .guide-suggestions { gap: 8px; padding: 4px 0 6px; }
  .workspace .guide-suggestions button { min-height: var(--touch-size); padding: 10px 14px; font: 400 13px/1.35 Roboto, Arial, sans-serif; }
  .workspace .guide-input { min-height: 58px; height: 58px; margin: 4px var(--compact-inset) 16px; grid-template-columns: minmax(0,1fr) 44px; }
  .workspace .guide-input input { font-size: 16px; }
  .workspace .guide-footer, .workspace .mobile-return { display: none; }

  .workspace .experience { display: grid; grid-template-columns: minmax(0,1fr); grid-template-rows: auto minmax(0,1fr) auto; justify-content: stretch; padding: 0; gap: 0; }
  .workspace .answer-grid, .workspace .experience[data-mode="welcome"] .answer-grid {
    display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start;
    width: 100%; height: 100%; min-height: 0; margin: 0; gap: 24px;
    overflow: hidden;
    padding: 24px var(--compact-inset);
  }
  .workspace .answer-grid:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
  .workspace .answer-grid > * { flex-shrink: 0; }
  .mobile-report-context { display: block; margin: 0; font-size: 13px; line-height: 1.5; color: #4c5255; overflow-wrap: anywhere; }
  .workspace .editorial-column { height: auto; display: block; }
  .workspace .copy-column { padding: 0; }
  .workspace .experience .eyebrow { font-size: 11px; line-height: 1.5; margin-bottom: 16px; }
  .workspace .experience #title { font-size: 32px; line-height: 1.12; margin: 0 0 16px; max-width: none; }
  .workspace .copy-column p { font-size: 16px; line-height: 1.5; max-width: none; }
  .workspace .mode-panel { display: block; height: auto; min-height: 0; }
  .workspace .evidence-bottom { padding: 12px var(--compact-inset) 16px; margin: 0; border-top: 1px solid rgba(26,32,35,.10); }
  .workspace .report-actions { margin: 0; gap: 8px; align-items: stretch; }
  .workspace .report-actions .pill { min-height: var(--touch-size); height: auto; padding: 10px 12px; font-size: 14px; line-height: 1.3; white-space: normal; }
  .workspace .report-actions .source-button { width: auto; min-width: 0; }
  .workspace .report-actions svg { width: 16px; height: 16px; }
  .workspace .welcome-panel { display: flex; flex-direction: column; gap: 20px; }
  .workspace .welcome-panel-heading { display: block; padding: 0; border: 0; }
  .workspace .experience[data-mode="welcome"] .start-route { padding: 20px; min-height: 140px; }
  .workspace .start-route strong { font-size: 26px; line-height: 1.15; }
  .workspace .experience[data-mode="welcome"] .route-copy { font-size: 14px; line-height: 1.5; }
  .workspace .route-kicker, .workspace .panel-label, .workspace .world-label { font-size: 11px; line-height: 1.5; }
  .workspace .evidence-footnote, .workspace .welcome-panel-caption { font-size: 13px; line-height: 1.5; }
  .workspace .lifecycle-list { padding: 4px 20px; }
  .workspace .lifecycle-list li { grid-template-columns: 80px minmax(0,1fr); gap: 16px; padding-block: 18px; }
  .workspace .lifecycle-list strong, .workspace .lifecycle-list span,
  .workspace .direction-row strong, .workspace .direction-row p,
  .workspace .takeaway-list h3, .workspace .takeaway-list p,
  .workspace .story-copy .example-step, .workspace .state-detail { font-size: 16px; line-height: 1.5; }
  .workspace .two-way, .workspace .market-card, .workspace .takeaway-card, .workspace .conversation-state { padding: 20px 20px 32px; }
  .workspace .market-card .market-subtitle, .workspace .market-card .market-chart li > div:first-child { font-size: 14px; line-height: 1.45; }
  .workspace .story-media figcaption, .workspace .story-placeholder span { font-size: 12px; }
  .workspace .story-copy { padding: 24px 20px 32px; }
  .workspace .support-heading { font-size: 28px; line-height: 1.15; }
  .workspace .state-action { font-size: 14px; }
  .workspace .metric-study { --metric-label-side: 20px; --metric-label-top: 20px; }
  .workspace .metric-study .metric-copy { font-size: 14px; line-height: 1.5; }
  .workspace .metric-study .comparison-chart { max-width: 320px; width: 100%; }
  .workspace .metric-study .comparison-caption { font-size: 13px; }
  .workspace .metric-study .comparison-chart .comparison-tick { font-size: 19px; }
  .workspace .metric-study .comparison-chart .comparison-kind { font-size: 20px; }
  .workspace .metric-study .comparison-chart .comparison-year { font-size: 21px; }
  .workspace .report-loading { min-height: 0; padding: 0; }
  .workspace .experience[data-mode="loading"] .answer-grid { container-type: size; }
  .workspace .loading-art { width: clamp(96px, calc((100cqh - 150px) * .895), 280px); max-width: 85%; }
  .workspace .loading-copy p { font-size: 16px; }
  dialog { max-height: calc(var(--app-height, 100dvh) - 32px); }
  .close-dialog { min-width: 44px; min-height: 44px; }
  .source-intro, .source-entry p { font-size: 16px; }
  .source-links a, .source-download { min-height: 44px; display: inline-flex; align-items: center; font-size: 14px; }
}
@media (max-width:600px) {
  :root { --compact-inset: 16px; }
  .site-navigation > span { display: none; }
  .site-navigation img { width: 126px; max-width: 55%; }
  .workspace .guide-title { font-size: 22px; }
  .workspace .guide-header { padding-block: 14px; }
  .workspace .report-actions { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(0,1fr); }
  .workspace .report-actions .primary { grid-row: 2; grid-column: 1/-1; }
  .workspace .report-actions .pill:not(.primary) { min-height: 56px; }
  .workspace .experience #title { font-size: 30px; }
  .workspace .market-metrics.metric-study { grid-template-columns: minmax(0,1fr); gap: 12px; }
  .workspace .metric-study .report-metric:not(.metric-growth) { min-height: 200px; }
  .workspace .metric-study .metric-value, .workspace .metric-study .metric-growth .metric-value { font-size: 48px; }
  .workspace .metric-study .metric-growth { padding: 20px 20px 32px; }
  .workspace .lifecycle-list li { grid-template-columns: 1fr; gap: 6px; }
}
@media (max-width:360px) {
  .workspace .guide-title { font-size: 20px; }
  .workspace .assistant-badge { font-size: 11px; padding-inline: 8px; gap: 4px; }
  .workspace .assistant-badge svg { width: 14px; height: 14px; }
  .workspace .report-actions .pill { font-size: 13px; padding-inline: 8px; }
  .workspace .metric-study .comparison-chart .comparison-tick { font-size: 21px; }
}
@media (max-width:1050px) and (max-height:500px) {
  .site-navigation { display: none; }
  .page-shell { padding-top: 6px; gap: 6px; }
  .workspace .guide-header { padding-block: 8px; }
  .workspace .guide-next { padding-block: 2px; }
  .workspace .guide-input { margin-bottom: 8px; }
}
/* A software keyboard may resize only the visual viewport, not media queries. */
@media (max-width:1050px) {
  body.compact-height .site-navigation { display: none; }
  body.compact-height .guide-header { padding-block: 8px; }
  body.compact-height .guide-next { padding-block: 2px; }
  body.compact-height .guide-input { margin-bottom: 8px; }
}

/* Report navigation and content share the same inset in every state. */
.report-panel-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; }
.report-panel-header .panel-label { margin: 0; }
.report-panel-header .nav-start { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; margin: 0; white-space: nowrap; font-family: Roboto, Arial, sans-serif; line-height: 1.2; }
@media (max-width:1050px) {
  .workspace .report-panel-header { padding: 16px var(--compact-inset) 0; }
  .report-panel-header .nav-start { min-height: 44px; padding: 10px 12px; font-size: 14px; }
}

/* Live-answer integration (StemDocumentBot): disclaimer under the composer. */
.guide-disclaimer { margin: -18px 30px 18px; font: 400 10px/1.45 Roboto, Arial, sans-serif; color: #6d7476; }
@media (max-width:1050px) {
  .workspace .guide-disclaimer { margin: -10px var(--compact-inset) 10px; font-size: 11px; }
}
body.compact-height .guide-disclaimer { display: none; }

/* Five starters: "What is GRC?" leads as a compact full-width card above the 2×2 grid. */
.workspace .start-routes:has(> :nth-child(5)) > .start-route:first-child { grid-column: 1 / -1; }
@media (min-width:1051px) {
  .workspace .experience[data-mode="welcome"] .start-routes:has(> :nth-child(5)) { grid-template-rows: auto 1fr 1fr; grid-auto-rows: auto; }
  .workspace .experience[data-mode="welcome"] .start-routes:has(> :nth-child(5)) > .start-route { min-height: 0; padding-block: 18px; }
  .workspace .experience[data-mode="welcome"] .start-routes:has(> :nth-child(5)) > .start-route:first-child { justify-content: center; }
}

/* Embedded on summaequity.com (?embed=1): the host page already shows Summa's navigation,
   so the bot drops its own top bar and fills the iframe's height. */
html.is-embed .site-navigation { display: none; }
@media (min-width:1051px) {
  html.is-embed .page-shell { min-height: 0; place-items: center; padding: 16px; }
  html.is-embed .workspace { --shared-panel-height: max(560px, calc(100svh - 32px)); }
}
@media (max-width:1050px) {
  html.is-embed .page-shell { padding-top: max(10px, env(safe-area-inset-top)); }
}

/* Embedded on summaequity.com: the report title moves from the hidden top bar into the chat header. */
.guide-heading { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.guide-report { display: none; }
/* The report title is the heading; "Ask the report" becomes the small label above it. */
html.is-embed .workspace .guide-header .guide-heading { flex-direction: column-reverse; }
html.is-embed .workspace .guide-header .guide-report {
  display: block; margin: 0; font: normal 24px/1.2 Georgia, 'Times New Roman', serif;
  letter-spacing: -.025em; color: inherit; text-wrap: balance;
}
html.is-embed .workspace .guide-header .guide-title {
  font: 700 12px/1.35 Roboto, Arial, sans-serif; letter-spacing: .1em;
  text-transform: uppercase; color: #397467;
}
@media (max-width: 1050px) {
  html.is-embed .workspace .guide-header { flex-wrap: nowrap; align-items: flex-start; }
  html.is-embed .workspace .guide-header .assistant-badge { flex-shrink: 0; }
}
@media (max-width: 600px) {
  html.is-embed .workspace .guide-header .guide-report { font-size: 21px; }
  html.is-embed .workspace .guide-header .guide-title { font-size: 10.5px; letter-spacing: .08em; }
}
@media (max-width: 360px) {
  html.is-embed .workspace .guide-header .guide-report { font-size: 19px; }
}

/* Answers longer than the panel scroll (the overflow: hidden above would otherwise win). */
@media (min-width: 1051px) {
  .workspace .answer-grid.scroll-overflow,
  .workspace .experience[data-mode="welcome"] .answer-grid.scroll-overflow { overflow-y: auto; }
}

/* Send button: centred in the composer, with the same gap above, below and to the right. */
.workspace .guide-input { padding-block: 0; padding-right: 5px; }
.workspace .guide-input button {
  justify-self: end; align-self: center;
  width: auto; height: calc(100% - 10px); max-height: 44px; aspect-ratio: 1;
}
