:root {
  --ink: #193b46;
  --ink-dark: #102f39;
  --accent: #b59051;
  --paper: #f5f6f3;
  --muted: #586b70;
  --line: #dce3df;
  --white: #fff;
  --danger: #a62e2e;
  --radius: 18px;
  font-family: "Roboto", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-size: 16px;
  line-height: 1.65;
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: inherit;
  text-underline-offset: 4px;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
:focus-visible {
  outline: 3px solid #8c6529;
  outline-offset: 4px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.17;
  letter-spacing: -0.045em;
  font-weight: 650;
  margin-bottom: 1rem;
}
h2 {
  font-size: 1.55rem;
  line-height: 1.3;
  letter-spacing: -0.025em;
}
h3 {
  font-size: 1.1rem;
  line-height: 1.45;
}
p {
  margin-bottom: 1.1rem;
}
img {
  max-width: 100%;
  display: block;
}
svg {
  flex-shrink: 0;
}
.container {
  max-width: 1264px;
  padding: 0 32px;
  margin: auto;
  min-height: calc(100vh - 190px);
}
.site-header {
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1328px;
  margin: auto;
  padding: 22px 32px;
  display: flex;
  align-items: center;
  gap: 44px;
  min-height: 96px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  letter-spacing: 0.16em;
  font-size: 1.6rem;
  font-weight: 650;
  line-height: 1;
}
.brand small {
  display: block;
  font-size: 0.57rem;
  letter-spacing: 0.38em;
  margin-top: 7px;
}
.brand svg {
  color: var(--accent);
}
.main-nav {
  display: flex;
  gap: 30px;
  flex: 1;
}
.main-nav a,
.account-nav a {
  text-decoration: none;
  font-size: 0.9rem;
}
.main-nav a:hover,
.account-nav a:hover {
  color: #836127;
}
.account-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}
.account-nav > a {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.header-caption {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.85rem;
}
.text-button {
  border: 0;
  padding: 8px 0;
  background: none;
  color: var(--ink);
  font-size: 0.87rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.site-footer {
  max-width: 1264px;
  margin: 48px auto 0;
  padding: 24px 32px;
  display: flex;
  justify-content: space-between;
  gap: 15px;
  border-top: 1px solid var(--line);
  font-size: 0.75rem;
  color: var(--muted);
}
.site-footer a {
  font-weight: 650;
}
.eyebrow {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  font-weight: 700;
  color: #7e602e;
  margin-bottom: 14px;
}
.lead {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 50ch;
}
.muted {
  color: var(--muted);
  font-size: 0.9rem;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 46px 0 30px;
}
.page-heading p:last-child {
  margin-bottom: 0;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 48px;
  padding: 11px 22px;
  border: 1px solid var(--ink);
  border-radius: 9px;
  background: var(--ink);
  color: white;
  text-decoration: none;
  font-size: 0.87rem;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.5;
  flex-shrink: 0;
}
.button:hover {
  background: var(--ink-dark);
}
.button--secondary {
  background: transparent;
  color: var(--ink);
  border-color: #b9c9c6;
}
.button--secondary:hover {
  background: #e7eeea;
}
.full {
  width: 100%;
}
.panel {
  padding: 30px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.panel > h2:first-child {
  margin-bottom: 24px;
}
.narrow {
  max-width: 590px;
  margin: 60px auto;
}
.narrow h1 {
  font-size: 2rem;
}
.login-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: 100px;
  max-width: 1080px;
  min-height: calc(100vh - 220px);
  margin: auto;
  padding: 70px 0;
}
.login-intro h1 {
  font-size: clamp(2.2rem, 4.2vw, 3.4rem);
  line-height: 1.2;
}
.login-intro .lead {
  margin-top: 24px;
}
.intro-line {
  height: 2px;
  width: 60px;
  background: var(--accent);
  margin: 36px 0 20px;
}
.login-card {
  padding: 38px;
  box-shadow: 0 18px 55px #12352a08;
}
.login-card h2 {
  font-size: 1.65rem;
}
.login-card .subtle-link {
  font-size: 0.85rem;
}
.subtle-link {
  display: inline-block;
  color: var(--muted);
  margin-top: 22px;
}
.form-row,
form > div > div:not(.form-columns),
form > div > fieldset {
  margin-bottom: 20px;
}
form label {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
  margin-bottom: 7px;
}
input:not([type="hidden"]):not([type="checkbox"]),
textarea,
select {
  width: 100%;
  border: 1px solid #bdcbc9;
  border-radius: 8px;
  padding: 12px 13px;
  background: #fcfdfb;
  color: var(--ink);
  min-height: 47px;
}
input[type="checkbox"] {
  margin-right: 8px;
  accent-color: var(--ink);
}
textarea {
  resize: vertical;
  min-height: 110px;
}
form ul {
  color: var(--danger);
  font-size: 0.85rem;
  padding-left: 22px;
}
form .help-text,
form .help-block {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 6px 0 16px;
}
.form-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 18px 0 24px;
}
.notice {
  padding: 16px 20px;
  margin: 24px 0;
  border-radius: 10px;
  font-size: 0.9rem;
  background: #e7efe8;
  border: 1px solid #c3d7c5;
  color: #245338;
}
.notice--error {
  background: #fff1ef;
  border-color: #e4c8c1;
  color: #8b2929;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 34px 0 22px;
}
.section-heading h2 {
  margin: 0;
}
.map-section {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.map {
  height: 390px;
  background: #e4e9e3;
  z-index: 0;
  font-family: inherit;
}
.map--detail {
  height: 310px;
  border-radius: 10px;
}
.map--editor {
  height: 280px;
  border-radius: 10px;
}
.map-caption {
  padding: 12px 20px;
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
}
.map-error {
  font-size: 0.85rem;
  color: var(--danger);
  padding: 10px;
  margin: 0;
}
.leaflet-container {
  font-family: inherit;
}
.leaflet-control-attribution a {
  color: #254f65;
}
.portal-pin span {
  position: absolute;
  top: 4px;
  left: 6px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  background: var(--ink);
  border: 3px solid white;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 2px 7px #102f3938;
}
.portal-pin span svg {
  width: 17px;
  height: 17px;
  color: white;
  transform: rotate(45deg);
}
.portal-pin--selected span {
  background: #8a642d;
  transform: rotate(-45deg) scale(1.1);
  box-shadow:
    0 0 0 5px #b5905140,
    0 3px 10px #102f3940;
}
.portal-pin:focus-visible span {
  outline: 3px solid var(--ink);
  outline-offset: 4px;
}
.leaflet-popup-content a {
  font-weight: 650;
  color: var(--ink);
}
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.project-card {
  border: 1px solid var(--line);
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  transition:
    transform 0.18s,
    box-shadow 0.18s;
}
.project-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px #153d4610;
}
.card-link {
  display: block;
  text-decoration: none;
  height: 100%;
}
.project-card img,
.image-placeholder {
  width: 100%;
  height: 230px;
  object-fit: cover;
}
.image-placeholder {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #dfe7e1, #b7c9c5);
  letter-spacing: 0.24em;
  font-size: 1.2rem;
  color: #31534f;
}
.card-body {
  padding: 24px;
}
.card-body h3 {
  margin: 12px 0 10px;
}
.card-body p {
  margin-bottom: 20px;
}
.card-cta {
  font-size: 0.8rem;
  font-weight: 650;
  display: flex;
  justify-content: space-between;
}
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 30px;
  padding: 4px 11px;
  background: #eee9dd;
  color: #745625;
  font-size: 0.68rem;
  font-weight: 600;
}
.badge--green {
  color: #2c5a3b;
  background: #e6f0e7;
}
.pagination {
  display: flex;
  justify-content: center;
  gap: 22px;
  align-items: center;
  margin: 32px 0;
}
.empty-state {
  grid-column: 1/-1;
  border: 1px dashed #c1cfca;
  padding: 40px;
  text-align: center;
  border-radius: var(--radius);
  color: var(--muted);
}
.back-link {
  display: inline-block;
  font-size: 0.82rem;
  margin: 28px 0 -20px;
  color: var(--muted);
}
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-bottom: 30px;
}
.gallery > a:first-child {
  grid-column: 1/-1;
}
.gallery img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 14px;
}
.gallery > a:first-child img {
  height: 480px;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 24px;
}
.prose {
  font-size: 1rem;
  line-height: 1.9;
  overflow-wrap: anywhere;
}
.editor-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  align-items: start;
}
.editor-aside {
  position: sticky;
  top: 24px;
}
.editor-aside h2 {
  font-size: 1.35rem;
}
.delete-form {
  margin-top: 20px;
  text-align: center;
}
.danger {
  color: var(--danger);
}
.block-space {
  margin-top: 28px;
}
.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}
.photo-item img {
  width: 100%;
  height: 155px;
  object-fit: cover;
  border-radius: 9px;
}
.photo-item form {
  text-align: right;
}
.comment {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}
.comment time {
  font-size: 0.72rem;
  margin-left: 12px;
  color: var(--muted);
}
.comment p {
  margin: 10px 0 0;
  overflow-wrap: anywhere;
}
.comments {
  margin-bottom: 24px;
}
.table-panel {
  padding: 0;
  overflow: hidden;
}
.table-scroll {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
th,
td {
  text-align: left;
  padding: 20px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
th {
  font-weight: 600;
  color: var(--muted);
  background: #f8faf7;
  font-size: 0.76rem;
}
tbody tr:last-child td {
  border: 0;
}
.skip-link {
  position: fixed;
  left: 16px;
  top: -100px;
  z-index: 2000;
  background: var(--ink);
  color: #fff;
  padding: 10px 15px;
}
.skip-link:focus {
  top: 10px;
}
@media (max-width: 1000px) {
  .header-inner {
    gap: 24px;
  }
  .main-nav {
    gap: 18px;
  }
  .account-nav {
    gap: 12px;
  }
  .account-nav > a {
    max-width: 110px;
  }
  .project-grid {
    gap: 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .login-layout {
    gap: 45px;
  }
  .editor-grid {
    grid-template-columns: 1.7fr 1fr;
  }
  .panel {
    padding: 24px;
  }
  .photo-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 700px) {
  .container {
    padding: 0 18px;
  }
  .header-inner {
    padding: 17px 18px;
    gap: 18px;
    flex-wrap: wrap;
    min-height: 80px;
  }
  .brand {
    font-size: 1.35rem;
  }
  .brand svg {
    width: 25px;
  }
  .brand small {
    font-size: 0.5rem;
  }
  .main-nav {
    order: 3;
    width: 100%;
    flex-basis: 100%;
    gap: 24px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
    overflow: auto;
  }
  .main-nav a {
    font-size: 0.8rem;
    white-space: nowrap;
  }
  .account-nav {
    margin-left: auto;
    font-size: 0.75rem;
  }
  .account-nav > a {
    max-width: 105px;
    font-size: 0.75rem;
  }
  .account-nav button {
    font-size: 0.75rem;
  }
  .header-caption {
    max-width: 130px;
    line-height: 1.6;
    text-align: right;
    font-size: 0.7rem;
  }
  .page-heading {
    margin: 32px 0 24px;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 16px;
  }
  .page-heading h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
  }
  .lead {
    font-size: 0.97rem;
  }
  .page-heading .button {
    font-size: 0.8rem;
    min-height: 44px;
    padding: 10px 16px;
  }
  .eyebrow {
    font-size: 0.6rem;
  }
  .login-layout {
    display: block;
    min-height: 0;
    padding: 38px 0 12px;
  }
  .login-intro h1 {
    font-size: 2.2rem;
  }
  .login-intro .lead {
    font-size: 0.95rem;
    max-width: 40ch;
    margin-top: 18px;
  }
  .intro-line {
    display: none;
  }
  .login-intro > .muted {
    display: none;
  }
  .login-card {
    margin-top: 28px;
    padding: 26px 22px;
  }
  .login-card h2 {
    font-size: 1.4rem;
  }
  .site-footer {
    padding: 22px 18px;
    display: block;
    margin-top: 35px;
    font-size: 0.67rem;
  }
  .site-footer span {
    display: block;
    margin-bottom: 5px;
  }
  .narrow {
    margin: 32px auto;
  }
  .map {
    height: 315px;
  }
  .map--detail,
  .map--editor {
    height: 260px;
  }
  .map-caption {
    font-size: 0.7rem;
    padding: 11px 14px;
  }
  .project-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .project-card img,
  .image-placeholder {
    height: 225px;
  }
  .card-body {
    padding: 20px;
  }
  .section-heading {
    margin: 28px 0 18px;
  }
  .section-heading h2 {
    font-size: 1.3rem;
  }
  .detail-grid,
  .editor-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .editor-aside {
    position: static;
  }
  .panel {
    padding: 22px 18px;
  }
  .editor-aside .panel {
    padding: 24px;
  }
  .form-columns {
    gap: 12px;
  }
  .form-columns label {
    font-size: 0.72rem;
  }
  .gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
  }
  .gallery img {
    height: 150px;
  }
  .gallery > a:first-child img {
    height: 280px;
  }
  .photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .photo-item img {
    height: 135px;
  }
  .back-link {
    margin-top: 24px;
  }
  .comment time {
    display: block;
    margin-left: 0;
  }
  .table-panel {
    padding: 0;
  }
  th,
  td {
    padding: 15px;
    min-width: 120px;
  }
  .table-scroll table {
    min-width: 580px;
  }
  input,
  textarea,
  select {
    font-size: 16px;
  }
  .empty-state {
    padding: 28px 18px;
  }
  .button {
    min-height: 48px;
  }
  .leaflet-control-attribution {
    font-size: 9px !important;
  }
  .prose {
    font-size: 0.95rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
