:root {
  font: 14px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #293b3d;
  background: #f2f0e8;
  --ink: #293b3d;
  --blue: #245d7d;
  --blue-dark: #174760;
  --rule: #d6dfdd;
  --muted: #61747a;
  --paper: #fffdf7;
  --mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
button, .button {
  font: inherit;
  border: 1px solid var(--blue);
  border-radius: 4px;
  background: var(--blue);
  color: white;
  padding: 9px 15px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  text-decoration: none;
}
button:hover, .button:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
button:disabled { opacity: .55; cursor: wait; }
.quiet { background: transparent; color: var(--blue); border-color: transparent; padding: 8px; font-size: 13px; }
.quiet:hover { color: var(--blue-dark); background: #e7efef; border-color: transparent; }
.secondary { background: transparent; color: var(--blue); }
.secondary:hover { color: white; }
.app-header {
  min-height: 68px;
  border-bottom: 2px solid var(--blue);
  padding: 13px 32px;
  display: flex;
  align-items: center;
  gap: 24px;
  background: var(--paper);
}
.brand { font-size: 19px; font-weight: 720; letter-spacing: -.5px; text-decoration: none; display: inline-flex; align-items: center; gap: 11px; white-space: nowrap; }
.brand-mark { width: 23px; height: 23px; display: inline-block; position: relative; flex: none; border: 1.5px solid var(--blue); transform: rotate(-7deg); }
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; background: var(--blue); }
.brand-mark::before { width: 1px; top: -5px; bottom: -5px; left: 10px; }
.brand-mark::after { height: 1px; left: -5px; right: -5px; top: 10px; }
#breadcrumb { font: 11px var(--mono); color: var(--muted); overflow-wrap: anywhere; text-transform: uppercase; letter-spacing: .4px; }
.environment { font: 11px var(--mono); color: var(--muted); }
.identity { margin-left: auto; display: flex; gap: 12px; align-items: center; font-size: 13px; }
main {
  position: relative;
  padding: 40px 48px 80px;
  max-width: 1120px;
  min-height: calc(100vh - 68px);
  margin: auto;
  background: var(--paper);
  border-inline: 1px solid #e3e5dc;
}
main::before { content: ""; position: absolute; top: 0; bottom: 0; left: 24px; border-left: 2px solid #aac3cf; pointer-events: none; }
.page-top { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 24px; }
h1 { font-weight: 650; font-size: 27px; letter-spacing: -.7px; margin: 0 0 12px; overflow-wrap: anywhere; }
.page-top h1 { margin: 0; }
h2 { font-size: 17px; font-weight: 650; margin: 0 0 16px; }
.muted { color: var(--muted); font-size: 13px; }
.page-top p { margin: 6px 0 0; }
.hint { color: var(--muted); font-size: 12px; }
.prototype-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--blue); }
.prototype-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 78px;
  padding: 12px 10px 12px 0;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  transition: background-color .12s;
}
.prototype-row:hover, .prototype-row:focus-visible { background: #eaf2f1; }
.row-number { align-self: start; padding-top: 5px; font: 11px var(--mono); color: var(--blue); }
.prototype-info { min-width: 0; }
.prototype-row h2 { font-size: 15px; margin: 0 0 2px; overflow-wrap: anywhere; }
.prototype-row .muted { overflow-wrap: anywhere; }
.version-meta { display: flex; align-items: center; gap: 26px; flex-shrink: 0; font: 11px var(--mono); color: var(--muted); }
.version-meta code { color: var(--blue); }
.empty {
  padding: 24px 0;
  color: var(--muted);
  border-top: 1px solid var(--blue);
  background: repeating-linear-gradient(to bottom, transparent 0 31px, #ecf0eb 32px 33px);
}
.share-panel { border-block: 1px solid var(--blue); padding: 16px 0; margin-bottom: 28px; }
.share-panel p { margin: 8px 0 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.share-output { max-width: 650px; font-size: 12px; }
.feedback-panel { max-width: 800px; }
.feedback-panel > h2 { border-bottom: 1px solid var(--rule); padding-bottom: 11px; }
label { display: block; font-size: 13px; font-weight: 600; margin: 16px 0 8px; }
input, textarea { display: block; width: 100%; padding: 10px; border: 1px solid #bfcdc9; border-radius: 3px; font: inherit; background: var(--paper); color: var(--ink); margin-top: 6px; }
textarea { resize: vertical; min-height: 100px; background: repeating-linear-gradient(to bottom, var(--paper) 0 28px, #edf1eb 29px 30px); line-height: 30px; }
#comment-form { margin-bottom: 24px; }
#comment-form label:first-child { max-width: 320px; }
.comment { border-bottom: 1px solid var(--rule); padding: 16px 0; }
.comment p { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; margin: 8px 0; }
.comment-meta { font: 11px var(--mono); color: var(--muted); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.comment.resolved { opacity: .65; }
.comment.reply { margin-left: 20px; border-left: 2px solid #aac3cf; padding-left: 14px; }
.comment details code { display: block; overflow-wrap: anywhere; white-space: normal; margin: 8px 0; }
dialog { border: 1px solid var(--blue); border-radius: 4px; padding: 24px; max-width: 480px; width: calc(100% - 32px); background: var(--paper); box-shadow: 0 18px 50px #243a4033; }
dialog::backdrop { background: #1b354455; }
.dialog-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--rule); padding-bottom: 12px; }
.dialog-top h2 { margin: 0; }
#publish-submit { width: 100%; margin-top: 12px; }
#notice { position: fixed; bottom: 20px; right: 20px; max-width: min(420px, calc(100vw - 40px)); background: var(--blue-dark); color: white; border-radius: 4px; padding: 12px 18px; font-size: 13px; z-index: 10; }
.auth-card { max-width: 560px; margin: 10vh auto; }
.auth-card .brand { display: block; margin-bottom: 24px; }
code { font-family: var(--mono); font-size: .9em; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #bb8a49; outline-offset: 3px; }
@media (max-width: 600px) {
  .app-header { padding: 12px 16px; gap: 12px; flex-wrap: wrap; }
  #breadcrumb { display: none; }
  .environment { font-size: 10px; }
  .identity { gap: 6px; }
  main { min-height: calc(100vh - 68px); padding: 27px 18px 60px 32px; }
  main::before { left: 15px; }
  h1 { font-size: 23px; }
  .page-top { align-items: flex-start; flex-wrap: wrap; gap: 14px; }
  .prototype-row { grid-template-columns: 26px minmax(0, 1fr) auto; gap: 8px; }
  .version-meta { flex-direction: column; align-items: flex-end; gap: 4px; font-size: 10px; }
  .auth-card { margin: 8vh auto; }
}
@media (prefers-reduced-motion: reduce) { .prototype-row { transition: none; } }
