/* Concept 12 "Midnight" — ported from reference/design-12-midnight.dc.html */
:root {
  --bg: #0D1726;
  --bg-hover: #132036;
  --text: #C8D3E0;
  --bright: #F2F6FA;
  --green: #7FD6B8;
  --accent: #FF8F66;
  --accent-hover: #FFB396;
  --muted: #8796A9;
  --dim: #7A8CA3;
  --ts: #7A8CA3;
  --rule: #2A3A50;
}

html, body { margin: 0; background: var(--bg); }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }

.log-page {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  padding: 64px 16px 96px;
  box-sizing: border-box;
}
.wrap { max-width: 1000px; margin: 0 auto; display: flex; flex-direction: column; gap: 40px; }

/* Header */
.header { display: flex; flex-direction: column; gap: 12px; }
.name {
  margin: 0;
  font-family: 'VT323', monospace;
  font-size: 64px;
  line-height: 1;
  font-weight: 400;
  letter-spacing: 1px;
  color: var(--bright);
}
.summary { margin: 0; font-size: 16px; line-height: 1.6; color: var(--text); max-width: 680px; }
.highlights {
  margin: 4px 0 0; padding: 0; list-style: none;
  display: flex; flex-direction: column; gap: 4px;
  font-size: 15px; line-height: 1.6; color: var(--text);
}
.highlights .arrow { color: var(--accent); }
.contact-nav { display: flex; flex-wrap: wrap; gap: 4px 24px; font-size: 15px; }
.contact-nav a { display: inline-block; padding: 10px 0; min-height: 44px; box-sizing: border-box; }

/* Toolbar */
.main { display: flex; flex-direction: column; }
.toolbar {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 0 16px; font-size: 13px;
}
.toolbar .hint { color: var(--muted); }
.toolbar .controls { margin-left: auto; }
.ctl {
  font: inherit; color: var(--accent); background: none; border: 0; cursor: pointer;
  padding: 10px 0; min-height: 44px; box-sizing: border-box;
}
.ctl:hover { color: var(--accent-hover); }
.ctl:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }
.pend { display: none !important; }
.toolbar a { display: inline-block; padding: 10px 0; min-height: 44px; box-sizing: border-box; }

/* Log */
.log-root { font-size: 14px; line-height: 1.75; display: flex; flex-direction: column; }
.row { display: flex; align-items: flex-end; gap: 16px; min-height: 1.75em; }
.log-ts { flex: 0 0 auto; color: var(--ts); }
.txt { flex: 0 1 auto; min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.txt.wrap-normal { white-space: normal; }
.leader { flex: 1 1 24px; min-width: 16px; border-bottom: 1px dotted var(--rule); margin-bottom: 7px; }
.status { flex: 0 0 auto; white-space: nowrap; }
.ind1 { padding-left: 2.5em; }
.ind2 { padding-left: 5em; }

.t-bright { color: var(--bright); }
.t-text { color: var(--text); }
.t-muted { color: var(--muted); }
.t-dim { color: var(--dim); }
.t-green { color: var(--green); }
.t-accent { color: var(--accent); }

/* Model lines */
.log-model {
  width: 100%; min-height: 44px; align-items: center; color: inherit;
  font: inherit; line-height: inherit; text-align: left;
  background: none; border: 0; padding: 0; margin: 0; cursor: pointer; box-sizing: border-box;
}
.log-model:hover { background: var(--bg-hover); }
.log-model:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }
.panel:not(.open) { display: none; }
.panel-body { white-space: normal; padding: 8px 12px; margin: 4px 0 8px; border-left: 1px solid var(--rule); background: var(--bg-hover); }
.panel-body > div { white-space: pre-wrap; margin-bottom: 4px; }
.panel-body > .wrap-normal { white-space: normal; }
.log-model .leader { margin-bottom: 0; }
.mprefix { flex: 0 0 auto; white-space: pre; color: var(--bright); }
.mprefix .caret { color: var(--dim); }
.mname { flex: 0 1 auto; min-width: 0; color: var(--bright); }
/* Names break only at "_" and "." (app.js inserts <wbr> there) */
.mname, .tname { overflow-wrap: normal; word-break: normal; }

/* Test lines: the gloss is the brighter text, the test name the dimmer */
.tname { color: var(--muted); }
.gloss { color: var(--text); white-space: normal; }

/* Skills table */
.table-wrap { overflow-x: auto; max-width: 100%; padding: 4px 0; }
.table-wrap:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }
.table-line { white-space: pre; }

.link-row a { display: inline-block; padding: 10px 0; min-height: 44px; box-sizing: border-box; }

@keyframes logblink { 50% { opacity: .35; } }
.log-blink { animation: logblink 1.2s steps(1) infinite; }
@keyframes logrun { 0% { opacity: 1; } 50% { opacity: .4; } 100% { opacity: 1; } }
.log-run { animation: logrun .6s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
  .log-blink, .log-run { animation: none; }
}

.m-only { display: none; }

@media (max-width: 699px) {
  .log-ts { display: none !important; }
  .d-only { display: none !important; }
  .m-only { display: inline !important; }
  .log-root { font-size: 13px; }
  .ind1 { padding-left: 1.25em; }
  .ind2 { padding-left: 2.5em; }
  .mrow { flex-wrap: wrap; padding: 6px 0; gap: 0 8px; }
  .mrow .leader { flex-basis: 8px; min-width: 8px; }
  .mname { order: 5; flex-basis: 100%; padding-left: 1.15em; }
  .m-hide { display: none !important; }
  .gloss { display: block; }
}

@media print {
  @page { margin: 15mm; }
  html, body { background: #fff !important; }
  .log-page { background: #fff !important; color: #000 !important; padding: 0 !important; min-height: 0; }
  .log-page *, .log-page *::before, .log-page *::after {
    color: #000 !important; background: transparent !important;
    opacity: 1 !important; visibility: visible !important;
    animation: none !important; transition: none !important;
  }
  .no-print, .log-ts, .caret { display: none !important; }
  .log-root .pend { display: flex !important; }
  .panel:not(.open) { display: flex !important; }
  .log-root { min-height: 0 !important; }
  .wrap { gap: 20px; max-width: none; }
  .log-root { font-size: 11px; line-height: 1.5; }
  .row, .log-model { min-height: 0; break-inside: avoid; }
  .leader { border-bottom-color: #999 !important; }
  .table-wrap { overflow: visible !important; }
  a { text-decoration: underline; }
  .contact-nav a[href^="http"]::after { content: " (" attr(href) ")"; }
}

/* early roles: model line only until tapped */
#log .folded:not(.show) { display: none !important; }
@media print { #log .folded:not(.show) { display: flex !important; } }
