: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; }
.share-panel .actions { align-items: end; }
.share-panel .actions label { margin: 0; }
.share-panel select { display: block; margin-top: 6px; padding: 9px 12px; border: 1px solid var(--rule); border-radius: 5px; background: white; color: var(--ink); font: inherit; }
.review-link-list { list-style: none; padding: 0; margin: 16px 0 0; }
.review-link-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--rule); font-size: 13px; }
.stored-review-link { flex: 1; min-width: 0; }
.stored-review-link input { max-width: 650px; font-size: 12px; }
.review-link-list .actions { flex-shrink: 0; }
.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; }
.session-card { max-width: 560px; min-height: auto; padding: 40px; background: white; border: 1px solid #dce1e5; border-radius: 10px; }
.session-card .brand { margin-bottom: 36px; }
.session-card .session-label { margin: 0 0 12px; color: var(--blue); font: 11px var(--mono); letter-spacing: .1em; }
.session-card > p:not(.session-label) { color: var(--muted); font-size: 15px; }
.session-card .button { margin-top: 14px; }
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; }
  .session-card { padding: 28px; }
}
@media (prefers-reduced-motion: reduce) { .prototype-row { transition: none; } }

/* Fieldwork: typography and precise, flat structure. */
:root { --ink:#202b30; --blue:#214eff; --blue-dark:#173bc9; --muted:#606b73; --paper:#ffffff; --rule:#e0e4e7; background:#f8f9fa; color:var(--ink); }
body { background:#f8f9fa; }
.app-header { min-height:76px; padding:18px 36px; background:white; border-bottom:1px solid #dce1e5; }
.brand { font-size:25px; font-weight:780; letter-spacing:-1.2px; gap:12px; }
.brand-mark { width:23px; height:23px; border:0; transform:none; background:var(--blue); clip-path:polygon(0 0,100% 0,100% 28%,32% 28%,32% 43%,85% 43%,85% 71%,32% 71%,32% 100%,0 100%); }
.brand-mark::before,.brand-mark::after { display:none; }
#breadcrumb { font:12px/1.4 system-ui,sans-serif; text-transform:none; letter-spacing:0; }
.environment { padding:4px 7px; border:1px solid #dce1e5; border-radius:3px; font-size:10px; }
main { max-width:1140px; min-height:calc(100vh - 76px); margin:0 auto; padding:44px 36px 70px; border:0; background:transparent; box-shadow:none; }
main::before,main::after { display:none; }
h1 { font:650 36px/1.15 system-ui,sans-serif; letter-spacing:-1.5px; }
.page-top { margin-bottom:32px; align-items:center; }
.page-top p { margin-top:8px; }
button,.button { border-radius:5px; padding:10px 16px; box-shadow:none; }
.quiet { border-color:transparent; background:transparent; }
.quiet:hover { background:#e9edf5; }
.secondary { border-color:#ccd4de; background:white; }
.secondary:hover { border-color:var(--blue); }
.danger { color:#a42121; border-color:#a42121; background:white; }
.danger:hover:not(:disabled) { background:#fff0f0; }
#confirm-delete { background:#a42121; color:white; }
#confirm-delete:hover:not(:disabled) { background:#871919; }
#delete-form .actions { margin-top:20px; justify-content:flex-end; }
.prototype-list { border-top:2px solid var(--ink); }
.prototype-row { grid-template-columns:34px minmax(0,1fr) auto; gap:16px; min-height:90px; padding:18px 12px 18px 0; border-bottom:1px solid #d9dfe4; }
.prototype-row:hover,.prototype-row:focus-visible { background:#eef2ff; }
.prototype-row h2 { font:600 19px/1.3 system-ui,sans-serif; letter-spacing:-.45px; margin-bottom:5px; }
.prototype-row .muted { font:12px/1.4 var(--mono); }
.row-number { color:var(--blue); font:11px/1.5 var(--mono); padding-top:3px; }
.version-meta { flex-direction:row; align-items:center; gap:24px; font-size:11px; }
.version-meta code { color:#54616d; border:0; padding:0; transform:none; }
.empty { min-height:140px; border-top:2px solid var(--ink); background:none; }
.share-panel { border-color:#d9dfe4; }
.feedback-panel>h2 { font:600 21px/1.3 system-ui,sans-serif; letter-spacing:-.5px; }
input,textarea { border:1px solid #c8d0d8; border-radius:5px; background:white; }
textarea { line-height:1.6; min-height:120px; }
.comment.reply { border-left-color:#b9c8ff; }
dialog { border:1px solid #d6dce3; border-radius:10px; background:white; box-shadow:0 16px 64px #192b3926; }
.dialog-top { background:none; }
.dialog-top h2 { font:600 24px/1.2 system-ui,sans-serif; letter-spacing:-.7px; }
:focus-visible { outline-color:#214eff; }
@media(max-width:600px) {
 .app-header { padding:16px 20px; gap:12px; }
 .brand { font-size:23px; }
 main { padding:28px 20px 50px; margin:0; }
 h1 { font-size:30px; }
 .page-top { align-items:center; gap:18px; margin-bottom:24px; }
 #new-version { font-size:12px; padding:10px 12px; }
 .prototype-row { grid-template-columns:22px minmax(0,1fr); gap:8px; padding:18px 0; }
 .prototype-row h2 { font-size:18px; }
 .version-meta { grid-column:2; justify-content:space-between; gap:12px; font-size:10px; }
 .auth-card { margin:7vh 14px; }
}

/* Short responses to actions; controls keep their position and size. */
button,.button { transition:background-color 120ms ease,border-color 120ms ease,filter 120ms ease,transform 100ms ease; }
button:active:not(:disabled),.button:active,[data-pressed] { transform:translateY(1px); filter:brightness(.9); }
.comment { transition:opacity 160ms ease; }
#comment-form>button { min-width:132px; }
#share { min-width:147px; }
@media(prefers-reduced-motion:reduce) {
 button,.button,.comment { transition:none; }
 button:active:not(:disabled),.button:active,[data-pressed] { transform:none; }
}

/* One composer moves below the comment being answered. */
#comment-form.inline-reply { margin:16px 0 0; padding-top:16px; border-top:1px solid #d9dfe4; }
#cancel-reply { margin-left:8px; }
.comment.resolved:has(#comment-form) { opacity:1; }

/* The review page is an inbox of discussions; new comments start in the prototype. */
.feedback-panel .page-top { margin:0 0 12px; }
.feedback-panel select { font:inherit; padding:8px 12px; border:1px solid var(--rule); border-radius:5px; background:white; color:var(--ink); }
.discussion { margin-top:24px; padding:20px; border:1px solid var(--rule); border-radius:8px; background:white; }
.discussion .comment { border-top:0; margin:0; padding:16px 0; }
.discussion .comment.reply { margin-left:16px; padding-left:16px; }

/* Administration shares the platform's typography and spacing. */
.people-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 24px; margin: 32px 0 48px; }
.person-card { padding: 24px; border: 1px solid #d6dce3; border-radius: 8px; }
.person-card h2 { margin-top: 0; }
.person-identity { overflow-wrap: anywhere; font-size: 13px; }
.access-options { display: grid; gap: 12px; margin: 20px 0; }
.access-options label { display: flex; align-items: center; gap: 10px; margin: 0; }
.access-options input { width: auto; margin: 0; }
.audit-list { padding-left: 24px; }
.audit-list li { padding: 16px 0; border-bottom: 1px solid #d6dce3; }
.audit-list li p { margin: 8px 0; }
.audit-list time, .audit-list details { font-size: 13px; }
.identity { flex-wrap: wrap; }
