/* Shared browser chrome encloses the actual document and extension. */
.session-page {
  --ui: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --editorial: "STIX Two Text", Georgia, serif;
}
.session-page .stage {
  --toolbar: var(--brand-paper);
  --chrome-ink: var(--brand-ink);
  --blue: var(--brand-action);
  --hairline: var(--brand-rule);
  position: relative;
  height: calc(100vh - var(--header));
  height: calc(100svh - var(--header));
  min-height: 0;
  color: var(--chrome-ink);
  background: transparent;
}
.session-page .workbench {
  display: block;
  padding: clamp(12px, 2.15vh, 27px) clamp(12px, 2.15vw, 42px);
  margin: 0 auto;
  width: min(100%, 1850px);
  height: 100%;
  max-width: none;
}
.browser-window {
  --tab-rail: #dfe7f0;
  --linden-tab-paper: #e3eeea;
  --linden-tab-ink: #174e43;
  --maison-tab-paper: #efe2e5;
  --maison-tab-ink: #5d2533;
  --toolbar: #f4f7fa;
  --rail-edge: #bfcbd6;
  --chrome-glint: inset 0 1px rgba(255, 255, 255, .9);
  display: grid;
  grid-template-rows: 36px 40px minmax(0, 1fr);
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid #b0becd;
  border-radius: 13px;
  background: linear-gradient(110deg, #f2f3f8 0%, #e1edf4 54%, #dce4ed 100%);
  box-shadow:
    0 20px 46px -19px rgba(38, 58, 79, .32),
    0 3px 10px -4px rgba(38, 58, 79, .20);
  font-family: var(--ui);
}
.scout-tabs {
  display: flex;
  align-items: flex-end;
  min-width: 0;
  gap: 2px;
  padding: 0 8px;
  background: var(--tab-rail);
  box-shadow: var(--chrome-glint);
}
.scout-tabs button,
.new-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  height: calc(100% - 4px);
  min-width: 0;
  width: clamp(116px, 14vw, 184px);
  padding: 0 13px;
  border: 0;
  border-radius: 10px 10px 0 0;
  color: #354353;
  font: 500 0.77rem/1.1 var(--ui);
  text-align: left;
}
.scout-tabs button {
  background: transparent;
}
.tab-group {
  display: flex;
  align-items: end;
  height: 100%;
  min-width: 0;
  position: relative;
}
.tab-group::after {
  position: absolute;
  inset: auto 2px 0 0;
  height: 2px;
  background: #7799c1;
  content: "";
  pointer-events: none;
}
.scout-tabs button:hover {
  background: #ebeff6;
}
.scout-tabs :is([data-scout-tab], [data-demo-tab])[aria-pressed="true"],
.new-tab {
  position: relative;
  z-index: 1;
  background: var(--toolbar);
  color: #182736;
  box-shadow: var(--chrome-glint);
}
/* The selected page joins the toolbar. The group's rule stays under its other tabs. */
.scout-tabs :is(.new-tab, [data-scout-tab][aria-pressed="true"], [data-demo-tab][aria-pressed="true"])::before,
.scout-tabs :is(.new-tab, [data-scout-tab][aria-pressed="true"], [data-demo-tab][aria-pressed="true"])::after {
  position: absolute;
  inset-block-end: 0;
  width: 7px;
  height: 7px;
  pointer-events: none;
  content: "";
  background: radial-gradient(circle at var(--shoulder-origin) 0, transparent 6.5px, var(--toolbar) 7px);
}
.scout-tabs :is(.new-tab, [data-scout-tab][aria-pressed="true"], [data-demo-tab][aria-pressed="true"])::before {
  --shoulder-origin: 0;
  right: 100%;
}
.scout-tabs :is(.new-tab, [data-scout-tab][aria-pressed="true"], [data-demo-tab][aria-pressed="true"])::after {
  --shoulder-origin: 100%;
  left: 100%;
}
.guide-favicon {
  display: grid;
  flex: none;
  width: 17px;
  height: 17px;
  place-content: center;
  border-radius: 3px;
  color: #762c36;
  background: #fff9f5;
  font: bold 15px/1 Georgia, serif;
}
.scout-tabs button[data-scout-tab] > i {
  display: grid;
  place-items: center;
  width: 18px;
  height: 19px;
  flex: none;
  border-radius: 3px;
  position: relative;
  background: var(--linden-tab-paper);
  color: var(--linden-tab-ink);
  font: 15px/1 var(--editorial);
}
.scout-tabs button[data-scout-tab="maison"] > i {
  background: var(--maison-tab-paper);
  color: var(--maison-tab-ink);
}
.scout-tabs button[data-loading="true"] > i {
  background: transparent;
  color: transparent;
}
.scout-tabs button[data-loading="true"] > i::after {
  position: absolute;
  width: 12px;
  height: 12px;
  border: 2px solid #bbcbe5;
  border-right-color: var(--brand-action);
  border-top-color: var(--brand-action);
  border-radius: 50%;
  content: "";
  animation: tab-load 750ms linear 3;
}
@keyframes tab-load {
  to {
    transform: rotate(1turn);
  }
}
@media (prefers-reduced-motion: reduce) {
  .scout-tabs button[data-loading="true"] > i::after {
    animation: none;
  }
}
.scout-tabs button > span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.scout-tabs small {
  display: block;
  margin-top: 2px;
  color: #535f70;
  font: 400 0.69rem/1.05 var(--ui);
}
.scout-tabs .new-tab {
  display: none;
}
/* The Dinner group opens on the guides page; the restaurant tabs join it as the subagents start. */
#session:is([data-drafting="true"], [data-sheet="guides"]) .new-tab {
  display: flex;
}
#session:is([data-drafting="true"], [data-sheet="guides"]):not([data-launch-state]) .tab-group [data-scout-tab] {
  display: none;
}
#session[data-launch-state] [data-scout-tab]:not([data-launched="true"]) { visibility: hidden; }
#session[data-launch-state] [data-scout-tab]:disabled { cursor: default; opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  #session[data-launch-state] [data-scout-tab][data-launched="true"] {
    transform-origin: left bottom;
    animation: research-tab-open 320ms cubic-bezier(.23, .69, .28, 1) backwards;
  }
  #session[data-launch-state] [data-scout-tab][data-spawn-order="2"] { animation-delay: 90ms; }
  @keyframes research-tab-open {
    from { opacity: .35; transform: translateY(3px) scaleX(.94); }
  }
}

.session-page .document-bar {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 10px;
  min-width: 0;
  border: 0;
  border-bottom: 1px solid var(--rail-edge);
  background: var(--toolbar);
  color: #343f4e;
  font: 400 0.81rem/1.1 var(--ui);
}
.history {
  display: flex;
  align-items: center;
  gap: 1px;
  flex: none;
}
.session-page .history button,
.extension-toggle {
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 30px;
  padding: 0;
  color: #424e60;
  border-radius: 7px;
  background: transparent;
}
.session-page .history button:disabled {
  color: #a4afbb;
}
.session-page .history button:enabled:hover,
.extension-toggle:hover:enabled {
  background: #e0e6ee;
}
.history button > span {
  position: relative;
  width: 16px;
  height: 16px;
}
.tool-back::before,
.tool-forward::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 2px;
  width: 12px;
  border-top: 1.5px solid currentColor;
}
.tool-back::after,
.tool-forward::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 2px;
  width: 8px;
  height: 8px;
  border: solid currentColor;
  border-width: 1.5px 0 0 1.5px;
  transform: rotate(-45deg);
}
.tool-forward {
  transform: rotate(180deg);
}
.tool-reload::before {
  content: "";
  position: absolute;
  inset: 2px;
  border: 1.5px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  transform: rotate(-30deg);
}
.tool-reload::after {
  content: "";
  position: absolute;
  right: 1px;
  top: 2px;
  width: 5px;
  height: 5px;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
}
.omnibox {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1;
  min-width: 0;
  height: 29px;
  padding: 0 5px 0 12px;
  border: 1px solid #ced7e1;
  border-radius: 20px;
  background: #e8edf3;
}
.site-controls {
  flex: none;
  display: grid;
  align-content: center;
  gap: 4px;
  width: 13px;
  height: 15px;
}
.site-controls i {
  position: relative;
  height: 1px;
  background: #596679;
}
.site-controls i::after {
  content: "";
  position: absolute;
  left: 2px;
  top: -1.5px;
  width: 4px;
  height: 4px;
  border: 1px solid #596679;
  border-radius: 50%;
  background: #e9eef6;
}
.site-controls i:last-child::after {
  left: 8px;
}
#address,
#demo-address {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
  font: 400 0.79rem/1 var(--ui);
  letter-spacing: 0.006em;
}
#show-sources {
  flex: none;
  padding: 4px 9px;
  background: #f8fafdec;
  color: #3b4b60;
  border: 1px solid #d1dbe8;
  border-radius: 12px;
  font: 500 0.74rem/1 var(--ui);
}
#show-sources:enabled:hover {
  background: white;
  color: #144a8b;
}
#show-sources:disabled {
  background: transparent;
  border-color: #c6d0db;
  color: #627080;
  cursor: default;
}
#session[data-view="chat"] #show-sources { display: none; }
@media (pointer: coarse) {
  #show-sources { min-height: 24px; }
}
.extension-toggle {
  position: relative;
  width: 34px;
  color: var(--blue);
}
.extension-toggle[aria-expanded="true"] {
  background: #dae5f1;
}
.extension-toggle img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}
.handset-tools {
  display: none;
  gap: 3px;
}

/* Only the two chrome rails sample the shell's blue-gray surface. */
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .scout-tabs {
    background: linear-gradient(105deg, rgba(224, 227, 237, .80), rgba(220, 234, 241, .76) 58%, rgba(216, 226, 238, .86));
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }
  .session-page .document-bar {
    background: rgba(246, 249, 252, .88);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }
}
@media (prefers-reduced-transparency: reduce), (forced-colors: active) {
  .scout-tabs,
  .session-page .document-bar {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .scout-tabs { background: var(--tab-rail); }
  .session-page .document-bar { background: var(--toolbar); }
}
@media (forced-colors: active) {
  .browser-window,
  .session-page .document-bar,
  .omnibox {
    background: Canvas;
    border-color: CanvasText;
    box-shadow: none;
  }
  .scout-tabs button[aria-pressed="true"],
  .scout-tabs .new-tab {
    outline: 1px solid Highlight;
    outline-offset: -2px;
  }
  .tab-group::after { background: Highlight; }
  .scout-tabs :is(.new-tab, [data-scout-tab])::before,
  .scout-tabs :is(.new-tab, [data-scout-tab])::after { content: none; }
}
.browser-body {
  min-height: 0;
  min-width: 0;
  position: relative;
}
.session-page .working-area {
  --panel-track: clamp(210px, 28%, 290px);
  display: grid;
  height: 100%;
  min-height: 0;
  min-width: 0;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr) var(--panel-track);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: #fff;
}
#session[data-window="fullscreen"] .working-area {
  --panel-track: clamp(295px, 26%, 380px);
}
.session-page .workspace,
.session-page .browser-frame {
  min-height: 0;
  min-width: 0;
}
.session-page .browser-frame {
  display: grid;
  grid-template: minmax(0, 1fr) 70px / minmax(0, 1fr);
  height: 100%;
  overflow: hidden;
  background: var(--brand-paper);
}
#session:is([data-drafting="true"], [data-sheet="guides"]) .browser-frame {
  grid-template-rows: minmax(0, 1fr);
}
#session:is([data-drafting="true"], [data-sheet="guides"]) #other-tab {
  display: none;
}
.session-page .browser-canvas {
  grid-area: 1/1;
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  place-items: stretch;
  min-width: 0;
  min-height: 0;
  padding: 0;
  background: #f3f5f7;
  overflow: hidden;
}
.session-page .document-stage,
.session-page .document-stage .source-page {
  min-width: 0;
  min-height: 0;
  max-width: none;
  max-height: none;
  width: 100%;
  height: 100%;
  box-shadow: none;
  border-radius: 0;
}
.session-page .document-stage {
  grid-area: 1/1;
}
#other-tab {
  display: grid;
  grid-template-columns: 98px minmax(0, 1fr) 14px;
  align-items: center;
  gap: 13px;
  min-width: 0;
  width: 100%;
  overflow: hidden;
  padding: 6px 16px 6px 9px;
  color: #242d3a;
  background: var(--brand-paper);
  border-top: 1px solid var(--hairline);
  text-align: left;
}
#other-tab:hover {
  background: #eaf0f8;
}
#other-image {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 100%;
  border: 1px solid #cdd5df;
  background: #e6ecf1;
}
.other-summary {
  min-width: 0;
}
.other-summary :is(strong, small) {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.other-summary small {
  color: #596579;
  font: 500 0.74rem/1.2 var(--ui);
}
.other-summary strong {
  margin-top: 4px;
  font: 500 clamp(0.92rem, 1.25vw, 1.18rem) / 1.12 var(--ui);
}
.switch-icon {
  position: relative;
  width: 12px;
  height: 10px;
  border: 1px solid #607288;
}
.switch-icon::before {
  content: "";
  position: absolute;
  inset: -4px 2px 2px -4px;
  border-left: 1px solid #607288;
  border-top: 1px solid #607288;
}

.side-panel {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-left: 1px solid var(--rail-edge);
}
.session-page #session :is(button, a, textarea):focus-visible {
  outline: 2px solid var(--brand-action);
  outline-offset: -2px;
}

@media (min-width: 761px) and (orientation: landscape), (min-width: 851px) {
  #session[data-panel-hidden="true"] .working-area {
    grid-template-columns: minmax(0, 1fr);
  }
  .session-page #session[data-panel-hidden="true"] #extension-panel {
    display: none;
  }
}

/* A desktop side panel is a separate browser-owned surface next to the tab. */
@media (min-width: 851px) and (min-height: 501px), (min-width: 951px),
       (min-width: 761px) and (min-height: 501px) and (orientation: landscape) {
  .browser-window {
    --tab-rail: #dbe5f2;
    --toolbar: #fff;
    --rail-edge: #cad3df;
    --chrome-font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  }
  .scout-tabs,
  .session-page .document-bar {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .scout-tabs { background: var(--tab-rail); }
  .session-page .document-bar { background: var(--toolbar); }
  .scout-tabs button, .new-tab, #address, #demo-address { font-family: var(--chrome-font); }
  .scout-tabs [data-scout-tab] small { display: none; }
  .omnibox { height: 30px; border-color: transparent; background: #edf1f7; }
  .extension-toggle { border-radius: 50%; }
  .extension-toggle img { width: 19px; height: 19px; }
  .extension-toggle[aria-expanded="true"] { background: #e5edf7; }
  #session:not([data-panel-hidden="true"]) .working-area {
    column-gap: 6px;
    padding: 3px 6px 6px;
    background: #e6ecf3;
  }
  #session:not([data-panel-hidden="true"]) .workspace {
    border: 1px solid var(--rail-edge);
    border-radius: 9px;
    overflow: hidden;
  }
  #session #extension-panel {
    border: 1px solid var(--rail-edge);
    border-radius: 11px;
  }
  #session[data-window="fullscreen"] .working-area { --panel-track: clamp(295px, 28%, 360px); }
}

@media (min-width: 761px) and (max-height: 610px) {
  .session-page .workbench {
    padding: 3px 6px 5px;
  }
  .browser-window {
    grid-template-rows: 29px 32px minmax(0, 1fr);
    border-radius: 7px;
  }
  .scout-tabs button,
  .new-tab {
    height: calc(100% - 2px);
    padding-inline: 9px;
    font-size: 0.76rem;
  }
  .scout-tabs small {
    display: none;
  }
  .session-page .document-bar {
    padding-block: 2px;
    gap: 5px;
  }
  .omnibox {
    height: 24px;
  }
  .session-page .history button,
  .extension-toggle {
    width: 27px;
    height: 26px;
  }
  .session-page .browser-frame {
    grid-template-rows: minmax(0, 1fr) 37px;
  }
  #other-tab {
    grid-template-columns: 55px 1fr 12px;
    padding: 3px 7px;
    gap: 7px;
  }
  .other-summary small {
    font-size: 0.65rem;
  }
  .other-summary strong {
    font-size: 0.81rem;
    margin-top: 1px;
  }

}
@media (max-width: 760px), (max-width: 850px) and (orientation: portrait) {
  .session-page .workbench {
    padding: 5px;
  }
  .browser-window {
    grid-template-rows: 34px 36px minmax(0, 1fr);
    border-radius: 8px;
  }
  .scout-tabs {
    gap: 2px;
    padding: 0 4px;
  }
  .tab-group {
    flex: 1;
    max-width: 390px;
  }
  .tab-group [data-scout-tab] {
    flex: 1;
    min-width: 0;
    width: auto;
  }
  .scout-tabs button,
  .new-tab {
    width: min(44%, 170px);
    height: calc(100% - 4px);
    padding: 2px 7px;
    gap: 5px;
    border-radius: 7px 7px 0 0;
    font-size: 0.76rem;
  }
  .scout-tabs button[data-scout-tab] > i {
    width: 15px;
    height: 17px;
    font-size: 0.81rem;
  }
  .scout-tabs small {
    font-size: 0.63rem;
    margin-top: 1px;
  }
  .session-page .document-bar {
    padding: 3px;
    gap: 3px;
  }
  .session-page .history button {
    width: 24px;
    height: 26px;
  }
  .omnibox {
    gap: 5px;
    padding-left: 7px;
    height: 27px;
  }
  .site-controls {
    width: 10px;
  }
  .site-controls i:last-child::after {
    left: 5px;
  }
  #address,
  #demo-address {
    font-size: 0.68rem;
  }
  #show-sources {
    padding: 4px 5px;
    font-size: 0.67rem;
  }
  .extension-toggle {
    display: none;
  }
  .handset-tools {
    display: flex;
    min-width: 0;
  }
  #swap-view {
    min-height: 27px;
    padding: 4px 7px;
    border: 1px solid #bed1ea;
    border-radius: 6px;
    background: #e8edf4;
    color: var(--brand-action);
    font: 550 0.7rem/1 var(--ui);
  }
  .session-page .working-area {
    grid-template: minmax(0, 1fr) auto / minmax(0, 1fr);
  }
  #session[data-drafting="false"][data-view="browser"] .workspace {
    display: grid;
    grid-row: 1;
  }
  .session-page .browser-frame {
    grid-template-rows: minmax(0, 1fr) 46px;
  }
  #other-tab {
    grid-template-columns: 69px 1fr 12px;
    gap: 7px;
    padding: 4px 8px 4px 5px;
  }
  .other-summary small {
    font-size: 0.69rem;
  }
  .other-summary strong {
    margin-top: 2px;
    font-size: 0.84rem;
  }

}
@media (max-width: 760px) and (max-height: 680px) {
  .scout-tabs small {
    display: none;
  }
  .session-page .workbench {
    padding: 3px;
  }
  .browser-window {
    grid-template-rows: 29px 33px minmax(0, 1fr);
  }

}
