:root {
  --sage: #ccd5ae;
  --sage-dark: #a8b882;
  --ink: #1c1c1c;
  --muted: #5a5a5a;
  --paper: #f7f8f3;
  --white: #ffffff;
  --line: #e3e6d8;
  --accent: #ccd5ae;
  --font-display: "Figtree", sans-serif;
  --font-body: "Libre Franklin", sans-serif;
  --radius: 4px;
  --max: 1120px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }
a { color: #3d4a28; text-decoration: none; }
a:hover { color: #1c1c1c; text-decoration: underline; }

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}

.top-bar {
  background: var(--sage);
  color: var(--ink);
}

.top-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: inherit;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
}

.brand img { width: 42px; height: 42px; object-fit: contain; }
.brand:hover { text-decoration: none; color: inherit; }

.top-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  font-size: 0.92rem;
  font-weight: 600;
}

.top-actions a { color: var(--ink); }

.cat-dropdown { position: relative; }
.cat-toggle,
.nav-toggle {
  background: rgba(0,0,0,0.08);
  border: 0;
  padding: 0.4rem 0.75rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--radius);
  color: var(--ink);
}

.cat-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: var(--white);
  border: 1px solid var(--line);
  min-width: 220px;
  max-height: 70vh;
  overflow: auto;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  z-index: 60;
}

.cat-menu a {
  display: block;
  padding: 0.55rem 0.9rem;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.cat-menu a:last-child { border-bottom: 0; }

.main-nav { background: var(--white); }
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0;
  position: relative;
}

.nav-toggle { display: none; margin: 0.4rem 0; }

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.15rem 1rem;
}

.nav-list a {
  display: block;
  padding: 0.65rem 0.15rem;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 600;
  border-bottom: 2px solid transparent;
}

.nav-list a[aria-current="page"],
.nav-list a:hover {
  border-bottom-color: var(--sage-dark);
  text-decoration: none;
}

/* Hero */
.hero {
  position: relative;
  min-height: clamp(280px, 42vh, 420px);
  display: grid;
  place-items: center;
  color: #fff;
  text-align: center;
  background:
    linear-gradient(rgba(28,28,28,0.62), rgba(28,28,28,0.55)),
    url("/assets/img/hero-area.jpg") center / cover no-repeat;
}

.hero-inner { width: min(100% - 2rem, 820px); padding: 3rem 0; }

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  line-height: 1.15;
  margin: 0 0 0.75rem;
  font-weight: 700;
}

.hero h1 .year { color: var(--sage); }

.hero p {
  margin: 0 0 1.5rem;
  font-size: 1.05rem;
  opacity: 0.95;
}

.search-form {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.search-form input {
  flex: 1 1 240px;
  border: 0;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  font: inherit;
}

.btn,
button.btn,
input[type="submit"].btn {
  display: inline-block;
  background: var(--sage);
  color: var(--ink);
  border: 0;
  padding: 0.85rem 1.25rem;
  font: inherit;
  font-weight: 700;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
}

.btn:hover { background: var(--sage-dark); text-decoration: none; color: var(--ink); }

/* Sections */
.section { padding: 3rem 0; }
.section-alt { background: var(--white); }

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  margin: 0 0 1.5rem;
  text-align: center;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
}

.category-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 0.75rem;
  text-align: center;
  color: var(--ink);
  transition: border-color 0.2s, transform 0.2s;
}

.category-card:hover {
  border-color: var(--sage-dark);
  transform: translateY(-2px);
  text-decoration: none;
}

.category-card img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  margin: 0 auto 0.65rem;
}

.category-card h2 {
  margin: 0;
  font-size: 0.92rem;
  font-family: var(--font-display);
  font-weight: 700;
}

.listing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.listing-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 4px solid var(--sage);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.listing-card .meta {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 600;
}

.listing-card h2,
.listing-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  line-height: 1.35;
}

.listing-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  flex: 1;
}

.listing-card .card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.35rem;
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  text-align: center;
}

.works-item {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 1.5rem 1rem;
  border-radius: var(--radius);
}

.works-item .step {
  width: 48px;
  height: 48px;
  margin: 0 auto 0.85rem;
  border-radius: 50%;
  background: var(--sage);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-family: var(--font-display);
}

.works-item p {
  margin: 0;
  font-weight: 600;
  font-family: var(--font-display);
}

/* Page chrome */
.page-header {
  background: var(--sage);
  color: var(--ink);
  padding: 2rem 0;
}

.page-header h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.page-main {
  padding: 2.5rem 0 3.5rem;
}

.form-panel {
  max-width: 480px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--line);
  padding: 1.75rem;
  border-radius: var(--radius);
}

.form-group { margin-bottom: 1rem; }
.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  font-size: 0.92rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
  background: var(--white);
}

.contact-layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2rem;
}

.side-widget {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 1.25rem;
  margin-bottom: 1rem;
  border-radius: var(--radius);
}

.side-widget h2 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-family: var(--font-display);
  background: var(--sage);
  color: var(--ink);
  padding: 0.5rem 0.75rem;
}

.side-widget ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.side-widget li { margin-bottom: 0.45rem; }

/* Article */
.romlicontainer {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 1.75rem;
  border-radius: var(--radius);
  max-width: 820px;
  margin: 0 auto;
}

.romlicontainer p { margin: 0 0 12px; }
.romlicontainer h2,
.romlicontainer h3,
.romlicontainer h4,
.romlicontainer h5,
.romlicontainer h6 {
  margin: 16px 0 8px;
  line-height: 1.3;
  font-family: var(--font-display);
}
.romlicontainer h2 { font-size: 1.35rem; }
.romlicontainer h3 { font-size: 1.15rem; }
.romlicontainer a { color: #3d4a28; }
.romlicontainer ul,
.romlicontainer ol { margin: 0 0 12px 20px; padding: 0; }
.romlicontainer li { margin-bottom: 4px; }
.romlicontainer img { max-width: 100%; height: auto; display: block; margin: 12px 0; }
.romlicontainer blockquote {
  margin: 12px 0;
  padding-left: 12px;
  border-left: 3px solid var(--sage);
  color: #555;
}
.romlicontainer hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 16px 0;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 12px 0;
}

.romlicontainer table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  font-size: 0.92rem;
  min-width: 480px;
}

.romlicontainer th,
.romlicontainer td {
  border: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

.romlicontainer th {
  background: #eef1e3;
  font-weight: 600;
}

.article-meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 1rem;
}

.catalog-wrap { padding: 2rem 0 3rem; }

/* Footer */
.site-footer {
  background: var(--sage);
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  padding: 2.5rem 0;
}

.footer-about p { margin: 0; max-width: 52ch; }
.footer-links h2 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  font-family: var(--font-display);
}
.footer-links ul { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 0.4rem; }
.footer-links a { color: var(--ink); font-weight: 600; }

.footer-copy {
  background: var(--sage-dark);
  padding: 0.85rem 0;
  text-align: center;
  font-size: 0.9rem;
}

.footer-copy a { color: var(--ink); font-weight: 700; }

/* showLinks — center inside content column */
.romli-links-section {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.romli-links-wrap {
  display: flex;
  justify-content: center;
}

.romli-links-wrap .romlidata {
  width: 100%;
  max-width: 720px;
  margin-inline: auto;
  justify-items: center;
  justify-content: center;
  text-align: center;
}

.romli-links-wrap .romlidata > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.romli-links-wrap .romlidata img {
  margin-inline: auto;
}

/* showSitewide — center image */
.romlifooter {
  clear: both;
  text-align: center;
}

.romlifooter img {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.romlifooter > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

@media (max-width: 900px) {
  .listing-grid,
  .works-grid,
  .footer-grid,
  .contact-layout { grid-template-columns: 1fr; }

  .nav-toggle { display: inline-block; }

  .nav-list {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding-bottom: 0.75rem;
  }

  .nav-list.is-open { display: flex; }

  .brand-name { font-size: 0.95rem; max-width: 14ch; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .category-card { transition: none; }
}
