/* Address Plus's own look, after family.css: a panel for each job, its answer as a field table, the call that made it, and the JSON. */
:root {
  --intro-room: 14rem;
  --intro-room-wide: 7rem;
}
.jobs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr));
  gap: 16px;
  align-items: start;
}
.job .fam-panel {
  gap: 12px;
}
.job h2 {
  font-size: 1.05rem;
  font-weight: 700;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
}
.job h2 code {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.job .blurb {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
  max-width: 70ch;
}
.job .fam-row {
  align-items: center;
}
.job .fam-label {
  min-width: 4.2rem;
}
.job .fam-field {
  flex: 1 1 14rem;
  width: 0;
  min-width: 11rem;
  font-size: 1rem;
}
.job .fam-seg button {
  font-weight: 500;
  font-size: 0.85rem;
}
.answer {
  min-height: 9rem;
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 10px 14px;
  background: color-mix(in srgb, var(--surface) 60%, var(--page));
  overflow-wrap: anywhere;
  display: grid;
  gap: 8px;
  align-content: start;
}
.answer .note {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
}
.facts {
  margin: 0;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 6px 14px;
  align-items: baseline;
  font-size: 0.95rem;
}
.facts dt {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  display: grid;
}
.facts dt code {
  font-size: 0.7rem;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 500;
  opacity: 0.8;
}
.facts dd {
  margin: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
  min-width: 0;
}
.findings {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.findings li {
  display: grid;
  gap: 2px;
}
.findings code {
  font-size: 0.8rem;
}
.findings span {
  font-weight: 500;
  font-size: 0.85rem;
}
.lines {
  margin: 0;
  padding: 8px 10px;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.prefixes {
  display: grid;
  gap: 2px;
}
.prefixes .fam-muted {
  font-weight: 500;
  font-size: 0.8rem;
}
.prefixes .fam-notation {
  font-weight: 500;
  font-size: 0.85rem;
}
.call {
  font-size: 0.8rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  overflow-x: hidden;
  min-height: 4.4rem;
}
.json {
  font-size: 0.75rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 24rem;
  overflow: auto;
}
.pair {
  display: flex;
  flex: 1 1 100%;
  align-items: center;
  gap: 8px 12px;
  min-width: 0;
}
.pair .fam-field {
  flex: 1 1 auto;
}
.uses {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
}
.uses code {
  font-family: var(--mono);
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}
.more .uses {
  grid-template-columns: 1fr;
}
@media (max-width: 520px) {
  .job .fam-label {
    min-width: 100%;
  }
  .pair {
    flex-wrap: wrap;
  }
  .job .fam-field {
    flex-basis: 100%;
    min-width: 0;
  }
  .facts {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .facts dd {
    margin-bottom: 8px;
  }
}
/* A panel as wide as the page: the Japanese parts, the pasted list and the corpus. */
.job.wide {
  grid-column: 1 / -1;
}
/* Copy the call, copy a link, and the words that say it was done. */
.tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.tools .copied {
  font-size: 0.85rem;
}
.fam-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
/* Clean: typed, cleaned, then the post office's way, as three steps. */
.chain {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.chain li {
  display: grid;
  gap: 1px;
  padding-left: 12px;
  border-left: 3px solid var(--rule);
}
.chain li:last-child {
  border-left-color: var(--good);
}
.chain .step {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-weight: 600;
}
.chain .value {
  font-weight: 600;
  overflow-wrap: anywhere;
}
/* Japan: one row a part, the Japanese beside its reading, romaji and code. */
.parts-wrap {
  overflow-x: auto;
  max-width: 100%;
}
.parts {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.9rem;
}
.parts th,
.parts td {
  text-align: left;
  padding: 6px 10px 6px 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
  overflow-wrap: anywhere;
}
.parts thead th {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.parts tbody th {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 600;
  display: grid;
  min-width: 6.5rem;
}
.parts tbody th code {
  font-size: 0.7rem;
  font-weight: 500;
  opacity: 0.8;
}
.parts .written {
  font-weight: 700;
  font-size: 1rem;
}
.parts .code {
  font-family: var(--mono);
  font-size: 0.8rem;
}
.verdict {
  display: grid;
  gap: 4px;
  justify-items: start;
}
.verdict code {
  font-size: 0.8rem;
}
.verdict .fam-muted {
  font-weight: 500;
  font-size: 0.85rem;
}
/* The pasted list. */
.bulk-input {
  min-height: 9rem;
  resize: vertical;
  font-family: var(--mono);
  font-size: 1rem;
  line-height: 1.5;
  padding: 10px 12px;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--surface);
}
.job .bulk-input {
  flex: 1 1 100%;
  width: 100%;
}
.bulk-summary {
  display: grid;
  gap: 8px;
}
.bulk-summary .headline,
.corpus-summary .headline {
  margin: 0;
  font-weight: 700;
}
.share-bar {
  display: flex;
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--rule);
}
.share-bar span {
  flex-basis: 0;
  min-width: 4px;
}
[data-kind="US"] {
  --kind: #2f5d8a;
}
[data-kind="CA"] {
  --kind: #b5452c;
}
[data-kind="JP"] {
  --kind: #2f7a4f;
}
[data-kind="AU"] {
  --kind: #7a4f8f;
}
[data-kind="DE"] {
  --kind: #8a7a2f;
}
[data-kind="FR"] {
  --kind: #a64a78;
}
[data-kind="GB"] {
  --kind: #3d7f86;
}
[data-kind="other"] {
  --kind: #b08a2e;
}
[data-kind="none"] {
  --kind: var(--muted);
}
.share-bar span {
  background: var(--kind);
}
.legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-size: 0.85rem;
}
.legend li::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-right: 6px;
  background: var(--kind);
}
.bulk-wrap {
  overflow: auto;
  max-width: 100%;
  max-height: 28rem;
  border: 1px solid var(--rule);
  border-radius: 12px;
}
.bulk-wrap:empty,
.bulk-wrap:has(table:empty) {
  display: none;
}
.bulk-table {
  border-collapse: collapse;
  font-size: 0.85rem;
  min-width: 100%;
}
.bulk-table th,
.bulk-table td {
  text-align: left;
  padding: 6px 10px;
  border-bottom: 1px solid var(--rule);
  white-space: nowrap;
}
.bulk-table thead th {
  position: sticky;
  top: 0;
  background: var(--surface);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.bulk-table td.input,
.bulk-table td.formatted {
  white-space: normal;
  min-width: 16rem;
}
.bulk-table td.n {
  color: var(--muted);
}
.bulk-table tr[data-state="none"] td {
  color: var(--muted);
}
.bulk-table td.check[data-tone="good"] {
  color: var(--good);
  font-weight: 700;
}
.bulk-table td.check[data-tone="bad"] {
  color: var(--bad);
  font-weight: 600;
  font-family: var(--mono);
  font-size: 0.75rem;
}
/* The corpus: a bar a country, then the cases. */
.corpus-summary {
  display: grid;
  gap: 10px;
}
.corpus-bars {
  display: grid;
  gap: 6px;
}
.corpus-bar {
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  font-size: 0.85rem;
}
.corpus-bar .meter {
  height: 12px;
  border-radius: 999px;
  border: 1px solid var(--rule);
  overflow: hidden;
  background: color-mix(in srgb, var(--bad) 35%, transparent);
}
.corpus-bar .meter span {
  display: block;
  height: 100%;
  background: var(--good);
}
.corpus-bar .figures {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.corpus-filters {
  display: grid;
  gap: 8px;
}
.corpus-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.corpus-list li {
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 8px 12px;
  display: grid;
  gap: 4px;
  min-width: 0;
}
.corpus-list li[data-state="todo"] {
  border-color: color-mix(in srgb, var(--bad) 45%, var(--rule));
}
.case-top {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  align-items: center;
}
.case-top .where {
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}
.corpus-list .input {
  font-size: 0.85rem;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.case-detail {
  margin: 0;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 2px 10px;
  font-size: 0.75rem;
}
.case-detail dt {
  color: var(--muted);
}
.case-detail dd {
  margin: 0;
  font-family: var(--mono);
  overflow-wrap: anywhere;
}
@media (max-width: 520px) {
  .corpus-bar {
    grid-template-columns: 4rem minmax(0, 1fr);
  }
  .corpus-bar .figures {
    grid-column: 1 / -1;
  }
  .case-detail {
    grid-template-columns: minmax(0, 1fr);
  }
}
.parts tbody th code {
  text-transform: none;
  letter-spacing: 0;
}
/* On a phone the parts table is a card a part: the part's name, the Japanese large, then each other value with its
   column's name before it. */
@media (max-width: 640px) {
  .parts thead {
    display: none;
  }
  .parts,
  .parts tbody,
  .parts tr,
  .parts th,
  .parts td {
    display: block;
  }
  .parts tr {
    padding: 8px 0;
    border-bottom: 1px solid var(--rule);
  }
  .parts th,
  .parts td {
    border: 0;
    padding: 1px 0;
  }
  .parts td[data-empty="true"] {
    display: none;
  }
  .parts td:not(.written)::before {
    content: attr(data-label) " ";
    color: var(--muted);
    font-size: 0.75rem;
    font-family: var(--font);
    margin-right: 6px;
  }
}
