/* Steelmemo — plan 5.5: white, near-black text, one plain dark-blue accent, the system typeface,
   16 px / 1.6, content at most 720 px, dark mode from the system setting. Nothing else. */
:root {
  --bg: #ffffff; --fg: #16181d; --muted: #5b616e; --line: #e3e5e8; --soft: #f6f7f8;
  --accent: #1f3a8a; --accent-fg: #ffffff; --link: #1f3a8a; --bad: #a12020;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #121417; --fg: #e8eaed; --muted: #9aa0aa; --line: #2c3036; --soft: #1a1d21; --accent: #3554b8; --accent-fg: #ffffff; --link: #9db4ff; --bad: #ff8a80; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
a { color: var(--link); }
main { max-width: 720px; margin: 0 auto; padding: 8px 16px 72px; }
h1 { font-size: 1.6rem; line-height: 1.3; margin: 24px 0 12px; font-weight: 650; }
h2 { font-size: 1.1rem; line-height: 1.4; margin: 28px 0 8px; font-weight: 650; }
h3 { font-size: 1rem; margin: 20px 0 6px; }
p { margin: 0 0 12px; }

.top { max-width: 720px; margin: 0 auto; padding: 16px; display: flex; align-items: center; gap: 20px; border-bottom: 1px solid var(--line); }
.top .name { font-weight: 650; color: var(--fg); text-decoration: none; margin-right: auto; }
.top a:not(.name) { text-decoration: none; }

.muted { color: var(--muted); }
.error { color: var(--bad); }
.notice { color: var(--fg); background: var(--soft); border-radius: 6px; padding: 10px 12px; }
.stack > * + * { margin-top: 8px; }
label { display: block; font-weight: 550; }
input, textarea { width: 100%; font: inherit; color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; }
textarea { resize: vertical; min-height: 120px; }
input:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

button.primary, a.button.primary {
  display: inline-block; margin-top: 16px; background: var(--accent); color: var(--accent-fg); border: 0; border-radius: 6px;
  padding: 12px 20px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
}
button.primary[disabled] { opacity: .6; cursor: default; }
button.link { background: none; border: 0; padding: 0; font: inherit; color: var(--link); text-decoration: underline; cursor: pointer; }
button.primary + button.link { margin-left: 14px; }

.drop { border: 1px dashed var(--line); border-radius: 6px; padding: 22px 16px; text-align: center; color: var(--muted); }
.drop.over { border-color: var(--accent); background: var(--soft); }
.filerow { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.filerow .size { color: var(--muted); white-space: nowrap; }

.two-lines { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.steps .done::before { content: "\2713\00a0"; }
table.labs { border-collapse: collapse; width: 100%; margin: 12px 0 20px; }
table.labs th, table.labs td { text-align: left; padding: 8px 0; border-bottom: 1px solid var(--line); font-weight: normal; vertical-align: top; }
table.labs th { width: 45%; padding-right: 12px; }
.bar { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; margin: 8px 0; }
.bar > div { height: 100%; width: 0; background: var(--accent); transition: width .5s ease; }

.memo h1 { margin-top: 28px; }
.memo .meta { color: var(--muted); font-size: .95rem; }
.memo section h2 { margin-top: 28px; }
.memo ol, .memo ul { padding-left: 1.4em; margin: 0 0 12px; }
.memo details { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 12px; }
.memo summary { cursor: pointer; font-weight: 650; }
.memo details p { margin-top: 12px; }
.memo details h3 { margin: 22px 0 8px; font-size: 1rem; }
.memo li + li { margin-top: 10px; }   /* plan steps carry How and Done when: give each room */
.memo .memo-foot { margin-top: 32px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.memo code { font-size: .92em; background: var(--soft); padding: 1px 4px; border-radius: 4px; }
.memo-links { margin-top: 20px; }

ul.history { list-style: none; padding: 0; margin: 16px 0; }
ul.history li { padding: 12px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.search input { margin-top: 4px; }

.admin-facts { margin-top: 40px; padding: 12px 16px; background: var(--soft); border-radius: 6px; }
.admin-facts dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0; }
.admin-facts dd { margin: 0; overflow-wrap: anywhere; }
.scroll { overflow-x: auto; }
table.admin { border-collapse: collapse; font-size: .9rem; min-width: 640px; }
table.admin th, table.admin td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }

#shareurl { width: auto; min-width: 60%; }
.rating { margin-top: 24px; color: var(--muted); }
.share-foot { margin-top: 32px; }
.foot { max-width: 720px; margin: 0 auto; padding: 24px 16px 40px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.foot a { color: var(--muted); }
.fine { margin-top: 20px; font-size: 14px; }
.samples li { margin-bottom: 12px; }
.samples a { text-underline-offset: 4px; }   /* keeps the underscores in __init__.py visible */
.about { border: 1px solid var(--line); border-radius: 6px; padding: 4px 16px; margin: 16px 0 24px; }
.asked { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; max-height: 360px; overflow: auto; }
.demo { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 6px; margin-top: 8px; }

@media print {
  .top, .foot, .memo-links, .admin-facts, #memo-actions, .share-foot { display: none; }
  .memo details { border: 0; }
  body { background: #fff; color: #000; }
}

table.receipts { border-collapse: collapse; width: 100%; }
table.receipts td { padding: 8px 8px 8px 0; border-bottom: 1px solid var(--line); }
.packs p { margin: 8px 0; }
