﻿/* Shared palette and readable single-column layout. */
:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, sans-serif;
  color: #173b2d;
  background: #f5f6f1;
  line-height: 1.55;
}

* { box-sizing: border-box; }
body { margin: 0; }

header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem max(1rem, calc((100% - 44rem) / 2));
  background: #fff;
  border-bottom: 1px solid #d8e1d6;
}

.brand {
  display: block;
  flex: none;
  max-width: 100%;
  text-decoration: none;
}

.brand img {
  display: block;
  width: 10rem;
  max-width: 100%;
  height: auto;
}

.brand span {
  display: block;
  margin-top: .35rem;
  font-size: .75rem;
  color: #526358;
}

#nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .25rem;
}

#nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: .5rem .65rem;
  border-radius: .5rem;
  font-weight: 600;
  text-decoration: none;
}

#nav a[aria-current="page"] {
  background: #e6eee5;
  text-decoration: underline;
  text-underline-offset: .25rem;
}

main {
  max-width: 44rem;
  min-height: 65vh;
  margin: 2rem auto;
  padding: 0 1rem;
}

footer {
  padding: 1rem 1rem 2rem;
  text-align: center;
  font-size: .85rem;
  color: #526358;
}

/* Type, page headings and watch metadata. */
h1, h2, h3 { line-height: 1.25; overflow-wrap: anywhere; }
h1 { margin: 0 0 1rem; font-size: 1.9rem; }
h2 { margin: 1.5rem 0 .6rem; font-size: 1.25rem; }
h3 { margin: 1.25rem 0 .6rem; font-size: 1.05rem; }
p { margin: .75rem 0; }
p, li, a, label, code { overflow-wrap: anywhere; }
ol { padding-left: 1.5rem; }
li + li { margin-top: .6rem; }
a { color: #24563d; text-underline-offset: .2rem; }
a:hover { color: #163c2d; }
.muted { color: #526358; font-size: .9rem; }

.page-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.page-heading h1 { margin-bottom: .5rem; }
.badge {
  display: inline-block;
  margin: 0;
  padding: .25rem .65rem;
  border-radius: 2rem;
  background: #e6eee5;
  color: #285538;
  font-size: .85rem;
  font-weight: 650;
}

/* Action links keep anchor semantics; buttons retain native disabled behavior. */
button, .action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  max-width: 100%;
  min-width: 44px;
  min-height: 44px;
  padding: .6rem .85rem;
  border: 1px solid #839888;
  border-radius: .5rem;
  background: #fff;
  color: #173b2d;
  font: inherit;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  overflow-wrap: anywhere;
  cursor: pointer;
}

button:not(:disabled):hover, .action:not(:disabled):hover, #nav a:hover { background: #edf2eb; color: #173b2d; }
.primary { background: #24563d; border-color: #24563d; color: #fff; }
.primary:not(:disabled):hover { background: #163c2d; border-color: #163c2d; color: #fff; }
.danger { border-color: #ad5949; color: #8a3222; }
.danger:not(:disabled):hover { background: #fff0ec; border-color: #8a3222; color: #8a3222; }

.text-action {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-width: 44px;
  min-height: 44px;
  text-decoration: underline;
}

button:disabled, input:disabled, select:disabled, textarea:disabled {
  background: #eef0eb;
  border-color: #adb7ad;
  color: #68736c;
  cursor: not-allowed;
}

:is(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid #935015;
  outline-offset: 3px;
}

.actions, .confirmation {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem;
  margin-top: 1.25rem;
}

.confirmation > p { flex-basis: 100%; margin: 0; }
.confirmation:empty { display: none; }

/* Cards and messages keep warnings beside the observations they qualify. */
form, .card, .panel {
  padding: 1.25rem;
  border: 1px solid #d8e1d6;
  border-radius: .85rem;
  background: #fff;
  box-shadow: 0 3px 12px #173b2d06;
}

.card { margin: 1.25rem 0; }
.card > :first-child, .panel > :first-child { margin-top: 0; }
.card > :last-child, .panel > :last-child { margin-bottom: 0; }
.card h2 { margin-top: .4rem; }
.card .actions { padding-top: 1rem; border-top: 1px solid #e8ece6; }
.watch-status { padding-top: 1rem; border-top: 1px solid #e8ece6; }
.warning, .error {
  padding: .8rem;
  border: 1px solid #ead6a5;
  border-radius: .5rem;
  background: #fff5df;
  color: #67451b;
}

.error { background: #fff0ec; border-color: #edc9be; color: #8a2d1d; }
.error:empty, .warning:empty { display: none; }

/* Forms, catalog choices and disclosure controls. */
.login { max-width: 30rem; margin: 0 auto; }
.login > p { margin-bottom: 1.5rem; }
.login button[type="submit"] { width: 100%; margin-top: .5rem; }

label {
  display: grid;
  min-width: 0;
  gap: .35rem;
  margin: 1rem 0;
  font-weight: 600;
}

input, select, textarea {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: .65rem;
  border: 1px solid #839888;
  border-radius: .5rem;
  background: #fff;
  color: inherit;
  font: inherit;
}

input[type="checkbox"] {
  flex: none;
  width: 1.3rem;
  min-height: 1.3rem;
  margin: 0;
  accent-color: #24563d;
}

.check {
  display: flex;
  align-items: center;
  gap: .7rem;
  min-height: 44px;
  margin: .4rem 0;
  font-weight: 400;
  cursor: pointer;
}

.check input { order: -1; }
fieldset {
  min-width: 0;
  margin: 1.4rem 0;
  padding: 1rem;
  border: 1px solid #b2c2b4;
  border-radius: .5rem;
}

legend { padding: 0 .25rem; font-weight: 650; }
.choices {
  max-height: 19rem;
  overflow: auto;
  padding: .6rem;
  border: 1px solid #c8d6c8;
  border-radius: .5rem;
}

.choices button { display: block; width: 100%; margin: .3rem 0; text-align: left; }
.selected { background: #e6eee5; border: 2px solid #24563d; }
.row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
details { margin: 1.25rem 0; }
summary { min-height: 44px; padding: .7rem 0; font-weight: 600; cursor: pointer; }

.topic {
  display: block;
  padding: .75rem;
  border-radius: .5rem;
  background: #f5f6f1;
}

.skip { position: absolute; left: -9999px; }
.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 3;
  padding: 1rem;
  background: #fff;
}

@media (max-width: 420px) {
  header { align-items: flex-start; }
  #nav { gap: .2rem; }
  main { margin: 1.5rem auto; }
  .row { grid-template-columns: 1fr; }
  form, .card, .panel { padding: 1rem; }
}
