/* The structured-data page: type register, repeatable rows, and the reader panel.
   Everything shared with the tag builder lives in styles.css and output.css. */

/* A register, not a row of tabs: five names side by side leave 76px a card, which
   is not enough for the word "Organization", let alone what the type is for. */
.type-picker {
  display: grid;
  margin: 0 0 26px;
  padding: 0;
  border: 1px solid var(--ink);
}

.type-option {
  position: relative;
  display: grid;
  grid-template-columns: 106px minmax(0, 1fr);
  gap: 14px;
  align-items: baseline;
  padding: 11px 14px 12px;
  background: #fbf8ef;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
}

.type-option:last-child { border-bottom: 0; }
.type-option:hover { background: var(--paper); }

/* The radio still exists for the keyboard and the accessibility tree; only its
   default box is gone, so the whole card can carry the selected state. */
.type-option input {
  position: absolute;
  width: 1px;
  min-height: 0;
  height: 1px;
  padding: 0;
  border: 0;
  opacity: 0;
}

.type-option:has(input:checked) {
  color: var(--paper-light);
  background: var(--ink);
}

/* The same acid-on-ink the masthead register uses for the live column. */
.type-option:has(input:checked) .type-name { color: var(--acid); }

.type-option:has(input:focus-visible) {
  outline: 3px solid var(--orange);
  outline-offset: -3px;
}

.type-name {
  font: 600 11px/1.5 var(--mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.type-tag {
  display: inline-block;
  padding: 2px 4px;
  color: var(--paper-light);
  background: var(--warn);
  font-size: 7px;
  font-weight: 500;
  letter-spacing: 0.1em;
  vertical-align: 1px;
}

.type-blurb {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.type-option:has(input:checked) .type-blurb { color: rgba(255, 253, 247, 0.66); }

/* Tier is a property of the vocabulary, not of what has been typed, so the
   validity colouring the tag builder puts on .field-state must not repaint it. */
.field[data-tier] .field-state { color: var(--muted); }
.field[data-tier="required"] .field-state { color: var(--blue); }

.field-foot output:empty { display: none; }
.field[data-valid="true"] .field-foot output { color: var(--good); }
.field[data-valid="false"] .field-foot output { color: var(--warn); }

.repeat-row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 28px;
  gap: 8px;
  align-items: start;
  margin-bottom: 10px;
}

.repeat-index {
  padding-top: 15px;
  color: var(--muted);
  font: 500 10px/1 var(--mono);
}

.repeat-inputs {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.repeat-remove {
  width: 28px;
  height: 28px;
  margin-top: 9px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  font: 400 15px/1 var(--mono);
}

.repeat-remove:hover,
.repeat-remove:focus-visible {
  color: var(--paper-light);
  background: var(--warn);
  border-color: var(--warn);
}

.repeat-add { margin-top: 2px; }

.ld-chip {
  align-self: flex-start;
  padding: 7px 9px;
  color: var(--paper-light);
  background: var(--ink);
  font: 500 9px/1 var(--mono);
  letter-spacing: 0.05em;
}

/* What the type is actually worth, stated before the properties are listed. */
.appearance-card {
  margin-bottom: 24px;
  padding: 18px 20px 20px;
  background: #fbf8ef;
  border: 1px solid var(--ink);
  border-left: 5px solid var(--blue);
}

.appearance-card[data-retired="true"] { border-left-color: var(--warn); }

.appearance-result {
  display: flex;
  gap: 10px;
  align-items: baseline;
  margin: 0 0 9px;
  font: 700 18px/1.25 var(--display);
  letter-spacing: -0.025em;
}

.appearance-mark { color: var(--blue); font-size: 11px; }
.appearance-card[data-retired="true"] .appearance-mark { color: var(--warn); }

.appearance-detail {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.appearance-docs {
  display: inline-block;
  padding-bottom: 3px;
  color: var(--blue);
  border-bottom: 1px solid currentColor;
  font: 500 10px/1 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
}

.appearance-docs:hover { color: var(--orange); }

.read-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0 0 10px;
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(23, 23, 20, 0.23);
  font-family: var(--mono);
}

.read-label span {
  color: var(--ink);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.read-label small {
  color: var(--muted);
  font-size: 8px;
  text-transform: uppercase;
}

.entity-row { margin-bottom: 24px; }

.entity-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.entity-chip {
  padding: 6px 8px;
  background: var(--paper);
  border: 1px solid var(--ink);
  font: 500 10px/1 var(--mono);
}

/* The outermost entity is the one Google indexes; the rest hang off it. */
.entity-chip:first-child {
  color: var(--paper-light);
  background: var(--ink);
}

.property-list {
  display: grid;
  grid-template-columns: minmax(120px, 0.45fr) minmax(0, 1fr);
  max-height: 440px;
  margin: 0;
  overflow-y: auto;
  border-top: 1px solid var(--line);
}

.property-list dt,
.property-list dd {
  min-width: 0;
  padding: 8px 0;
  overflow-wrap: anywhere;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
}

.property-list dt {
  padding-right: 12px;
  color: var(--blue);
  font-family: var(--mono);
}

.property-list dd { margin: 0; }

.property-empty {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.reader-note {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 6px;
  max-width: 620px;
  margin: 30px 0 0;
  padding-top: 14px;
  border-top: 1px solid rgba(23, 23, 20, 0.23);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.7;
}

/* The prose is one grid item, not several: inline children of a grid container
   each get their own cell, which would drop the link into the marker column. */
.reader-note p { margin: 0; }

.reader-note span {
  color: var(--orange);
  font-size: 12px;
}

.reader-note a { color: var(--blue); }
