/* TitleTube: a serious item registry. White, black type, thin rules, one accent.
   The item is the first thing you see, the title number the second, the
   ownership status the third. */

:root {
  --bg: #ffffff;
  --ink: #111113;
  --muted: #66666d;
  --faint: #9a9aa1;
  --line: #e5e5e2;
  --soft: #f7f7f5;
  --accent: #0b5c54;
  --accent-soft: #e8f2f0;
  --ok: #0b5c54;
  --warn: #8a5a00;
  --warn-soft: #fbf3e2;
  --bad: #b42318;
  --bad-soft: #fdecea;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 6px;
  --gutter: 16px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 var(--sans);
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* ---- header / footer ---------------------------------------------------- */
.top { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 10; }
.top__in, .foot__in, .page { max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }
.top__in { display: flex; align-items: center; gap: 20px; height: 60px; }
.mark { font-weight: 700; letter-spacing: 0.22em; text-decoration: none; font-size: 15px; }
.mark span { color: var(--accent); }
.nav { display: flex; gap: 18px; margin-left: auto; }
.nav a { text-decoration: none; color: var(--muted); font-size: 14px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.auth { border: 1px solid var(--line); background: var(--bg); border-radius: 999px; padding: 6px 14px; cursor: pointer; font-size: 13px; display: inline-flex; align-items: center; gap: 8px; }
.auth img { width: 22px; height: 22px; border-radius: 50%; }
.foot { border-top: 1px solid var(--line); margin-top: 72px; }
.foot__in { padding-top: 24px; padding-bottom: 40px; display: grid; gap: 10px; }
.foot__legal { color: var(--muted); font-size: 12.5px; max-width: 70ch; margin: 0; }
.foot__links { display: flex; flex-wrap: wrap; gap: 16px; margin: 0; font-size: 13px; }
.foot__links a { color: var(--muted); text-decoration: none; }

/* ---- type ---------------------------------------------------------------- */
.page { padding-top: 32px; min-height: 60vh; }
h1, h2, h3 { line-height: 1.2; margin: 0; }
h2 { font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 16px; }
.num { font-family: var(--mono); font-weight: 600; letter-spacing: 0.02em; }
.muted { color: var(--muted); }
.eyebrow { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.section { margin-top: 56px; }
.legal { color: var(--muted); font-size: 12.5px; margin-top: 32px; border-top: 1px solid var(--line); padding-top: 16px; }

/* ---- buttons, inputs ------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 18px; border-radius: var(--radius);
  background: var(--ink); color: #fff; border: 1px solid var(--ink);
  font-weight: 600; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; cursor: pointer;
}
.btn:hover { background: #2a2a2e; }
.btn--ghost { background: var(--bg); color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { background: var(--soft); }
.btn--small { min-height: 34px; padding: 0 12px; font-size: 11.5px; }
.btn--danger { background: var(--bad); border-color: var(--bad); }
.btn[disabled] { opacity: 0.45; cursor: default; }
.field { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; min-height: 42px; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; background: var(--bg); color: var(--ink);
}
.input:focus, .select:focus, .textarea:focus, .btn:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.check input { margin-top: 4px; }

/* ---- status chips -------------------------------------------------------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; border: 1px solid currentColor;
}
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip--ok { color: var(--ok); background: var(--accent-soft); border-color: transparent; }
.chip--muted { color: var(--muted); background: var(--soft); border-color: transparent; }
.chip--warn { color: var(--warn); background: var(--warn-soft); border-color: transparent; }
.chip--bad { color: var(--bad); background: var(--bad-soft); border-color: transparent; }

/* ---- hero ---------------------------------------------------------------- */
.hero { text-align: center; padding: 40px 0 8px; }
.hero__mark { font-size: clamp(34px, 7vw, 64px); font-weight: 700; letter-spacing: 0.24em; margin: 0 0 18px; padding-left: 0.24em; }
.hero__mark span { color: var(--accent); }
.hero__lede { font-size: clamp(22px, 3.4vw, 30px); font-weight: 600; margin: 0 0 10px; }
.hero__sub { color: var(--muted); max-width: 60ch; margin: 0 auto 28px; }
.search { display: flex; gap: 8px; max-width: 640px; margin: 0 auto; }
.search .input { min-height: 50px; font-size: 16px; }
.search .btn { min-height: 50px; }
.hero__actions { display: flex; gap: 10px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }

/* ---- how it works -------------------------------------------------------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.steps li { background: var(--bg); padding: 20px 18px; }
.steps b { display: block; font-family: var(--mono); color: var(--accent); margin-bottom: 8px; }

/* ---- title cards --------------------------------------------------------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; }
.card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; background: var(--bg); text-decoration: none; }
a.card:hover { border-color: #cfcfcb; }
.card__img { aspect-ratio: 1 / 1; background: var(--soft); display: grid; place-items: center; overflow: hidden; }
.card__img img { width: 100%; height: 100%; object-fit: contain; }
.card__img .ph { color: var(--faint); font-size: 12px; letter-spacing: 0.14em; }
.card__body { padding: 12px 14px 14px; display: grid; gap: 4px; }
.card__brand { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.card__name { font-weight: 600; line-height: 1.3; }
.card__meta { font-size: 12.5px; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; }
.card__num { font-family: var(--mono); font-size: 13px; font-weight: 600; }
.card__actions { display: flex; gap: 6px; padding: 0 14px 14px; flex-wrap: wrap; }

/* ---- ecosystem ----------------------------------------------------------- */
.eco { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.eco a { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; text-decoration: none; display: grid; gap: 6px; }
.eco a:hover { background: var(--soft); }
.eco b { font-size: 14px; }
.eco span { color: var(--muted); font-size: 13px; }

/* ---- title page ---------------------------------------------------------- */
.tbar { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.tbar__num { font-family: var(--mono); font-size: clamp(22px, 4vw, 34px); font-weight: 600; letter-spacing: 0.02em; }
.tbar__date { color: var(--muted); font-size: 13px; }
.tbar .btn { margin-left: auto; }
.tgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 36px; margin-top: 28px; }
.tmedia { margin: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--soft); aspect-ratio: 1 / 1; display: grid; place-items: center; overflow: hidden; }
.tmedia img { width: 100%; height: 100%; object-fit: contain; }
.tname { font-size: clamp(24px, 3.4vw, 32px); font-weight: 700; margin: 4px 0 6px; }
.block { border-top: 1px solid var(--line); padding: 18px 0; }
.block:first-child { border-top: 0; padding-top: 0; }
.dl { display: grid; grid-template-columns: 170px 1fr; gap: 8px 16px; margin: 0; font-size: 14px; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; overflow-wrap: anywhere; }
.owner { display: flex; align-items: center; gap: 12px; }
.owner img, .owner .av { width: 44px; height: 44px; border-radius: 50%; background: var(--soft); object-fit: cover; display: grid; place-items: center; color: var(--faint); font-weight: 700; }
.owner a { font-weight: 600; text-decoration: none; }
.timeline { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.timeline li { position: relative; padding: 0 0 18px 22px; }
.timeline li::before { content: ""; position: absolute; left: -4px; top: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--ink); }
.timeline time { display: block; font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.panel { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: grid; gap: 16px; }
.panel h3 { font-size: 15px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.form { display: grid; gap: 12px; max-width: 520px; }
.note { font-size: 13px; color: var(--muted); }
.notice { border: 1px solid var(--line); background: var(--soft); border-radius: var(--radius); padding: 14px 16px; font-size: 14px; }
.notice--ok { background: var(--accent-soft); border-color: transparent; }
.notice--bad { background: var(--bad-soft); border-color: transparent; color: var(--bad); }
.notice--warn { background: var(--warn-soft); border-color: transparent; }

/* ---- my titles / admin --------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 20px 0 28px; }
.stats div { background: var(--bg); padding: 16px; }
.stats b { display: block; font-size: 26px; font-weight: 700; font-family: var(--mono); }
.stats span { font-size: 12px; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tabs button { border: 0; background: none; padding: 10px 14px; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button[aria-selected="true"] { color: var(--ink); border-color: var(--ink); font-weight: 600; }
.filters { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin-bottom: 20px; }
.filters .select, .filters .input { min-height: 38px; font-size: 13px; padding: 6px 10px; }
.more { display: flex; justify-content: center; margin-top: 24px; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th, .table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { color: var(--muted); font-weight: 500; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; }
.table tr[data-open] { cursor: pointer; }
.table tr[data-open]:hover td { background: var(--soft); }
.scroll { overflow-x: auto; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.code { font-family: var(--mono); font-size: 12px; background: var(--soft); border-radius: var(--radius); padding: 10px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 260px; overflow: auto; }

/* ---- certificate --------------------------------------------------------- */
.cert { border: 1px solid var(--line); border-radius: var(--radius); width: 100%; height: min(1100px, 130vw); background: var(--soft); }

/* ---- small screens ------------------------------------------------------- */
@media (max-width: 900px) {
  .steps, .eco { grid-template-columns: 1fr 1fr; }
  .filters { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .tgrid, .cols { grid-template-columns: 1fr; gap: 24px; }
  .dl { grid-template-columns: 1fr; gap: 2px 0; }
  .dl dd { margin-bottom: 8px; }
  .search { flex-direction: column; }
  .nav { gap: 12px; }
  .top__in { gap: 12px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .tbar .btn { margin-left: 0; }
}
@media (max-width: 420px) {
  .steps, .eco { grid-template-columns: 1fr; }
  .mark { letter-spacing: 0.14em; font-size: 14px; }
  .nav a { font-size: 13px; }
}
@media print {
  .top, .foot, .no-print { display: none !important; }
}
