.office-page { max-width: 880px; margin: 0 auto; padding: 16px 0 48px; }
.page.office-desk-page {
  flex: 1 1 auto !important;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding-bottom: 16px;
  background: transparent;
}
.office-lede,
.office-baseline,
.office-disclosure,
.office-blocked p { color: var(--muted); }
.office-baseline {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--line, var(--border, #d8d4cf));
  border-radius: 8px;
  background: var(--surface, var(--bg));
}
.office-blocked {
  padding: 24px 16px;
  border: 1px dashed var(--line, var(--border, #d8d4cf));
  border-radius: 10px;
}
.office-chat-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 8px;
}
.office-chat-tools-gap { flex: 1 1 auto; }
.office-more { position: relative; }
.office-chat-tools .office-icon-btn {
  width: 36px;
  height: 36px;
  min-width: 36px;
}
.office-more-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 6;
  min-width: 180px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
.office-more-menu button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
}
.office-more-menu button:hover,
.office-more-menu button:focus-visible { background: var(--surface-2, rgba(0,0,0,.04)); }
.office-more-menu button[hidden] { display: none !important; }
.office-more-menu button:disabled { opacity: 0.45; cursor: default; }
html.dark .office-more-menu { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4); }
.office-talk-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 8px 16px;
}
.office-talk-btn-mic { display: block; flex: 0 0 auto; }
.office-badge {
  display: inline-block;
  margin: 0 0 8px;
  padding: 2px 8px;
  border: 1px solid var(--line, var(--border, #d8d4cf));
  border-radius: 999px;
  color: var(--text, inherit);
  font-size: 12px;
}
.office-meeting-form {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  gap: 8px;
  color: var(--text, inherit);
}
.office-meeting-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  flex: 0 0 auto;
}
.office-meeting-form .office-stack {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}
.office-meeting-form input,
.office-meeting-form select {
  color: inherit;
  background: var(--surface, var(--bg));
  border: 1px solid var(--line, var(--border, #d8d4cf));
  border-radius: 6px;
}
.office-meeting-form .office-title,
.office-meeting-form input[type="text"],
.office-meeting-form select {
  width: 100%;
  box-sizing: border-box;
  min-height: 44px;
  padding: 10px 12px;
  font-size: 16px;
  line-height: 1.3;
}
.office-headphones,
.office-recording p { margin: 0; color: var(--text, inherit); }
.office-transcript {
  white-space: pre-wrap;
  max-height: 240px;
  overflow: auto;
  margin: 0;
  color: var(--text, inherit);
}
.office-notes {
  color: var(--text, inherit);
  font-size: 15px;
  line-height: 1.45;
  max-height: 360px;
  overflow: auto;
}
.office-notes h1,
.office-notes h2,
.office-notes h3,
.office-notes h4 {
  margin: 14px 0 6px;
  font-size: 15px;
  font-weight: 700;
}
.office-notes p { margin: 0 0 8px; }
.office-notes ul,
.office-notes ol { margin: 0 0 8px; padding-left: 1.2em; }
.office-notes li { margin: 0 0 4px; }
.office-verbatim { margin: 8px 0 0; }
.office-verbatim summary { cursor: pointer; font-size: 13px; }
.office-recording {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 8px;
  padding: 10px 12px;
  border: 1px solid var(--line, var(--border, #d8d4cf));
  border-radius: 8px;
  background: var(--surface, var(--bg));
  color: var(--text, inherit);
}
.office-recording[hidden] { display: none; }
.office-recording.is-live {
  border-color: #b42318;
  background: color-mix(in srgb, #b42318 10%, var(--surface, var(--bg)));
}
.office-recording.is-paused {
  border-color: var(--line, var(--border, #d8d4cf));
}
.office-recording #officeRecordingWarn { flex: 1 1 220px; }
.office-onair {
  display: inline-flex;
  padding: 3px;
  border-radius: 12px;
  background: #6e100e;
  box-shadow: 0 0 0 1px #3d0706;
}
.office-onair-frame {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 132px;
  min-height: 40px;
  padding: 4px 14px;
  border: 2px solid #ffe8e4;
  border-radius: 8px;
  background: #a31c16;
  box-shadow: inset 0 0 10px rgba(255, 120, 90, 0.55);
}
.office-onair-word {
  color: #fff8f6;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.16em;
  line-height: 1;
  text-shadow: 0 0 6px #fff, 0 0 14px #ffc2b8;
}
.office-recording.is-live .office-onair {
  animation: office-onair-glow 1.6s ease-in-out infinite;
}
.office-recording.is-live .office-onair-word {
  animation: office-onair-breathe 1.6s ease-in-out infinite;
}
.office-recording.is-paused .office-onair {
  background: #3a3a3a;
  box-shadow: none;
}
.office-recording.is-paused .office-onair-frame {
  border-color: #e4e4e4;
  background: #5a5a5a;
  box-shadow: none;
}
.office-recording.is-paused .office-onair-word {
  color: #f4f4f4;
  letter-spacing: 0.08em;
  text-shadow: none;
}
@keyframes office-onair-glow {
  0%, 100% { box-shadow: 0 0 8px 1px rgba(255, 60, 40, 0.45); }
  50% { box-shadow: 0 0 22px 6px rgba(255, 70, 48, 0.95); }
}
@keyframes office-onair-breathe {
  0%, 100% { opacity: 1; text-shadow: 0 0 6px #fff, 0 0 14px #ffc2b8; }
  50% { opacity: 0.72; text-shadow: 0 0 2px #fff, 0 0 8px #ffc2b8; }
}
.office-rec {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 8px 16px;
  border: 1px solid var(--danger, #b42318);
  border-radius: 999px;
  background: var(--surface, var(--bg));
  color: var(--text, inherit);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.06em;
  line-height: 1;
  cursor: pointer;
}
.office-rec-spark { font-size: 14px; letter-spacing: 0; }
.office-rec-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--danger, #b42318);
}
.office-rec.is-live {
  animation: office-rec-pulse 1.6s ease-in-out infinite;
}
.office-rec.is-live .office-rec-dot { animation: office-rec-blink 1.2s steps(1) infinite; }
.office-rec.is-paused {
  animation: none;
  box-shadow: none;
}
.office-rec.is-paused .office-rec-dot { opacity: 0.35; animation: none; }
@keyframes office-rec-blink { 50% { opacity: 0.2; } }
@keyframes office-rec-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(180, 35, 24, 0.2); }
  50% { box-shadow: 0 0 0 7px rgba(180, 35, 24, 0.28); }
}
@media (prefers-reduced-motion: reduce) {
  .office-rec.is-live,
  .office-rec.is-live .office-rec-dot,
  .office-recording.is-live .office-onair,
  .office-recording.is-live .office-onair-word { animation: none; }
  .office-recording.is-live .office-onair {
    box-shadow: 0 0 14px 3px rgba(255, 70, 48, 0.85);
  }
}
.office-rec-transport { display: inline-flex; gap: 8px; }
.office-rec-key {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--line, var(--border, #d8d4cf));
  border-radius: 10px;
  background: var(--surface, var(--bg));
  color: var(--text, inherit);
  font-size: 18px;
  cursor: pointer;
}
#officeRecordShareNote { flex: 1 1 100%; color: var(--text, inherit); }
#officeRecordShareNote strong { font-weight: 800; }
.office-past:not([hidden]) {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 180px;
  overflow: auto;
  margin: 0 0 8px;
  padding: 8px;
  border: 1px solid var(--line, var(--border, #d8d4cf));
  border-radius: 8px;
  background: var(--surface, var(--bg));
}
.office-past button {
  text-align: left;
  border: 0;
  border-radius: 6px;
  padding: 6px 8px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.office-past button:hover,
.office-past button:focus-visible {
  background: color-mix(in srgb, var(--ink) 6%, var(--bg));
}
.office-past-banner:not([hidden]) {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--ink) 6%, var(--bg));
  color: var(--ink);
}
.office-past-banner p { margin: 0; }
.office-msg-note {
  align-self: center;
  margin: 4px 0;
  border: 0;
  background: transparent;
  color: var(--muted, var(--ink));
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
}
.office-log {
  flex: 1 1 auto;
  min-height: 280px;
  max-height: none;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  margin: 0 0 14px;
  border: 1px solid var(--line, var(--border, #d8d4cf));
  border-radius: 10px;
  background: var(--surface, var(--bg));
}
.office-msg {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  align-self: stretch;
  max-width: 100%;
  padding: 0;
  color: var(--ink);
}
.office-face {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  margin-top: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1;
  color: rgba(248, 250, 252, 0.94);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.05) 36%, rgba(8, 10, 14, 0.38) 100%),
    linear-gradient(145deg, #414856 0%, #171b22 100%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.28) inset,
    0 -1px 0 rgba(0, 0, 0, 0.45) inset,
    0 6px 14px rgba(0, 0, 0, 0.22),
    0 1px 2px rgba(0, 0, 0, 0.16);
  user-select: none;
}
.office-face img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.office-msg:not(.office-msg--tail) .office-face {
  visibility: hidden;
}
.office-msg-card {
  width: fit-content;
  max-width: min(100%, 42rem);
  padding: 8px 10px;
  border-radius: 8px;
}
.office-msg-body {
  display: block;
  text-align: left;
  word-spacing: normal;
  letter-spacing: normal;
  font: inherit;
  line-height: 1.5;
  color: var(--ink);
}
.office-msg-body p,
.office-msg-body li {
  text-align: left;
  margin: 0 0 0.55em;
  max-width: none;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
}
.office-msg-body p:last-child,
.office-msg-body li:last-child { margin-bottom: 0; }
.office-msg-body ul,
.office-msg-body ol {
  margin: 0.35em 0 0.55em;
  padding-left: 1.3em;
  list-style-position: outside;
  counter-reset: none;
}
.office-msg-body ul { list-style-type: disc; }
.office-msg-body ol { list-style-type: decimal; }
.office-msg-body ul li,
.office-msg-body ol li {
  display: list-item;
  align-items: unset;
  gap: unset;
}
.office-msg-body ol li::before { content: none; margin: 0; }
.office-msg a {
  color: var(--accent, #ff6a3d);
  text-decoration: underline;
}
.office-msg--user {
  flex-direction: row-reverse;
  align-self: flex-end;
  width: fit-content;
  max-width: 100%;
}
.office-msg--user .office-msg-card {
  background: color-mix(in srgb, var(--accent, #ff6a3d) 14%, var(--bg));
}
.office-msg--assistant .office-msg-card {
  background: color-mix(in srgb, var(--ink) 6%, var(--bg));
}
.office-msg-body p.office-thinking {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted, color-mix(in srgb, var(--ink, #2a2622) 58%, var(--bg, #f4f1ec)));
}
.office-thinking-shimmer {
  display: inline-block;
  color: inherit;
  background-image: linear-gradient(
    100deg,
    color-mix(in srgb, var(--ink, #2a2622) 42%, var(--bg, #f4f1ec)) 0%,
    color-mix(in srgb, var(--ink, #2a2622) 86%, var(--bg, #f4f1ec)) 50%,
    color-mix(in srgb, var(--ink, #2a2622) 42%, var(--bg, #f4f1ec)) 100%
  );
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: office-thinking-shimmer 1.7s ease-in-out infinite;
}
@keyframes office-thinking-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .office-thinking-shimmer {
    animation: none;
    background: none;
    -webkit-text-fill-color: currentColor;
    color: var(--muted, color-mix(in srgb, var(--ink, #2a2622) 58%, var(--bg, #f4f1ec)));
  }
}
.office-composer { display: block; }
.office-composer-box {
  border: 1px solid var(--line, var(--border, #d8d4cf));
  border-radius: 10px;
  background: var(--surface, #fff);
  overflow: visible;
}
.office-composer textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-height: 44px;
  resize: vertical;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 10px 10px 0 0;
  padding: 8px 12px 4px;
  font: inherit;
}
.office-composer-actions {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
  padding: 0 6px 6px;
}
.office-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
}
.office-icon-btn:hover,
.office-icon-btn:focus-visible {
  color: var(--ink);
  background: transparent;
  box-shadow: none;
}
.office-icon-btn svg { display: block; }
.office-disclosure { margin: 10px 0 0; font-size: 13px; }
.office-error { color: var(--danger, #b42318); }
.office-pack-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 16px 0 0;
}
.office-pack-domain h3 {
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.office-pack-empty {
  margin: 0;
  padding: 8px 0 2px;
  color: var(--muted);
  font-size: 13px;
}
.office-pack {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0 0 8px;
  padding: 10px 12px;
  border: 1px solid var(--line, var(--border, #d8d4cf));
  border-radius: 8px;
  background: var(--surface, var(--bg));
}
.office-pack:last-child { margin-bottom: 0; }
.office-pack input { margin-top: 3px; }
.office-pack-label { font-weight: 600; color: var(--ink); }
.office-pack-copy { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.office-mandate-actions { display: flex; gap: 8px; align-items: center; }
.office-card {
  margin: 0 0 16px;
  padding: 16px;
  border: 1px solid var(--line, var(--border, #d8d4cf));
  border-radius: 10px;
  background: var(--surface, var(--bg));
}
.office-card h2 {
  margin: 0 0 6px;
  font-size: 1.1rem;
}
.office-card-copy,
.office-field span { color: var(--muted); }
.office-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 12px 0;
}
.office-field input {
  max-width: 280px;
  padding: 8px 10px;
  border: 1px solid var(--line, var(--border, #d8d4cf));
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
}
.office-nru-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 12px 0 0;
}
.office-nru-stats div {
  padding: 10px 12px;
  border: 1px solid var(--line, var(--border, #d8d4cf));
  border-radius: 8px;
  background: var(--bg);
  text-align: left;
}
.office-nru-stats dt {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.office-nru-stats dd {
  margin: 4px 0 0;
  font-size: 1.25rem;
  font-weight: 650;
}
.office-mailbox-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.office-mailbox {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line, var(--border, #d8d4cf));
  border-radius: 8px;
  background: var(--bg);
}
.office-mailbox-meta {
  min-width: 0;
  text-align: left;
}
.office-mailbox-email {
  display: block;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.office-mailbox-note {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}
.office-mailbox-cap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 13px;
}
.office-mailbox-cap input {
  width: 4.5rem;
  padding: 6px 8px;
  border: 1px solid var(--line, var(--border, #d8d4cf));
  border-radius: 8px;
  background: var(--surface, var(--bg));
  color: var(--ink);
}
.office-avatar-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.office-avatar-pick { min-width: 0; flex: 1; }
.office-avatar-kicker {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--muted);
}
.office-avatar {
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.04) 40%, rgba(8, 10, 14, 0.28) 100%),
    #171b22;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.26) inset,
    0 -1px 0 rgba(0, 0, 0, 0.42) inset,
    0 8px 18px rgba(0, 0, 0, 0.24),
    0 1px 2px rgba(0, 0, 0, 0.16);
  width: 88px;
  height: 88px;
}
.office-desk-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.office-desk-lead {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.office-desk-lead h1 { margin: 0; }
.office-desk-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.office-desk-actions .btn[hidden] {
  display: none !important;
}
.office-fs-logo {
  display: none;
  flex: 0 0 auto;
}
.office-fs-logo img {
  display: block;
  width: 36px;
  height: 36px;
  object-fit: contain;
}
.office-expand-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 38px;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid var(--line, var(--border, #d8d4cf));
  background: var(--bg);
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.office-expand-btn:hover,
.office-expand-btn:focus-visible {
  background: var(--surface, var(--bg));
  color: var(--ink);
  border-color: var(--brand-on-surface, var(--brand1, #ff6a3d));
}
.office-expand-btn svg { flex: 0 0 auto; }
.office-desk-layout {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
}
.office-desk-thread {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
}
.office-preview {
  display: none;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: 10px;
  border: 1px solid var(--line, var(--border, #d8d4cf));
  border-radius: 10px;
  background: var(--surface, var(--bg));
}
.office-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.office-preview-head h2 {
  margin: 0;
  font-size: 0.95rem;
}
.office-preview-title {
  margin: 0 0 8px;
  font-size: 1.05rem;
  text-align: left;
}
.office-preview-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  text-align: left;
}
.office-preview-body img,
.office-preview-body video,
.office-preview-body iframe {
  display: block;
  width: 100%;
  flex: 1 1 auto;
  min-height: 240px;
  height: 100%;
  border: 0;
  border-radius: 8px;
  background: color-mix(in srgb, var(--ink) 4%, var(--bg));
}
.office-preview-body a { color: var(--accent, #ff6a3d); word-break: break-all; }
.office-preview-open { margin: 0 0 8px; }
.office-preview-dl {
  margin: 0 0 12px;
  display: grid;
  gap: 8px;
}
.office-preview-dl div {
  display: grid;
  gap: 2px;
  text-align: left;
}
.office-preview-dl dt {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.office-preview-dl dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.office-preview-thread {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: auto;
  min-height: 0;
}
.office-preview-post {
  padding: 8px 10px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--ink) 5%, var(--bg));
  text-align: left;
}
.office-preview-post strong { display: block; margin-bottom: 4px; }
.office-draft-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}
.office-draft-form .office-field { margin: 0; }
.office-draft-form input,
.office-draft-form textarea {
  width: 100%;
  max-width: none;
  padding: 8px 10px;
  border: 1px solid var(--line, var(--border, #d8d4cf));
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
}
.office-draft-form textarea {
  flex: 1 1 auto;
  min-height: 180px;
  resize: vertical;
}
.office-draft-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  flex: 0 0 auto;
}
.office-draft-form input[readonly] {
  color: var(--muted);
}
.office-draft-link {
  margin: 8px 0 0;
}
.office-draft-link a { color: var(--accent, #ff6a3d); }

body.office-expand {
  box-sizing: border-box;
  height: 100dvh;
  overflow: hidden;
  border-top: 4px solid var(--brand-color-primary, #ff4d6d);
}
body.office-expand .office-fs-logo { display: block; }
body.office-expand #main-menu-placeholder,
body.office-expand #sub-menu-placeholder,
body.office-expand .editor-context-shell,
body.office-expand .hea-footer,
body.office-expand #hea-footer-placeholder,
body.office-expand .office-desk-page > .office-lede {
  display: none !important;
}
body.office-expand .page.office-desk-page {
  max-width: none !important;
  width: 100% !important;
  margin-inline: 0 !important;
  height: 100dvh;
  padding: 8px 12px !important;
  display: flex;
  flex-direction: column;
}
body.office-expand .office-desk-layout {
  flex: 1 1 auto;
  min-height: 0;
}
body.office-expand .office-log {
  flex: 1 1 auto;
  max-height: none;
  min-height: 0;
}
body.office-expand:not(.office-preview-off) .office-desk-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 38vw);
  gap: 12px;
}
body.office-expand:not(.office-preview-off) .office-preview {
  display: flex;
}

@media (max-width: 900px) {
  /* Phone browsers lay a bottom bar over a tall page. Keep Desk inside the small
     viewport, and keep the consent tick and REC at the top of Preview. */
  body.office-expand {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100svh;
    height: min(var(--office-vvh, 100svh), 100svh);
    max-height: 100svh;
  }
  body.office-expand .page.office-desk-page {
    height: 100%;
    max-height: 100%;
  }
  html:not(.cos-rail) body.office-expand:not(.office-preview-off) .office-desk-layout {
    display: flex;
    flex-direction: column;
    grid-template-columns: none;
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }
  html:not(.cos-rail) body.office-expand:not(.office-preview-off) .office-desk-thread {
    flex: 0 0 auto;
    min-height: 0;
  }
  html:not(.cos-rail) body.office-expand:not(.office-preview-off) .office-log {
    flex: 0 1 auto;
    min-height: 0;
    max-height: 88px;
    margin-bottom: 8px;
  }
  html:not(.cos-rail) body.office-expand:not(.office-preview-off) .office-composer textarea {
    min-height: 44px;
  }
  html:not(.cos-rail) body.office-expand:not(.office-preview-off) .office-preview {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    position: relative;
    z-index: 2;
    overflow: hidden;
  }
  body.office-expand:not(.office-preview-off) .office-preview-body {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding-bottom: max(96px, env(safe-area-inset-bottom));
  }
  .office-meeting-actions {
    position: sticky;
    top: 0;
    z-index: 3;
    margin: 0 -2px 8px;
    padding: 4px 2px 10px;
    background: var(--surface, var(--bg));
  }
  .office-draft-form textarea {
    min-height: 120px;
    max-height: none;
  }
  .office-draft-actions {
    position: sticky;
    bottom: 0;
    z-index: 3;
    margin: 0 -2px;
    padding: 8px 2px max(8px, env(safe-area-inset-bottom));
    background: var(--surface, var(--bg));
  }
}
.office-stock-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.office-stock {
  padding: 2px;
  border: 2px solid transparent;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
}
.office-stock.is-on {
  border-color: var(--accent, #ff6a3d);
}
.office-stock img {
  display: block;
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.22) inset,
    0 4px 10px rgba(0, 0, 0, 0.2);
}
.office-stock--upload {
  width: 60px;
  height: 60px;
  border-radius: 10px;
  border: 1px dashed rgba(255, 255, 255, 0.28);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(248, 250, 252, 0.78);
  font-size: 11px;
  font-weight: 650;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(8, 10, 14, 0.28)),
    #171b22;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.18) inset,
    0 4px 10px rgba(0, 0, 0, 0.2);
}
.office-stock--upload.is-on {
  border-style: solid;
  color: var(--ink);
}
.office-upload-btn { margin-top: 0; }
body:not(.office-expand) {
  height: auto;
  min-height: 100dvh;
}
body:not(.office-expand) .page.office-desk-page {
  min-height: auto;
  flex: 1 0 auto !important;
}
body.office-talk-on .hea-footer,
body.office-talk-on #hea-footer-placeholder {
  display: none !important;
}
body.office-talk-on .office-preview { display: none; }
.office-talk { margin: 0 0 12px; }
.office-talk[hidden] { display: none; }
.office-talk-frame {
  max-width: 340px;
  padding: 2px;
  border-radius: 22px;
  background: linear-gradient(145deg, #ffd0a8, #ff7a59 42%, var(--brand1, #ff5f6d));
}
.office-talk.is-listening .office-talk-frame,
.office-talk.is-speaking .office-talk-frame {
  background: linear-gradient(120deg, var(--brand1, #ff5f6d), var(--brand2, #ffc371), var(--brand1, #ff5f6d));
  background-size: 220% 220%;
  animation: office-talk-rim 3.4s ease-in-out infinite;
  box-shadow: 0 10px 28px rgba(255, 95, 109, 0.18);
}
.office-talk.is-speaking .office-talk-frame {
  box-shadow: 0 10px 28px rgba(255, 170, 80, 0.22);
}
.office-talk-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 14px 12px;
  border-radius: 20px;
  background: var(--surface, #fff);
  color: var(--ink, #0b1022);
}
.office-talk-spark {
  position: absolute;
  top: 12px;
  left: 14px;
  animation: office-talk-twinkle 2.6s ease-in-out infinite;
}
.office-talk-air {
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 32px;
  padding: 0 28px 0 36px;
}
.office-talk-onair {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1;
}
.office-talk.is-speaking .office-talk-onair { color: #9a5b12; }
#officeTalkState { font-size: 15px; font-weight: 650; }
.office-talk-mic { width: 132px; height: 210px; }
.office-talk-mic svg { width: 100%; height: 100%; display: block; }
.office-talk.is-listening .office-talk-sheen,
.office-talk.is-speaking .office-talk-sheen { animation: office-talk-sheen 1.2s ease-in-out infinite; }
.office-talk.is-listening .office-talk-ring { animation: office-talk-ring 1.6s ease-in-out infinite; }
.office-talk.is-speaking .office-talk-band { fill: #ffc371; }
.office-talk.is-speaking .office-talk-ring { stroke: #ffc371; }
.office-talk.is-speaking .office-talk-lamp { fill: #ffc371; }
.office-talk-line {
  margin: 4px 8px 2px;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.35;
  text-align: center;
}
.office-talk-keys {
  align-self: stretch;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 8px;
}
.office-talk-key {
  height: 48px;
  border: 0;
  border-radius: 12px;
  background: var(--bg, #fafafa);
  box-shadow: inset 0 0 0 1px var(--line, #e2e8f0);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.office-talk-pause {
  width: 12px;
  height: 16px;
  border-left: 3px solid var(--ink, #0b1022);
  border-right: 3px solid var(--ink, #0b1022);
}
.office-talk.is-paused .office-talk-pause {
  width: 0;
  height: 0;
  border: 0;
  border-left: 12px solid var(--ink, #0b1022);
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
}
.office-talk-stop {
  width: 12px;
  height: 12px;
  background: var(--ink, #0b1022);
}
@keyframes office-talk-rim {
  0%, 100% { background-position: 0% 40%; }
  50% { background-position: 100% 60%; }
}
@keyframes office-talk-twinkle {
  0%, 100% { opacity: 0.4; }
  45% { opacity: 1; }
}
@keyframes office-talk-sheen {
  0%, 100% { transform: translateY(8px); opacity: 0.35; }
  50% { transform: translateY(-6px); opacity: 0.95; }
}
@keyframes office-talk-ring {
  0%, 100% { stroke: #ff5f6d; }
  50% { stroke: #ffc371; }
}
@media (max-width: 900px) {
  .office-desk-lead h1 {
    font-size: 1.15rem;
    line-height: 1.1;
    white-space: nowrap;
  }
  .office-fs-logo img { width: 28px; height: 28px; }
}
@media (max-width: 720px) {
  .office-talk-frame { max-width: none; }
  .office-talk-mic { width: 96px; height: 152px; }
  .office-talk-onair { font-size: 18px; letter-spacing: 0.1em; }
  .office-talk-inner { padding: 10px 12px; }
  .office-log { min-height: 160px; }
}
@media (prefers-reduced-motion: reduce) {
  .office-talk-spark,
  .office-talk.is-listening .office-talk-frame,
  .office-talk.is-speaking .office-talk-frame,
  .office-talk.is-listening .office-talk-sheen,
  .office-talk.is-speaking .office-talk-sheen,
  .office-talk.is-listening .office-talk-ring { animation: none; }
  .office-talk-spark { opacity: 1; }
}

/* In-app rail (?rail=1). Full Desk page is unchanged without html.cos-rail. */
html.cos-rail,
html.cos-rail body {
  height: 100%;
  min-height: 100%;
  background: var(--bg);
}
html.cos-rail body {
  overflow: hidden;
}
html.cos-rail #main-menu-placeholder,
html.cos-rail #sub-menu-placeholder,
html.cos-rail .editor-context-shell,
html.cos-rail #hea-footer-placeholder,
html.cos-rail .hea-footer,
html.cos-rail .office-lede,
html.cos-rail .office-fs-logo,
html.cos-rail #officeExpand,
html.cos-rail #officePreviewShow {
  display: none !important;
}
html.cos-rail .page.office-desk-page {
  max-width: none;
  width: 100%;
  height: 100dvh;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
html.cos-rail .office-desk-head {
  margin: 0;
  padding: 12px 16px 10px;
  border-bottom: 1px solid var(--line, rgba(0, 0, 0, 0.08));
}
html.cos-rail .office-desk-lead h1 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
html.cos-rail .office-chat-tools {
  padding: 8px 12px 0;
  gap: 6px;
}
html.cos-rail .office-desk-layout,
html.cos-rail .office-desk-thread {
  flex: 1 1 auto;
  min-height: 0;
}
html.cos-rail .office-log {
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  min-height: 0;
}
html.cos-rail .office-composer {
  padding: 8px 12px 12px;
}
html.cos-rail .office-composer-box textarea,
html.cos-rail #officeInput {
  min-height: 40px;
  border-radius: 16px 16px 0 0;
}
html.cos-rail .office-disclosure {
  margin: 0;
  padding: 0 14px 12px;
  font-size: 12px;
}
html.cos-rail body.office-expand .page.office-desk-page {
  padding: 0 !important;
}
html.cos-rail body.office-expand:not(.office-preview-off) .office-desk-layout {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 0;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}
html.cos-rail body.office-expand:not(.office-preview-off) .office-desk-thread,
html.cos-rail body.office-expand:not(.office-preview-off) .office-preview {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
html.cos-rail body.office-expand:not(.office-preview-off) .office-preview {
  display: flex;
  position: static;
  z-index: auto;
  border-radius: 0;
  border-width: 0 0 0 1px;
}
html.cos-rail.cos-rail-sheet body.office-expand:not(.office-preview-off) .office-desk-thread {
  display: none;
}
html.cos-rail.cos-rail-sheet body.office-expand:not(.office-preview-off) .office-desk-layout {
  display: flex;
  grid-template-columns: none;
}
html.cos-rail.cos-rail-sheet body.office-expand:not(.office-preview-off) .office-preview {
  flex: 1 1 auto;
  border-left-width: 0;
}
html.dark.cos-rail .office-desk-head {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}
.office-attach { position: relative; }
.office-attach-menu {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  z-index: 5;
  min-width: 180px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
.office-attach-menu button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
}
.office-attach-menu button:hover { background: var(--surface-2, rgba(0,0,0,.04)); }
html.dark .office-attach-menu { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4); }
.office-letter-nav {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin: 0 0 10px;
}
.office-card-form input, .office-card-form textarea {
  width: 100%;
  box-sizing: border-box;
}