:root {
  color-scheme: light;
  --ink: #1e293b;
  --muted: #64748b;
  --paper: #ffffff;
  --canvas: #f4f7f6;
  --line: #d7e0dd;
  --accent: #176b5b;
  --accent-dark: #0f5145;
  --error: #9f2d2d;
  --success: #176b46;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}
a { color: var(--accent-dark); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid #f2b84b;
  outline-offset: 3px;
}
.site-header {
  min-height: 68px;
  padding: 0 5vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #143b36;
  color: white;
}
.brand { color: white; font-weight: 750; text-decoration: none; font-size: 1.1rem; }
.container { width: min(900px, 90vw); margin: 42px auto; }
h1, h2 { line-height: 1.15; }
h1 { margin: 4px 0 10px; font-size: clamp(2rem, 5vw, 3rem); }
h2 { margin-top: 0; }
.eyebrow { color: var(--accent); font-weight: 750; text-transform: uppercase; letter-spacing: .09em; font-size: .77rem; }
.muted, small { color: var(--muted); }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: clamp(20px, 5vw, 36px); margin-bottom: 22px; box-shadow: 0 10px 30px rgba(30, 41, 59, .05); }
.narrow { max-width: 520px; margin: 7vh auto; }
.stack { display: grid; gap: 10px; }
label { font-weight: 700; margin-top: 8px; }
input, textarea {
  width: 100%; border: 1px solid #9eaaa7; border-radius: 8px; background: white;
  color: var(--ink); padding: 12px 13px; font: inherit;
}
textarea { resize: vertical; min-height: 220px; }
button, .button {
  display: inline-block; border: 0; border-radius: 8px; background: var(--accent); color: white;
  padding: 11px 17px; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
}
button:hover, .button:hover { background: var(--accent-dark); }
button:disabled { opacity: .65; cursor: wait; }
.button.secondary { background: white; color: var(--accent-dark); border: 1px solid var(--accent); }
.link-button { background: transparent; padding: 8px; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.actions { display: flex; align-items: center; gap: 18px; margin-top: 16px; }
.note-list { padding: 0; list-style: none; display: grid; gap: 12px; }
.note-list a { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 15px; padding: 20px; background: white; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; }
.note-list strong { flex-basis: 100%; color: var(--ink); font-size: 1.12rem; }
.note-list span { color: var(--muted); font-size: .9rem; }
.note-list .badge { color: var(--success); font-weight: 700; }
.plain-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.summary { border-left: 4px solid var(--accent); padding-left: 18px; }
.messages { margin-bottom: 20px; }
.message { border-radius: 8px; padding: 12px 15px; background: white; border-left: 4px solid var(--accent); }
.message.error { border-color: var(--error); color: var(--error); }
.message.success { border-color: var(--success); color: var(--success); }
.waiting { display: inline-block; margin-left: 12px; color: var(--muted); }
@media (max-width: 520px) {
  .container { width: min(100% - 28px, 900px); margin: 25px auto; }
  .site-header { padding: 0 16px; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .page-heading .button { width: 100%; text-align: center; }
  .panel { padding: 20px; }
  .actions { align-items: stretch; flex-direction: column; }
  .actions button { width: 100%; }
  .waiting { display: block; margin: 10px 0 0; }
}

/* Keep the waiting indicator hidden until an actual submission starts. */
[hidden] { display: none !important; }
