/* TurkOS Office Explorer — clean-room Mac Office 16.115 <-> TurkOS interactive styles */
.office-explorer-section,
.office-compare-section,
.office-platform-section,
.office-preview-section {
  margin-top: 4rem;
  min-width: 0;
}

.office-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11.5rem, 1fr));
  gap: 0.85rem;
  margin: 1.5rem 0 2rem;
}

.office-kpi-card {
  min-width: 0;
  padding: 1.15rem 1.2rem;
  border: 1px solid var(--line);
  background: #0d2129;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.office-kpi-card > span {
  font: 0.68rem/1.4 var(--mono);
  letter-spacing: 0.08em;
  color: var(--aqua);
}

.office-kpi-card > strong {
  font: 600 clamp(1.35rem, 2.2vw, 1.9rem)/1.15 var(--heading);
  color: var(--mint);
  overflow-wrap: anywhere;
}

.office-kpi-card > small {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.office-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.office-preview-figure {
  margin: 0;
  min-width: 0;
  border: 1px solid var(--line);
  background: #0b1c24;
  display: flex;
  flex-direction: column;
}

.office-preview-figure img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-bottom: 1px solid var(--line);
  background: #07131b;
}

.office-preview-figure figcaption {
  padding: 0.9rem 1.05rem;
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--muted);
}

.office-preview-figure figcaption strong {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--mint);
  font: 500 0.72rem/1.4 var(--mono);
  letter-spacing: 0.06em;
}

.office-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  margin: 1.25rem 0;
  border: 1px solid var(--line);
  background: #0b1d25;
}

.office-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.office-table caption {
  text-align: left;
  padding: 0.85rem 1rem;
  font: 600 0.95rem/1.4 var(--heading);
  color: var(--text);
  border-bottom: 1px solid var(--line);
  background: #0e242e;
}

.office-table th,
.office-table td {
  padding: 0.72rem 0.95rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  line-height: 1.5;
}

.office-table thead th {
  font: 500 0.68rem/1.4 var(--mono);
  letter-spacing: 0.07em;
  color: var(--aqua);
  background: #08171f;
}

.office-table tbody th {
  color: var(--text);
  font-weight: 600;
}

.office-table tbody td {
  color: var(--muted);
}

.office-table code {
  color: var(--mint);
  font: 0.78rem/1.5 var(--mono);
  overflow-wrap: anywhere;
}

.office-platform-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.office-platform-card {
  min-width: 0;
  padding: 1.35rem;
  border: 1px solid var(--line);
  background: #0c2028;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.office-platform-card-unsupported {
  border-color: rgba(232, 146, 134, 0.55);
  background: rgba(145, 45, 38, 0.14);
}

.office-platform-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.office-platform-head h3 {
  margin: 0;
  font: 600 1.18rem/1.25 var(--heading);
  color: var(--text);
}

.office-platform-arch {
  font: 500 0.68rem/1.4 var(--mono);
  letter-spacing: 0.08em;
  color: var(--aqua);
}

.office-platform-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.office-platform-card code {
  color: var(--mint);
  font: 0.78rem var(--mono);
  overflow-wrap: anywhere;
}

.office-badge {
  display: inline-block;
  padding: 0.28rem 0.55rem;
  border: 1px solid currentColor;
  font: 500 0.64rem/1.3 var(--mono);
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.office-badge-enabled {
  color: var(--mint);
  background: rgba(182, 239, 202, 0.08);
}

.office-badge-limited {
  color: var(--orange);
  background: rgba(243, 189, 137, 0.08);
}

.office-badge-static {
  color: var(--aqua);
  background: rgba(114, 215, 204, 0.08);
}

.office-badge-unsupported {
  color: #f4a499;
  background: rgba(232, 146, 134, 0.14);
}

/* Interactive Explorer Root */
.office-explorer {
  margin-top: 1.5rem;
  border: 1px solid rgba(182, 239, 202, 0.28);
  background: #0a1b23;
  min-width: 0;
}

.office-explorer [hidden] {
  display: none !important;
}

.office-explorer-noscript {
  margin: 0;
  padding: 1.35rem;
  color: var(--muted);
  line-height: 1.65;
}

.office-explorer-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--line);
  background: #0f2630;
}

.office-app-switcher,
.office-mode-tabs,
.office-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.office-pill-row + .office-pill-row,
.office-mt-sm {
  margin-top: 0.65rem;
}

.office-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: #091820;
  color: var(--muted);
  padding: 0.52rem 0.85rem;
  font: 500 0.8rem/1.3 var(--body);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.office-btn:hover {
  border-color: var(--mint);
  color: var(--text);
}

.office-btn:focus-visible,
.office-explorer input:focus-visible,
.office-explorer select:focus-visible {
  outline: 3px solid var(--mint);
  outline-offset: 2px;
}

.office-btn[aria-selected="true"],
.office-btn[aria-pressed="true"],
.office-btn.is-active {
  border-color: var(--mint);
  background: rgba(182, 239, 202, 0.14);
  color: var(--mint);
}

.office-btn-small {
  padding: 0.38rem 0.65rem;
  font-size: 0.74rem;
}

.office-explorer-panel {
  padding: 1.25rem;
  min-width: 0;
}

.office-filter-row {
  display: grid;
  grid-template-columns: minmax(11rem, 2fr) repeat(2, minmax(8.5rem, 1fr)) auto;
  gap: 0.65rem;
  align-items: end;
  margin-bottom: 1.15rem;
}

.office-filter-field {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.office-filter-field label {
  font: 500 0.68rem/1.3 var(--mono);
  letter-spacing: 0.06em;
  color: var(--aqua);
}

.office-filter-field input,
.office-filter-field select {
  width: 100%;
  min-width: 0;
  min-height: 2.55rem;
  padding: 0.48rem 0.7rem;
  border: 1px solid rgba(163, 222, 210, 0.32);
  border-radius: 3px;
  background: #07131b;
  color: var(--text);
  font: inherit;
  font-size: 0.86rem;
}

.office-filter-count {
  font: 500 0.76rem/1.4 var(--mono);
  color: var(--mint);
  padding-bottom: 0.55rem;
  white-space: nowrap;
}

.office-ribbon-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.95fr);
  gap: 1.25rem;
  align-items: start;
  margin-top: 1rem;
}

.office-preview-stage {
  border: 1px solid var(--line);
  background: #07131b;
  margin-top: 1rem;
}

.office-preview-stage img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-bottom: 1px solid var(--line);
}

.office-preview-caption {
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--muted);
}

.office-preview-caption strong {
  color: var(--mint);
  font-family: var(--mono);
  font-size: 0.72rem;
}

.office-group-list {
  display: grid;
  gap: 0.9rem;
  min-width: 0;
}

.office-group-box {
  border: 1px solid var(--line);
  background: #0d2129;
  padding: 0.9rem;
  min-width: 0;
}

.office-group-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.7rem;
  font: 600 0.86rem/1.3 var(--heading);
  color: var(--aqua);
}

.office-control-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr));
  gap: 0.5rem;
}

.office-control-card {
  appearance: none;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  background: #08171f;
  color: var(--text);
  cursor: pointer;
}

.office-control-card:hover,
.office-control-card.is-selected {
  border-color: var(--mint);
  background: #102a33;
}

.office-control-card.is-disabled {
  border-color: rgba(243, 189, 137, 0.28);
  opacity: 0.88;
}

.office-icon-well {
  flex: none;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(163, 222, 210, 0.22);
  background: #16333f;
  border-radius: 3px;
}

.office-icon-well svg {
  display: block;
  max-width: 24px;
  max-height: 24px;
}

.office-icon-fallback {
  font: 600 0.68rem/1 var(--mono);
  color: var(--aqua);
}

.office-control-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}

.office-control-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  overflow-wrap: anywhere;
}

.office-control-sub {
  font: 400 0.66rem/1.3 var(--mono);
  color: var(--muted);
  overflow-wrap: anywhere;
}

.office-inspector {
  border: 1px solid rgba(114, 215, 204, 0.35);
  background: #0d222b;
  padding: 1.15rem;
  position: sticky;
  top: 1rem;
  min-width: 0;
}

.office-inspector-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--line);
}

.office-inspector-head .office-icon-well {
  width: 42px;
  height: 42px;
}

.office-inspector-head .office-icon-well svg {
  max-width: 32px;
  max-height: 32px;
}

.office-inspector-head h4 {
  margin: 0;
  font: 600 1.08rem/1.25 var(--heading);
  overflow-wrap: anywhere;
}

.office-inspector-dl {
  margin: 0.85rem 0 0;
  display: grid;
  gap: 0.6rem;
}

.office-inspector-dl dt {
  font: 500 0.65rem/1.3 var(--mono);
  letter-spacing: 0.08em;
  color: var(--aqua);
}

.office-inspector-dl dd {
  margin: 0.18rem 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

/* Icons Grid */
.office-icons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
  gap: 0.65rem;
}

.office-icon-tile {
  min-width: 0;
  padding: 0.75rem;
  border: 1px solid var(--line);
  background: #0c1f27;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.office-icon-tile-top {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.office-icon-tile strong {
  font-size: 0.82rem;
  line-height: 1.3;
  color: var(--text);
  overflow-wrap: anywhere;
}

.office-icon-tile code {
  font: 400 0.68rem/1.35 var(--mono);
  color: var(--aqua);
  overflow-wrap: anywhere;
}

.office-icon-tile small {
  font: 400 0.68rem/1.35 var(--mono);
  color: var(--muted);
}

/* Global Menu Tree */
.office-menu-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 1.25rem;
  align-items: start;
  margin-top: 1rem;
}

.office-menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  background: #0c1f27;
}

.office-menu-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.62rem 0.9rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.84rem;
}

.office-menu-row:last-child {
  border-bottom: 0;
}

.office-menu-sep {
  height: 1px;
  background: rgba(163, 222, 210, 0.28);
  margin: 0.15rem 0;
}

.office-menu-label {
  min-width: 0;
  overflow-wrap: anywhere;
}

.office-menu-label strong {
  display: block;
  color: var(--text);
  font-weight: 600;
}

.office-menu-label small {
  display: block;
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.45;
}

.office-menu-right {
  flex: none;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.office-kbd {
  display: inline-block;
  padding: 0.15rem 0.4rem;
  border: 1px solid rgba(163, 222, 210, 0.25);
  background: #07131b;
  color: var(--mint);
  font: 500 0.68rem/1.3 var(--mono);
}

.office-submenu {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0.35rem 0 0.1rem 1rem;
  border-left: 2px solid rgba(114, 215, 204, 0.3);
}

.office-modules-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.office-module-card {
  min-width: 0;
  padding: 1.05rem;
  border: 1px solid var(--line);
  background: #0c1f27;
}

.office-module-card h4 {
  margin: 0 0 0.5rem;
  font: 600 1rem/1.3 var(--heading);
  color: var(--mint);
}

.office-module-card ul {
  margin: 0.5rem 0 0;
  padding-left: 1.15rem;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.55;
}

.office-module-card li {
  overflow-wrap: anywhere;
}

@media (max-width: 1100px) {
  .office-ribbon-layout,
  .office-menu-layout,
  .office-preview-grid,
  .office-platform-grid,
  .office-modules-grid {
    grid-template-columns: 1fr;
  }

  .office-inspector {
    position: static;
  }

  .office-filter-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .office-table {
    min-width: 0;
  }

  .office-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .office-table tbody,
  .office-table tr {
    display: block;
  }

  .office-table tbody tr {
    padding: 0.65rem 0.85rem;
    border-bottom: 1px solid var(--line);
  }

  .office-table tbody th,
  .office-table tbody td {
    display: block;
    min-width: 0;
    padding: 0.25rem 0;
    border: 0;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 600px) {
  .office-filter-row {
    grid-template-columns: 1fr;
  }

  .office-explorer-panel {
    padding: 0.85rem;
  }

  .office-control-grid,
  .office-icons-grid {
    grid-template-columns: 1fr;
  }

  .office-badge,
  .office-filter-count {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}
