:root {
  color-scheme: light;
  --paper: #f6f2eb;
  --paper-2: #efe8dc;
  --ink: #1c1915;
  --muted: #5e574e;
  --line: #ddd4c6;
  --forest: #1e3330;
  --copper: #9a451f;
  --seal: #c4622d;
  --font: "Avenir Next", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  --serif: "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif;
  --mono: ui-monospace, "SFMono-Regular", "Source Code Pro", Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: #e7e1d6;
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
}

.wrap {
  max-width: 28rem;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--paper);
  border-inline: 1px solid var(--line);
}

.preview {
  background: var(--forest);
  color: #f6f2eb;
  padding: 0.9rem 1.15rem 1rem;
}

.preview-kicker,
.kicker {
  margin: 0 0 0.3rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.preview-kicker {
  color: #e7b395;
}

.kicker {
  color: var(--copper);
  font-size: 11px;
  font-weight: 600;
}

.preview-copy,
.lead,
.fine,
.relation,
.via,
.note,
.landed-detail,
.subject,
.loading,
.empty {
  margin: 0;
}

.preview-copy {
  color: #e6e0d4;
  font-size: 0.92rem;
}

.preview-label {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #e7b395;
}

.preview select,
input,
button,
summary {
  font: inherit;
}

.preview select,
input {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.45rem 0.55rem;
  color: var(--ink);
  background: #fffdf9;
  border: 1px solid var(--line);
  border-radius: 6px;
}

button,
summary {
  cursor: pointer;
}

button {
  min-height: 2rem;
}

button:focus-visible,
select:focus-visible,
input:focus-visible,
summary:focus-visible,
a:focus-visible {
  outline: 2px solid var(--seal);
  outline-offset: 2px;
}

#app {
  padding: 0.55rem 0.75rem 0.4rem;
  font-size: 13px;
  line-height: 1.3;
}

.home {
  padding: 1.15rem 1.15rem 1.25rem;
}

.subject {
  margin-bottom: 0.35rem;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.address-block + .address-block {
  margin-top: 0.45rem;
  padding-top: 0.4rem;
  border-top: 1px solid var(--line);
}

.address-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}

.home h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 600;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.address {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.unknown-title {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
}

.relation,
.via,
.landed-detail,
.fine {
  color: var(--muted);
}

.fine {
  font-size: 0.92rem;
}

.relation,
.via,
.landed-detail,
.intro,
.role-note,
.empty,
.loading {
  font-size: 13px;
  line-height: 1.3;
}

.relation {
  margin-top: 0.1rem;
}

.via,
.role-note {
  margin: 0.05rem 0 0;
}

.role-note {
  color: var(--ink);
}

.copy {
  flex: 0 0 auto;
  min-height: 0;
  padding: 0.1rem 0.45rem;
  color: var(--forest);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.04em;
  line-height: 1.3;
  text-transform: uppercase;
}

.copy:hover {
  border-color: var(--forest);
}

.intro {
  margin: 0.3rem 0 0;
}

.landed {
  margin-top: 0.5rem;
  padding-top: 0.4rem;
  border-top: 1px solid var(--line);
}

.landed-address {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.notes {
  margin: 0.4rem 0 0;
  padding: 0;
  list-style: none;
}

.note {
  margin-top: 0.25rem;
  padding-left: 0.55rem;
  border-left: 3px solid var(--seal);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.3;
}

.evidence {
  margin-top: 0.45rem;
}

.evidence summary {
  font-weight: 600;
}

.evidence pre {
  margin: 0.35rem 0 0;
  padding: 0.45rem 0.5rem;
  overflow-x: auto;
  background: var(--paper-2);
  border-radius: 6px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.4;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.diagnostics {
  margin: 0.8rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.pin-hint,
.footer-note {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.home h1 {
  font-size: 2.1rem;
}

.lead {
  margin-top: 0.8rem;
}

.home-link {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.55rem 0.8rem;
  color: #f6f2eb;
  background: var(--forest);
  border-radius: 6px;
  text-decoration: none;
}

.home .fine {
  margin-top: 1rem;
}

code {
  font-family: var(--mono);
  font-size: 0.86em;
}

@media (max-width: 420px) {
  .home h1 {
    font-size: 1.45rem;
  }

  #app,
  .home,
  .preview {
    padding-left: 0.95rem;
    padding-right: 0.95rem;
  }
}
