:root {
  color-scheme: light;
  --navy: #083e72;
  --ink: #142842;
  --muted: #4e6075;
  --surface: #fff;
  --background: #f3f6fa;
  --line: #d6e0eb;
  --accent: #b5853b;
  font: 16px/1.5 system-ui, sans-serif;
  color: var(--ink);
  background: var(--background);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
h1, h2, p { margin: 0; }
a { color: var(--navy); text-underline-offset: .18em; }
h1, h2 { line-height: 1.18; overflow-wrap: anywhere; }
h1 { font-size: clamp(2rem, 6vw, 3rem); font-weight: 650; letter-spacing: -.045em; }
h2 { font-size: 1.3rem; letter-spacing: -.02em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.topbar { background: var(--navy); color: white; }
.topbar-inner {
  max-width: 68rem;
  padding: 1rem clamp(1rem, 4vw, 2.25rem);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.wordmark {
  display: inline-block;
  font: 700 1.3rem/1 Georgia, serif;
  letter-spacing: .065em;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}
.wordmark span {
  display: block;
  margin-top: .45rem;
  font: 600 .56rem/1.1 system-ui, sans-serif;
  letter-spacing: .12em;
}

.workspace {
  max-width: 68rem;
  margin: auto;
  padding: clamp(1.75rem, 6vw, 4rem) clamp(1rem, 4vw, 2.25rem) 4rem;
}
.kicker {
  color: var(--navy);
  font-size: .75rem;
  font-weight: 750;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: .5rem;
}
.back-link {
  display: inline-block;
  margin-bottom: 1.5rem;
  font-size: .9rem;
}
.muted, .field-help { color: var(--muted); }
.intro { margin-top: .6rem; }
.workspace-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: .75rem;
  padding: clamp(1rem, 4vw, 1.65rem);
}
.property-list {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  gap: .8rem;
}
.property {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
}
.property h2 { margin: .55rem 0 .22rem; }
.property p { font-size: .87rem; overflow-wrap: anywhere; }
.badges, .actions { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
.title-badges { margin-top: .75rem; }
.badge {
  background: #e7edf5;
  color: #304866;
  font-size: .75rem;
  font-weight: 700;
  border-radius: 2rem;
  padding: .2rem .65rem;
}
.badge-published { background: #e1f2e8; color: #174e34; }
.badge-provisional { background: #f9ebd1; color: #64460f; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 2.7rem;
  padding: .55rem .9rem;
  border: 1px solid transparent;
  border-radius: .45rem;
  font: 650 .87rem/1.3 system-ui, sans-serif;
  cursor: pointer;
  text-decoration: none;
}
.button-primary { background: var(--navy); color: white; }
.button-primary:hover { background: #062b4f; }
.button-secondary { background: var(--surface); color: var(--navy); border-color: #b7c9dc; }
.button-secondary:hover { background: #eaf1f8; }
.button-outline { background: transparent; color: white; border-color: #84a1be; }
.button-outline:hover { background: #194d80; }

.editor-actions { margin: 1.2rem 0; }
.editor-new { margin-top: 1.2rem; }
.editor, .edit-panel { display: grid; gap: 1rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.field { min-width: 0; }
label { display: block; font-weight: 650; font-size: .9rem; }
.field-help { margin: .2rem 0; font-size: .83rem; }
input:not([type="checkbox"]), textarea {
  display: block;
  width: 100%;
  margin-top: .35rem;
  padding: .6rem .7rem;
  border: 1px solid #b7c9dc;
  border-radius: .35rem;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}
textarea { resize: vertical; }
input[readonly] { background: #edf2f7; }
input[type="checkbox"] { accent-color: var(--navy); width: 1.15rem; height: 1.15rem; margin: 0; }
.checkbox { display: flex; align-items: center; gap: .5rem; }
.save-bar { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
.publication { margin-top: 1rem; }
.notice {
  padding: .8rem 1rem;
  margin: 1rem 0;
  background: #e1f2e8;
  color: #174e34;
  border: 1px solid #b6dbc5;
  border-radius: .45rem;
  overflow-wrap: anywhere;
}
.notice-error { background: #fff0f0; color: #882b32; border-color: #efc5c9; }

.login {
  min-height: 100vh;
  display: grid;
  align-items: center;
  justify-items: center;
  padding: 1rem;
  background: radial-gradient(ellipse at top, #245e91, var(--navy) 55%, #082c51);
}
.login-card {
  width: min(100%, 27rem);
  padding: clamp(1.2rem, 6vw, 2rem);
  background: var(--surface);
  border-radius: .8rem;
  box-shadow: 0 1.4rem 4rem #051c39aa;
}
.login-card .wordmark { color: var(--navy); margin-bottom: 2rem; }
.login-card .muted { margin-top: .6rem; }
.login-card form { margin-top: 1.3rem; }
.login-card .button { margin-top: 1rem; width: 100%; }

@media (max-width: 36rem) {
  .topbar-inner { flex-wrap: wrap; }
  .form-grid { grid-template-columns: 1fr; }
  .property .actions { width: 100%; }
  .save-bar .button { width: 100%; }
}

.lead { display: grid; gap: .55rem; overflow-wrap: anywhere; }
.lead time { font-size: .85rem; }
.lead-message { white-space: pre-wrap; }
