/* Hypha, plain edition: a live ASCII world on the left, a plain document on the right. */
:root {
  --hy-paper: #f3f0e8;
  --hy-ink: #1c1a16;
  --hy-ink-2: #54504a;
  --hy-ink-3: #8c867b;
  --hy-rule: #cdc6b7;
  --hy-rust: #2a55a5; /* the one accent: ink blue (name kept from the old rust) */
  --hy-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--hy-paper);
  color: var(--hy-ink);
  font: 400 13.5px/1.6 var(--hy-mono);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--hy-rust); }
::selection { background: var(--hy-rust); color: var(--hy-paper); }
p { margin: 0 0 1em; }
b, strong { font-weight: 600; }

.hy-split {
  display: grid;
  grid-template-columns: minmax(0, 46fr) minmax(0, 54fr);
  min-height: 100vh;
}
.hy-world {
  position: sticky; top: 0;
  height: 100vh;
  border-right: 1px solid var(--hy-ink);
  overflow: hidden;
}
.hy-world canvas { display: block; width: 100%; height: 100%; }

.hy-doc {
  min-width: 0;
  padding: 22px 36px 40px;
  max-width: 740px;
}

/* top line */
.hy-top {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--hy-ink);
}
.hy-top .hy-name { font-weight: 600; text-decoration: none; font-size: 15px; }
.hy-top nav { display: flex; gap: 16px; }
.hy-top nav a[aria-current] { text-decoration: none; color: var(--hy-ink-3); }
.hy-sub { margin: 10px 0 0; color: var(--hy-ink-2); }

/* dotted-leader rows */
.hy-dl { margin: 18px 0 0; max-width: 460px; }
.hy-dl div { display: flex; align-items: baseline; gap: 8px; }
.hy-dl dt { flex: 1; display: flex; align-items: baseline; gap: 8px; color: var(--hy-ink-2); }
.hy-dl dt::after { content: ""; flex: 1; min-width: 16px; border-bottom: 1px dotted var(--hy-rule); transform: translateY(-4px); }
.hy-dl dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }

h2 {
  font: 600 13.5px/1.6 var(--hy-mono);
  margin: 44px 0 10px;
}
h2 small { font-weight: 400; color: var(--hy-ink-3); font-size: inherit; margin-left: 8px; }
.hy-intro { margin-top: 26px; }
.hy-muted { color: var(--hy-ink-3); }
.hy-rust { color: var(--hy-rust); }

/* tables */
.hy-tw { overflow-x: auto; }
.hy-t { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.hy-t th { text-align: left; font-weight: 400; color: var(--hy-ink-3); padding: 0 14px 4px 0; border-bottom: 1px solid var(--hy-ink); white-space: nowrap; }
.hy-t td { padding: 5px 14px 5px 0; vertical-align: top; border-bottom: 1px dotted var(--hy-rule); }
.hy-t th:last-child, .hy-t td:last-child { padding-right: 0; }
.hy-t .r { text-align: right; }
.hy-t .nw { white-space: nowrap; }
.hy-t .url { overflow-wrap: anywhere; }
.hy-t td.cut { max-width: 0; width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hy-t td.wide { max-width: 0; width: 100%; }
.hy-t small.u { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hy-t .url a { text-decoration: none; }
.hy-t .url a:hover { text-decoration: underline; }
.hy-t small { color: var(--hy-ink-3); font-size: inherit; }
.hy-t tr.is-new td { animation: hy-flash 1.2s ease-out; }
@keyframes hy-flash { from { background: rgba(42, 85, 165, .1); } to { background: transparent; } }
.st-kept { color: var(--hy-rust); }
.st-dropped { color: var(--hy-ink-3); }

/* log */
.hy-log { list-style: none; margin: 0; padding: 0; }
.hy-log li { display: grid; grid-template-columns: 48px 64px minmax(0, 1fr); gap: 8px; padding: 2px 0; }
.hy-log time { color: var(--hy-ink-3); }
.hy-log .say { color: var(--hy-ink-2); overflow-wrap: anywhere; }
.hy-log .say em { font-style: normal; color: var(--hy-ink); }
.hy-log li.is-new .say { animation: hy-ink 1.6s ease-out; }
@keyframes hy-ink { from { color: var(--hy-rust); } }

/* the bar */
.hy-bar { position: relative; height: 11px; border: 1px solid var(--hy-ink); margin: 6px 0 8px; }
.hy-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--hy-rust); }
.hy-flush { display: flex; justify-content: space-between; gap: 12px; }

/* planting a spore: a plain form */
.hy-plant { display: flex; gap: 8px; align-items: stretch; margin: 4px 0 6px; }
.hy-plant input {
  flex: 1; min-width: 0;
  font: inherit; color: var(--hy-ink);
  background: transparent;
  border: 1px solid var(--hy-ink); border-radius: 0;
  padding: 6px 8px;
}
.hy-plant input:focus { outline: 2px solid var(--hy-rust); outline-offset: -1px; }
.hy-plant button {
  font: inherit; color: var(--hy-ink);
  background: transparent;
  border: 1px solid var(--hy-ink); border-radius: 0;
  padding: 6px 14px; cursor: pointer;
}
.hy-plant button:hover { background: var(--hy-ink); color: var(--hy-paper); }
.hy-plant-msg { margin: 0; color: var(--hy-ink); min-height: 1.6em; }
.hy-plant-msg.is-err { color: var(--hy-rust); }
.hy-wallet { margin: 0; color: var(--hy-ink-2); }
.hy-plant-note { margin: 0 0 1em; color: var(--hy-ink-3); }
.hy-linkbtn { font: inherit; color: inherit; background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.hy-linkbtn:hover { color: var(--hy-rust); }
.hy-plant button:disabled { opacity: .5; cursor: progress; }
.hy-ca { letter-spacing: .02em; }

ol.hy-steps { margin: 0; padding-left: 2.2em; }
ol.hy-steps li { margin-bottom: .6em; padding-left: .2em; }
ul.hy-ul { margin: 0 0 1em; padding-left: 1.6em; }
ul.hy-ul li { margin-bottom: .35em; }

pre.hy-pre { margin: 0; white-space: pre; overflow-x: auto; color: var(--hy-ink-2); }
pre.hy-pre b { color: var(--hy-ink); }

.hy-foot {
  margin-top: 56px; padding-top: 10px;
  border-top: 1px solid var(--hy-ink);
  color: var(--hy-ink-3);
}

@media (max-width: 860px) {
  .hy-split { display: block; }
  .hy-world { position: relative; height: 62vh; min-height: 340px; border-right: 0; border-bottom: 1px solid var(--hy-ink); }
  .hy-doc { padding: 18px 16px 32px; }
  .hy-t .hide-s { display: none; }
  .hy-log li { grid-template-columns: 44px minmax(0, 1fr); }
  .hy-log .who { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hy-t tr.is-new td, .hy-log li.is-new .say { animation: none; }
}
