/**
 * HHIO portal + tables on light brand theme (hhio-brand.css)
 */

.hhio-main {
  min-height: calc(100vh - var(--header-h) - 120px);
}

.hhio-portal-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

.hhio-page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.hhio-page-head__title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--color-ink);
  margin: 0 0 0.35rem;
}

.hhio-page-head__sub {
  margin: 0;
  color: var(--color-slate);
  font-size: 1rem;
}

.hhio-page-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.hhio-panel {
  background: var(--color-white);
  border: 1px solid var(--color-ice-dark);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 1.5rem 1.35rem;
  margin-bottom: 1.25rem;
}

.hhio-panel--flush-top {
  margin-top: 0;
}

.hhio-form-row {
  margin-bottom: 1.1rem;
  max-width: 28rem;
}

.hhio-form-row label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--color-ink);
  margin-bottom: 0.35rem;
}

.hhio-form-row select,
.hhio-form-row input[type="file"],
.hhio-form-row input[type="number"],
.hhio-form-row input[type="text"] {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--color-ice-dark);
  background: var(--color-white);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 1rem;
}

.hhio-link-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.hhio-link-list li {
  margin-bottom: 0.65rem;
}

.hhio-link-list a {
  color: var(--color-sky-deep);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--color-sky);
}

.hhio-link-list a:hover {
  color: var(--color-ink);
}

.hhio-success {
  color: #15803d;
  font-weight: 600;
}

.hhio-error {
  color: #b91c1c;
  font-weight: 600;
}

.hhio-hint {
  color: var(--color-slate);
  font-size: 0.9rem;
  margin-top: 1rem;
}

.hhio-empty {
  color: var(--color-slate);
  font-style: italic;
}

.hhio-check-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}

.hhio-check-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-ice-dark);
}

.hhio-default-radio {
  margin-left: 0.75rem;
  font-size: 0.85rem;
  color: var(--color-slate);
}

.hhio-lt-matrix__code {
  text-align: center;
  font-size: 0.8rem;
  white-space: nowrap;
}

.hhio-lt-matrix__check {
  text-align: center;
  padding: 0.5rem !important;
}

.hhio-lt-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.hhio-lt-check input {
  width: 1.1rem;
  height: 1.1rem;
  cursor: pointer;
}

.hhio-lt-matrix__default {
  min-width: 5.5rem;
  font-size: 0.85rem;
}

/* Canopy line types — index + per-model configure */
.hhio-canopy-lt-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-bottom: 1rem;
}

.hhio-canopy-lt-search input {
  min-width: min(100%, 320px);
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-ice-dark);
  border-radius: 8px;
  font-size: 1rem;
}

.hhio-canopy-lt-table td {
  vertical-align: middle;
}

.hhio-lt-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  max-width: 28rem;
}

.hhio-lt-pill {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 999px;
  background: rgba(77, 184, 232, 0.15);
  color: var(--color-ink);
}

.hhio-lt-pill--default {
  background: rgba(77, 184, 232, 0.35);
}

.hhio-lt-group {
  margin-bottom: 1.75rem;
}

.hhio-lt-group__title {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
  color: var(--color-ink);
  border-bottom: 1px solid var(--color-ice-dark);
  padding-bottom: 0.35rem;
}

.hhio-lt-group__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.5rem 1rem;
}

.hhio-lt-group__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.hhio-lt-group__check {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  cursor: pointer;
  flex: 1;
  min-width: 0;
}

.hhio-lt-group__code {
  font-weight: 700;
  font-size: 0.85rem;
  min-width: 4.5rem;
}

.hhio-lt-group__label {
  font-size: 0.85rem;
  color: var(--color-slate);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hhio-lt-group__default {
  font-size: 0.8rem;
  color: var(--color-slate);
  white-space: nowrap;
  flex-shrink: 0;
}

.hhio-lt-group__default input:disabled + *,
.hhio-lt-group__default input:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
}

.hhio-general-chart__hint {
  font-size: 0.8rem;
  color: var(--color-slate);
  max-width: 14rem;
}

.hhio-general-chart__input {
  width: 4.5rem;
  padding: 0.35rem 0.5rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
  border: 1px solid var(--color-ice-dark);
  border-radius: 6px;
}

/* Light tables inside portal */
.hhio-site--portal .hhio-table-wrap {
  overflow-x: auto;
  margin-top: 0.75rem;
}

.hhio-site--portal .hhio-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.hhio-site--portal .hhio-table thead th {
  text-align: left;
  padding: 0.65rem 0.75rem;
  background: var(--color-ice);
  color: var(--color-ink);
  font-weight: 700;
  border-bottom: 2px solid var(--color-ice-dark);
}

.hhio-site--portal .hhio-table tbody td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--color-ice-dark);
  color: var(--color-slate);
}

.hhio-site--portal .hhio-table tbody tr:hover td {
  background: rgba(77, 184, 232, 0.08);
}

.hhio-col-highlight {
  background: rgba(77, 184, 232, 0.22) !important;
  font-weight: 700;
  color: var(--color-ink) !important;
}

.hhio-table-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.hhio-form-hint {
  margin: 0.35rem 0 0;
  font-size: 0.875rem;
  color: var(--color-slate);
}

.hhio-sheet-ref {
  margin-bottom: 1.25rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--color-ice-dark);
  border-radius: 8px;
  background: #fff;
}

.hhio-sheet-ref__title {
  font-family: var(--font-display, "Fraunces", serif);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--color-ink);
}

.hhio-sheet-ref__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  font-size: 0.9rem;
  color: var(--color-slate);
}

.hhio-sheet-footnote {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
  color: var(--color-slate);
}

.hhio-sheet-notice {
  border-left: 4px solid var(--color-sky, #4db8e8);
}

.hhio-sheet-notice p {
  margin: 0 0 0.5rem;
}

.hhio-sheet-notice p:last-child {
  margin-bottom: 0;
}

@media print {
  .site-header,
  .site-footer,
  .hhio-page-nav,
  .hhio-no-print,
  .btn {
    display: none !important;
  }
  .hhio-sheet-ref {
    border: 2px solid #000;
    margin-bottom: 1rem;
  }
  .hhio-sheet-ref__title {
    font-size: 14pt;
  }
  .hhio-sheet-ref__meta {
    font-size: 10pt;
  }
  .hhio-panel {
    box-shadow: none;
    border: 1px solid #ccc;
    break-inside: avoid;
  }
  body.hhio-site {
    background: #fff;
  }
}
