.anchor-bolt-hero {
  width: 100%;
  text-align: left;
}

.anchor-bolt-hero > p {
  max-width: 980px;
  margin-inline: 0;
}

.anchor-bolt-layout {
  grid-template-columns: minmax(0, 1.12fr) minmax(370px, 0.88fr);
  align-items: start;
}

.anchor-bolt-fields [hidden],
.anchor-case-selector[hidden] {
  display: none;
}

.anchor-bolt-form,
.anchor-bolt-result {
  min-width: 0;
  min-height: 0;
  height: auto;
}

.anchor-load-section {
  min-width: 0;
}

.anchor-load-section h2 {
  margin: 0;
  font-size: 1.1rem;
}

.anchor-load-table-wrap {
  max-width: 100%;
  overflow-x: auto;
}

.anchor-load-table {
  width: 100%;
  min-width: 470px;
  table-layout: fixed;
  border-collapse: collapse;
}

.anchor-load-table th,
.anchor-load-table td {
  padding: 5px 3px;
  text-align: center;
}

.anchor-load-table th:first-child,
.anchor-load-table th:last-child {
  width: 30px;
}

.anchor-load-table input {
  min-width: 0;
  width: 100%;
}

.anchor-add-load {
  margin-top: 8px;
}

.anchor-remove-load {
  width: 26px;
  min-height: 44px;
  color: var(--color-danger);
  font-size: 1.3rem;
}

.anchor-remove-load:disabled {
  opacity: .35;
  cursor: default;
}

.anchor-method-fields {
  padding: 16px;
}

.anchor-case-selector {
  max-width: 320px;
  margin-bottom: 20px;
}

.anchor-check-results,
.anchor-case-summary {
  margin-top: 20px;
}

.anchor-check-result.is-critical {
  color: var(--color-danger);
}

.anchor-check-result .small {
  margin: 4px 0;
}

.anchor-bolt-result {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.anchor-bolt-result .calc-result-empty {
  flex: 1;
}

.anchor-conditional-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.anchor-coordinate-field textarea {
  width: 100%;
  min-height: 136px;
  resize: vertical;
  padding: 12px 14px;
  border: 1px solid var(--color-border-strong);
  border-radius: 13px;
  background: var(--color-surface-2);
  color: var(--color-text);
  font: 500 0.9rem/1.5 Consolas, "Courier New", monospace;
  outline: none;
}

.anchor-coordinate-field textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 15%, transparent);
}

.anchor-form-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
  color: var(--color-primary);
  font-size: 0.84rem;
  font-weight: 800;
}

.anchor-form-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--color-divider);
}

.anchor-field-spacer {
  display: block;
}

.anchor-bolt-result__status {
  margin: 8px 0 0;
  color: color-mix(in srgb, #fff 86%, transparent);
  font-size: 0.9rem;
  font-weight: 700;
}

.anchor-bolt-result .calc-result-header.is-warning {
  background:
    radial-gradient(circle at 90% 10%, rgba(255, 255, 255, 0.18), transparent 35%),
    #9a5b08;
}

.anchor-bolt-analysis-panel {
  padding: clamp(22px, 4vw, 34px);
}

.anchor-bolt-analysis-panel__heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--color-divider);
}

.anchor-bolt-analysis-panel__heading h2 {
  margin: 8px 0 0;
  font-size: 1.45rem;
}

.anchor-bolt-analysis-panel__heading > p {
  max-width: 520px;
  margin: 0;
  color: var(--color-text-muted);
  text-align: right;
}

.anchor-bolt-canvas-wrap {
  min-height: 470px;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: 17px;
  background: var(--color-surface-offset);
}

.anchor-bolt-canvas-wrap canvas {
  display: block;
  width: 100%;
  height: 470px;
}

.anchor-bolt-table-wrap {
  margin-top: 20px;
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: 17px;
}

.anchor-bolt-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.anchor-bolt-table th,
.anchor-bolt-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--color-divider);
  text-align: right;
  white-space: nowrap;
}

.anchor-bolt-table th:first-child,
.anchor-bolt-table td:first-child {
  text-align: center;
}

.anchor-bolt-table th {
  background: var(--color-surface-offset);
  color: var(--color-text-muted);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.anchor-bolt-table tbody tr:last-child td {
  border-bottom: 0;
}

.anchor-bolt-table tbody tr.is-critical {
  background: rgba(220, 38, 38, 0.06);
}

@media (max-width: 1080px) {
  .anchor-bolt-layout {
    grid-template-columns: 1fr;
  }

  .anchor-bolt-form,
  .anchor-bolt-result {
    min-height: 0;
  }
}

@media (max-width: 760px) {
  .anchor-bolt-analysis-panel__heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .anchor-bolt-analysis-panel__heading > p {
    text-align: left;
  }
}

@media (max-width: 620px) {
  .anchor-conditional-fields {
    grid-template-columns: 1fr;
  }

  .anchor-field-spacer {
    display: none;
  }
}
