/* TTO Registry: intake form, search, cards, single entry. Cards reuse .app-card-v2 from style.css. */

.tto-registry,
.tto-form,
.tto-defs {
  --tto-navy: #163763;
  --tto-navy-dark: #0b1c34;
  --tto-line: #d9dee6;
  --tto-soft: #f4f6f9;
  line-height: 1.4;
}

.tto-form input[type="text"],
.tto-form input[type="email"],
.tto-form input[type="tel"],
.tto-form textarea,
.tto-form select,
.tto-search input[type="search"],
.tto-search select {
  width: 100%;
  max-width: 100%;
  border: 1px solid #b9c1cc;
  border-radius: 3px;
  background: #fff;
  font: inherit;
  font-size: 15px;
  color: #222;
}

.tto-form textarea {
  resize: vertical;
}

.tto-field {
  margin: 0 0 14px;
  line-height: 1.4;
  min-width: 0;
}

.tto-field label,
.tto-label {
  display: block;
  margin: 0 0 5px;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.4;
}

.tto-req {
  color: #b00020;
}

.tto-hint {
  margin: 0 0 14px;
  line-height: 1.5;
  color: #444;
}

.tto-grid {
  display: grid;
  gap: 0 20px;
}

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

.tto-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tto-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Sections */

.tto-section {
  margin: 0 0 30px;
  padding: 22px 22px 8px;
  border: 1px solid var(--tto-line);
  background: #fff;
  min-width: 0;
}

.tto-section legend {
  padding: 0 8px;
  font-size: 20px;
  font-weight: 700;
  color: var(--tto-navy);
}

.tto-checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 20px;
}

.tto-checks label,
.tto-filter label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.4;
  cursor: pointer;
}

.tto-checks input,
.tto-filter input,
.tto-sub__name input {
  flex: 0 0 auto;
  margin: 2px 0 0;
  padding: 0;
  width: 16px;
  height: 16px;
}

/* Technology areas in the form */

.tto-area {
  margin: 0 0 22px;
  padding: 0 0 18px;
  border-bottom: 1px dotted #999;
}

.tto-area:last-child {
  border-bottom: 0;
}

.tto-registry h2.tto-area__title,
.tto-form h2.tto-area__title {
  margin: 0 0 4px;
  font-size: 18px;
  line-height: 1.3;
  color: var(--tto-navy);
}

.tto-area__desc {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.5;
  color: #444;
}

.tto-subs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 24px;
}

.tto-sub {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px 92px;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 3px;
}

.tto-sub.is-on {
  background: var(--tto-soft);
}

.tto-sub__name {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  font-size: 14px;
  line-height: 1.35;
  cursor: pointer;
}

.tto-form .tto-sub select {
  padding: 6px 4px;
  font-size: 14px;
}

.tto-sub:not(.is-on) select {
  opacity: 0.55;
}

/* Buttons and notices */

.tto-button {
  display: inline-block;
  padding: 15px 35px;
  border: 2px solid #fff;
  background: var(--tto-navy);
  color: #fff;
  font: inherit;
  font-size: 15px;
  line-height: 1;
  text-transform: uppercase;
  cursor: pointer;
}

.tto-button:hover,
.tto-button:focus {
  background: var(--tto-navy-dark);
}

.tto-submit {
  margin: 0 0 40px;
}

.tto-notice {
  margin: 0 0 24px;
  padding: 14px 18px;
  border-left: 4px solid;
  line-height: 1.5;
}

.tto-notice ul {
  margin: 6px 0 0;
}

.tto-notice--ok {
  border-color: #2e7d32;
  background: #eef7ee;
}

.tto-notice--error {
  border-color: #b00020;
  background: #fdecee;
}

/* Definitions as collapsible panels in the form */

.tto-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 20px;
  align-items: start;
  margin: 0 0 22px;
}

.tto-panel {
  border: 1px solid var(--tto-line);
  background: var(--tto-soft);
  min-width: 0;
}

.tto-panel summary {
  padding: 12px 14px;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.35;
  color: var(--tto-navy);
  cursor: pointer;
}

.tto-panel summary:hover {
  text-decoration: underline;
}

.tto-panel[open] summary {
  border-bottom: 1px solid var(--tto-line);
}

.tto-panel dl {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 6px 12px;
  margin: 0;
  padding: 12px 14px 14px;
  font-size: 14px;
  line-height: 1.45;
}

.tto-panel dt {
  font-weight: 700;
  white-space: nowrap;
}

.tto-panel dd {
  margin: 0;
}

/* Definitions */

.tto-defs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 40px;
  margin: 10px 0 30px;
  padding: 22px;
  background: var(--tto-soft);
}

.tto-defs h2 {
  margin: 0 0 12px;
  font-size: 18px;
  color: var(--tto-navy);
}

.tto-defs dl {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 6px 12px;
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
}

.tto-defs dt {
  font-weight: 700;
  white-space: nowrap;
}

.tto-defs dd {
  margin: 0;
}

/* Registry search */

.tto-registry--search {
  margin: 0 0 10px;
}

.tto-registry--results {
  margin: 30px 0 0;
}

.tto-back {
  margin: 0 0 30px;
  font-size: 14px;
}

.tto-search {
  margin: 0 0 20px;
  padding: 20px 22px 6px;
  border: 1px solid var(--tto-line);
  background: var(--tto-soft);
}

.tto-registry h2.tto-search__title {
  margin: 0 0 14px;
  font-size: 22px;
  color: var(--tto-navy);
}

.tto-search__areas {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 20px;
  align-items: start;
  margin: 0 0 16px;
}

.tto-filter {
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--tto-line);
  min-width: 0;
}

.tto-filter.is-open {
  border-color: var(--tto-navy);
}

.tto-filter label.tto-filter__area {
  font-weight: 700;
  font-size: 15px;
  color: var(--tto-navy);
}

.tto-filter__subs {
  display: none;
  margin: 10px 0 2px 24px;
}

.tto-filter.is-open .tto-filter__subs {
  display: grid;
  gap: 5px;
}

.tto-search__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0 16px;
}

.tto-search__bar .tto-field {
  flex: 0 0 150px;
}

.tto-search__bar .tto-field--grow {
  flex: 1 1 260px;
}

.tto-search__buttons {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 14px;
}

.tto-search__buttons .tto-button {
  padding: 12px 28px;
}

.tto-reset {
  font-size: 14px;
  text-decoration: underline;
}

.tto-count {
  margin: 0 0 6px;
  font-weight: 600;
}

.tto-empty {
  margin: 10px 0 30px;
}

/* Cards: flex instead of the .apps-grid-v2 grid, so an incomplete last row sits in the center. */

.apps-grid-v2.tto-grid-results {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px 24px;
}

.tto-grid-results .app-card-v2 {
  flex: 0 0 calc((100% - 48px) / 3);
  height: auto;
}


.tto-card__area {
  margin: 0 0 10px;
}

.tto-card .app-card-v2__cats {
  margin: 0 0 4px;
}

.content ul.tto-levels {
  margin: 0;
  padding: 0;
  list-style: none;
  line-height: 1.4;
}

.tto-levels li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  margin: 0 0 4px;
  font-size: 14px;
}

.tto-levels__name {
  margin-right: auto;
}

.tto-levels li.is-hit .tto-levels__name {
  font-weight: 700;
}

.tto-chip {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 3px;
  background: #e3e8f0;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

/* Single entry */

.tto-single h2.tto-single__h {
  margin: 24px 0 10px;
  font-size: 20px;
  color: var(--tto-navy, #163763);
}

.tto-single__desc p {
  line-height: 1.6;
  margin: 0 0 10px;
}

.tto-table-wrap {
  overflow-x: auto;
}

.tto-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.4;
}

.tto-table th,
.tto-table td {
  padding: 8px 10px;
  border: 1px solid var(--tto-line, #d9dee6);
  text-align: left;
}

.tto-table thead th {
  background: #163763;
  color: #fff;
}

.tto-table abbr {
  text-decoration: none;
  white-space: nowrap;
}

/* Tablet */

@media only screen and (max-width: 1000px) {
  .tto-search__areas {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tto-subs {
    grid-template-columns: minmax(0, 1fr);
  }

  .tto-grid-results .app-card-v2 {
    flex-basis: calc((100% - 24px) / 2);
  }
}

/* Phone */

@media only screen and (max-width: 700px) {
  .tto-panels,
  .tto-grid--2,
  .tto-grid--3,
  .tto-checks,
  .tto-defs,
  .tto-search__areas {
    grid-template-columns: minmax(0, 1fr);
  }

  .tto-section {
    padding: 16px 14px 4px;
  }

  .tto-sub {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .tto-sub__name {
    grid-column: 1 / -1;
  }

  .tto-defs {
    padding: 16px 14px;
    gap: 20px;
  }

  .tto-search {
    padding: 16px 14px 4px;
  }

  .tto-search__bar .tto-field,
  .tto-search__bar .tto-field--grow {
    flex: 1 1 100%;
  }

  .tto-grid-results .app-card-v2 {
    flex-basis: 100%;
  }

  .tto-button {
    width: 100%;
    text-align: center;
  }
}
