:root {
  --line: #e2dfda;
  --tab: #f6ede2;
  --tab-active: #fff7ec;
}

.spec-hero {
  margin-bottom: 1rem;
  padding: 1rem 1.2rem;
  border: 1px solid #eadfce;
  border-radius: 1rem;
  background: linear-gradient(180deg, #fffaf4, #fffdf9);
  color: #281508;
}

.spec-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.spec-badge {
  width: 2.95rem;
  height: 2.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid #f0d4b5;
  border-radius: .75rem;
  background: linear-gradient(135deg, #ef7d12, #d85c00);
  color: #fff;
  box-shadow: 0 10px 22px rgba(95, 46, 12, .07);
}

.spec-title {
  margin: 0;
  color: #281508;
  font-size: .95rem;
  font-weight: 900;
  line-height: 1.2;
}

.spec-sub {
  margin: .22rem 0 0;
  max-width: 70ch;
  color: var(--ink);
  font-size: .74rem;
  line-height: 1.35;
}

.spec-body {
  display: grid;
  gap: 0;
  min-width: 0;
}

.spec-intro {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.spec-panel {
  background: var(--paper);
  border: 1px solid #eadfce;
  border-radius: 1rem;
  padding: 1rem 1.1rem;
}

.spec-panel-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: var(--fire-dark);
}

.spec-panel-copy {
  margin: .25rem 0 0;
  color: var(--ink);
}

.spec-tabs-wrap {
  position: sticky;
  top: 0;
  z-index: 10;
  background: linear-gradient(180deg, rgba(242, 237, 230, 0.96), rgba(242, 237, 230, 0.85));
  backdrop-filter: blur(8px);
  padding: .35rem 0 .7rem;
  margin-bottom: 1rem;
}

.spec-tabs {
  display: flex;
  gap: .55rem;
  overflow: auto;
  padding-bottom: .2rem;
}

.spec-tab {
  border: 1px solid #dfd0be;
  background: var(--tab);
  color: #6e563e;
  border-radius: 999px;
  padding: .55rem .9rem;
  font-size: .85rem;
  font-weight: 700;
  white-space: nowrap;
  transition: all .2s ease;
}

.spec-tab:hover,
.spec-tab:focus {
  background: #fff2df;
  color: var(--fire-dark);
  border-color: #d3a36d;
}

.spec-tab.active {
  background: var(--tab-active);
  color: var(--fire-dark);
  border-color: #d69a53;
  box-shadow: 0 10px 20px rgba(95, 46, 12, 0.08);
}

.sheet {
  display: none;
  min-width: 0;
}

.sheet.active {
  display: block;
}

.sheet-panels {
  min-width: 0;
  max-width: 100%;
}

.sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: .9rem;
}

.sheet-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--fire-dark);
}

.sheet-copy {
  margin: .2rem 0 0;
  color: var(--ink);
}

.sheet-card {
  max-width: 100%;
  min-width: 0;
  background: var(--paper);
  border: 1px solid #eadfce;
  border-radius: 1rem;
  overflow: hidden;
}

.table-wrap {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.spec-table {
  margin: 0;
  width: max-content;
  min-width: 100%;
}

.spec-table th {
  position: sticky;
  top: 0;
  background: #1f4e78;
  color: #fff;
  font-size: .8rem;
  text-transform: none;
  letter-spacing: .01em;
  white-space: normal;
  z-index: 1;
}

.spec-table th,
.spec-table td {
  padding: .78rem .8rem;
  border-color: #eee2d2;
  vertical-align: top;
}

.spec-table tbody tr:nth-child(even) {
  background: #fffaf4;
}

.spec-table tbody tr:hover {
  background: #fff3df;
}

.cell-empty {
  color: #a19284;
  font-style: italic;
}

.legend {
  display: flex;
  gap: .65rem;
  flex-wrap: wrap;
  margin-top: .85rem;
}

.legend-pill {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .35rem .7rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 700;
}

.legend-info {
  background: #d6eef3;
  color: #0b5360;
}

.legend-warning {
  background: #fff0d9;
  color: #8a5a12;
}

.legend-error {
  background: #f8d7da;
  color: #842029;
}

.load-state {
  padding: 1.5rem;
  border: 1px dashed #d8c9b7;
  border-radius: 1rem;
  background: #fffdf9;
  color: var(--ink);
}

@media (max-width: 767px) {
  .spec-hero {
    padding: 18px;
  }
  .spec-body {
    padding: 16px;
  }
  .spec-table {
    min-width: 640px;
  }
}
