* {
  box-sizing: border-box;
}
html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
}
body {
  overflow: hidden;
  background: #f3f5f7;
  color: #1f2937;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}
button,
a {
  font: inherit;
}
.appbar {
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 12px;
  background: #fff;
  border-bottom: 1px solid #dfe3e8;
}
.brand,
.app-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.brand-mark {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 3px;
  background: #217346;
  color: #fff;
  font-weight: 700;
}
.brand strong,
.brand small {
  display: block;
  white-space: nowrap;
}
.brand strong {
  font-size: 13px;
}
.brand small {
  margin-top: 1px;
  color: #7a8491;
  font-size: 10px;
}
.app-actions {
  justify-content: flex-end;
  color: #667085;
  font-size: 11px;
}
.local-edit {
  padding: 4px 7px;
  border-radius: 3px;
  background: #fff7db;
  color: #7a5b00;
  white-space: nowrap;
}
.secondary-action,
.download,
.icon-button {
  border: 1px solid #d5dbe2;
  border-radius: 4px;
  background: #fff;
  color: #344054;
  text-decoration: none;
  cursor: pointer;
}
.secondary-action,
.download {
  padding: 7px 10px;
  white-space: nowrap;
}
.secondary-action:hover,
.icon-button:hover {
  background: #f5f7f9;
}
.download {
  border-color: #217346;
  background: #217346;
  color: #fff;
  font-weight: 600;
}
.download:hover {
  background: #185c37;
}
.workspace {
  position: relative;
  width: 100%;
  height: calc(100vh - 46px);
}
.sheet-area,
#univer {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
}
.sheet-area {
  overflow: hidden;
  background: #fff;
}
.audit-panel {
  position: absolute;
  z-index: 30;
  top: 8px;
  right: 8px;
  bottom: 8px;
  width: min(390px, calc(100vw - 24px));
  overflow: auto;
  padding: 16px;
  border: 1px solid #d8dee6;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 16px 42px rgb(15 23 42 / 18%);
}
.audit-panel[hidden] {
  display: none;
}
.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eaecf0;
}
.eyebrow {
  margin: 0 0 4px;
  color: #7a8491;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .1em;
}
.panel-head h1 {
  margin: 0;
  font-size: 18px;
}
.icon-button {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  padding: 0;
  font-size: 20px;
}
.selection {
  display: grid;
  grid-template-columns: minmax(0,1fr) 88px;
  gap: 10px;
  margin: 14px 0 18px;
}
.selection dt,
.audit-section h2 {
  margin: 0 0 6px;
  color: #727d8d;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .055em;
  text-transform: uppercase;
}
.selection dd {
  overflow: hidden;
  margin: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
}
.audit-section {
  margin-bottom: 16px;
}
.value-box,
.formula-box,
.tree-box {
  display: block;
  width: 100%;
  min-height: 36px;
  margin: 0;
  padding: 8px 9px;
  overflow-wrap: anywhere;
  border: 1px solid #e0e5eb;
  border-radius: 4px;
  background: #f8fafc;
  font: 11px/1.45 "SFMono-Regular", Consolas, monospace;
  white-space: pre-wrap;
}
.formula-box {
  color: #174f86;
  background: #f3f7fc;
}
.tree-box {
  max-height: 210px;
  overflow: auto;
}
.references {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.references a {
  color: #176b49;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.references a:hover {
  text-decoration: underline;
}
.references p {
  margin: 5px 0;
}
.references code {
  font-size: 10px;
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.section-title button {
  padding: 0;
  border: 0;
  background: none;
  color: #217346;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
}
.section-title button:disabled {
  color: #a0a7b2;
  cursor: default;
}
.sheet-formulas-list {
  display: grid;
  gap: 4px;
  max-height: 250px;
  overflow: auto;
  margin: 7px 0 0;
  padding: 0;
  list-style: none;
}
.sheet-formula-link {
  display: grid;
  grid-template-columns: 42px minmax(0,1fr);
  gap: 6px;
  padding: 5px 6px;
  border: 1px solid #e2e7ec;
  border-radius: 4px;
  background: #fafbfc;
  color: #174f86;
  text-decoration: none;
  font: 10px/1.35 "SFMono-Regular", Consolas, monospace;
}
.sheet-formula-link strong {
  color: #176b49;
}
.sheet-formula-link code {
  overflow-wrap: anywhere;
  font: inherit;
}
.muted,
.panel-note {
  color: #8a94a2;
  font-size: 10px;
  line-height: 1.45;
}
.panel-note {
  margin: 16px 0 0;
  padding-top: 11px;
  border-top: 1px solid #eaecf0;
}
.top-note {
  margin-top: 12px;
  padding-top: 0;
  border-top: 0;
}
.dependents-title {
  margin-top: 10px !important;
}
@media (max-width: 900px) {
  .app-actions #book-status,
  .local-edit {
    display: none;
  }
}
@media (max-width: 640px) {
  .appbar {
    padding: 0 8px;
  }
  .brand small,
  .secondary-action#reset-workbook {
    display: none;
  }
  .secondary-action,
  .download {
    padding: 6px 8px;
    font-size: 10px;
  }
  .audit-panel {
    inset: 6px;
    width: auto;
  }
}
