:root {
  color-scheme: light;
  --bg: #ffffff;
  --text: #333333;
  --text-strong: #111111;
  --muted: #6f7782;
  --link: #546f92;
  --link-hover: #2f4f78;
  --border: #cccccc;
  --line: #e5e9ef;
  --panel: #f6f6f7;
  --menu: #c2cede;
  --menu-active: #8ea3be;
  --result: #fff9e0;
  --result-strong: #fff4bf;
  --danger: #b72424;
  --page-width: 900px;
  --content-width: 643px;
  --sidebar-width: 250px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  margin: 0;
  padding: 0;
  color: var(--text);
  background: var(--bg) url("/media/bg.gif") repeat-x;
  font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif;
  font-size: 11px;
  line-height: 1.5;
}

a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--link-hover);
}

img {
  max-width: 100%;
  height: auto;
}

.page-shell {
  width: min(100%, var(--page-width));
  margin: 0 auto;
  padding: 0;
}

.site-header {
  padding-top: 25px;
  background: var(--bg);
}

.header-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 430px) 470px;
  align-items: end;
  min-height: 58px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 4px;
  min-width: 0;
  color: var(--text-strong);
  text-decoration: none;
  white-space: nowrap;
  padding: 10px 0 10px 10px;
}

.brand-strong {
  font-family: "Trebuchet MS", Helvetica, sans-serif;
  font-size: 21px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0;
}

.brand-city {
  color: var(--link);
  font-family: "Trebuchet MS", Helvetica, sans-serif;
  font-size: 21px;
  line-height: 1;
  font-weight: 700;
}

.top-nav {
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  gap: 0;
  min-width: 0;
  padding: 18px 1px 11px 0;
  background: #fff url("/media/barul.gif") no-repeat bottom right;
}

.top-nav a {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  background: #fff url("/media/bar.gif") no-repeat bottom left;
  color: #808080;
  font-size: 11px;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}

.top-nav a:hover,
.top-nav a:focus-visible {
  color: var(--link-hover);
  background: #ffffff;
}

.menu-toggle {
  display: none;
}

.layout-grid {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, var(--content-width));
  align-items: start;
  gap: 7px;
}

.left-nav {
  margin-top: 0;
  border-bottom: 2px solid #e2e2e2;
}

.left-nav a {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 0;
  width: 250px;
  padding: 7px 23px;
  margin: 0 0 1px;
  border-bottom: 0;
  background: var(--menu) url("/media/arrow.gif") no-repeat center left;
  color: var(--link);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}

.left-nav a:first-child {
  background: var(--menu-active);
  color: #ffffff;
}

.left-nav a:hover,
.left-nav a:focus-visible {
  background: #afbed1;
  color: #ffffff;
}

.left-nav span {
  display: none;
}

.content-column {
  min-width: 0;
}

.intro-panel {
  position: relative;
  display: block;
  width: 643px;
  height: 203px;
  min-height: 0;
  border: 2px solid #e2e2e2;
  overflow: hidden;
  background: #bcceda url("/media/intro1.jpg") no-repeat;
}

.intro-copy {
  position: absolute;
  top: 30px;
  left: 20px;
  min-height: 0;
  width: 385px;
  max-width: none;
  padding: 0;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.14;
  text-shadow: none;
}

.intro-copy p {
  max-width: 520px;
  margin: 0 0 3px;
}

.quick-search {
  position: absolute;
  top: 110px;
  left: 20px;
  display: block;
  width: 198px;
  margin: 0;
  color: var(--link);
  font-size: 11px;
}

.quick-search label {
  display: block;
  margin: 0 0 2px;
  line-height: 1.05;
}

.quick-search .inline-control {
  display: grid;
  grid-template-columns: minmax(0, 150px) 42px;
  gap: 6px;
  align-items: center;
  margin: 0 0 7px;
}

.quick-search .inline-control:last-of-type {
  margin-bottom: 0;
}

.quick-search input,
.quick-search button {
  height: 22px;
  min-height: 22px;
}

.quick-search button {
  padding: 0;
  line-height: 1;
}

.quick-search .form-note:empty {
  display: none;
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  min-width: 0;
  border: 1px solid #d5dce5;
  background: #ffffff;
  color: var(--text);
}

input,
select {
  min-height: 18px;
  padding: 1px 4px;
}

textarea {
  padding: 8px;
}

button,
.btn,
.button-link {
  display: inline-grid;
  place-items: center;
  min-height: 18px;
  min-width: 40px;
  padding: 1px 8px;
  border: 1px solid #ffffff;
  background: #9eb1c9;
  color: #ffffff;
  font-size: 11px;
  font-weight: 400;
  text-decoration: none;
  cursor: pointer;
  transition: transform .12s ease, background-color .12s ease, border-color .12s ease;
}

button:hover,
.btn:hover,
.button-link:hover,
button:focus-visible,
.btn:focus-visible,
.button-link:focus-visible {
  background: #829ab8;
  color: #ffffff;
}

button:active,
.btn:active,
.button-link:active {
  transform: translateY(1px);
}

.form-note {
  grid-column: 1 / -1;
  min-height: 16px;
  margin: 0;
  color: var(--danger);
  font-size: 12px;
  line-height: 1.2;
}

.content-surface {
  min-height: 460px;
  padding: 16px 0 34px;
}

h1,
h2,
h3 {
  color: var(--text-strong);
  line-height: 1.18;
  letter-spacing: 0;
}

h1 {
  margin: 0 0 16px;
  font-size: 15px;
  font-weight: 700;
}

h2 {
  margin: 18px 0 9px;
  font-size: 14px;
  font-weight: 700;
}

h3 {
  margin: 14px 0 8px;
  font-size: 12px;
}

p {
  margin: 0 0 14px;
}

.lead {
  max-width: 560px;
  color: var(--muted);
  font-size: 11px;
}

.section-note,
.muted {
  color: var(--muted);
}

.warn {
  color: var(--danger);
  font-weight: 700;
}

.block {
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.home-summary {
  max-width: none;
  margin-bottom: 12px;
}

.home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 24px;
}

.search-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 10px 0 18px;
}

.search-panel {
  border: 1px solid #cccccc;
  background: #ffffff;
  padding: 12px 15px;
}

.search-panel h2 {
  margin-top: 0;
}

.field-stack {
  display: grid;
  gap: 10px;
}

form label {
  display: grid;
  gap: 5px;
  margin: 10px 0;
  color: var(--link);
}

form select,
form input[type="search"],
form input[type="text"] {
  width: min(100%, 260px);
}

.route-cloud,
.link-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.route-cloud a,
.link-grid a {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 1px 6px;
  border: 1px solid #e8e1c6;
  background: var(--result);
  color: var(--link);
  text-decoration: none;
}

.route-cloud a:hover,
.link-grid a:hover {
  border-color: #d7c078;
  background: var(--result-strong);
}

.list {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.list li {
  padding: 6px 8px;
  border-bottom: 1px solid #ffffff;
  background: var(--result);
}

.route-table,
.info-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
}

.route-table th,
.info-table th {
  padding: 5px 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-align: left;
}

.route-table td,
.info-table td {
  padding: 8px 10px;
  background: var(--result);
  border: 0;
  vertical-align: middle;
}

.route-table td:first-child {
  width: 70px;
  color: var(--link);
  font-size: 16px;
  font-weight: 700;
  text-align: center;
}

.route-table td:first-child a {
  text-decoration: none;
}

.route-table td:nth-child(2) {
  color: var(--link);
  font-size: 12px;
  line-height: 1.35;
}

.route-table strong {
  color: var(--danger);
}

.street-list-table {
  width: 100%;
  margin: 8px 0 14px;
  border-collapse: collapse;
}

.street-list-table td {
  width: 33.333%;
  padding: 2px 14px 3px 0;
  background: transparent;
  color: var(--text);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.35;
  text-align: left;
  vertical-align: top;
}

.street-list-table a {
  color: var(--link);
  font-weight: 400;
}

.info-table {
  border-spacing: 0 4px;
}

.info-table td:first-child {
  width: 150px;
  color: var(--muted);
  font-weight: 700;
}

.prose {
  max-width: 760px;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}

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

.prose ul {
  padding-left: 24px;
}

.metro-map {
  width: min(100%, 633px);
  margin: 10px auto 14px;
  text-align: center;
}

.metro-map-inner {
  position: relative;
  display: inline-block;
  width: min(100%, 633px);
}

.metro-map img {
  display: block;
  width: 100%;
  max-width: 633px;
  margin: 0 auto;
}

.metro-hotspot {
  position: absolute;
  z-index: 2;
  display: block;
  overflow: hidden;
  border-bottom: 2px solid transparent;
  color: transparent;
  text-indent: -9999px;
  text-decoration: none;
}

.metro-hotspot:hover,
.metro-hotspot:focus-visible {
  border-bottom-color: var(--danger);
  outline: none;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 20px 0;
}

.pagination a,
.pagination span {
  min-width: 30px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  background: #ffffff;
  text-align: center;
}

.pagination span {
  background: var(--menu);
  color: #ffffff;
}

.site-footer {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  color: #8b9199;
  background: #ffffff;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 8px 5px 16px;
  font-size: 10px;
}

.footer-row p { margin: 0; }

.legacy-title {
  clear: both;
  margin: 0;
  padding: 7px 0 10px;
  background: #ffffff;
  color: #000000;
  font-size: 12px;
  text-align: center;
}

.legacy-home-grid {
  display: grid;
  grid-template-columns: 315px 315px;
  gap: 12px;
}

.legacy-box {
  min-height: 170px;
  padding: 10px 15px;
  border: 1px solid #cccccc;
  background: #ffffff;
}

.legacy-box h2,
.legacy-box h3,
.advsearch-legacy h2,
.advsearch-legacy h3 {
  clear: both;
  margin: 0 0 8px;
  padding: 0 14px;
  background: #fff url("/media/h3bg.gif") no-repeat center left;
  color: #000000;
  font-size: 12px;
}

.legacy-news-item {
  margin: 0 0 8px;
  text-align: justify;
}

.legacy-more {
  margin: 8px 0 0;
  text-align: center;
}

.legacy-update-list,
.legacy-street-groups {
  margin: 0;
  padding: 8px 0 12px 20px;
}

.legacy-update-list li,
.legacy-street-groups li {
  padding: 4px 0 0;
}

.advsearch-legacy {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #cccccc;
  background: #ffffff;
  text-align: left;
}

.advsearch-legacy .advsearch-table {
  width: 100%;
  border-collapse: collapse;
}

.advsearch-legacy td {
  vertical-align: top;
}

.advsearch-legacy label {
  display: block;
  margin: 4px 0;
  color: var(--text);
}

.advsearch-legacy input[type="radio"] {
  margin: 0 5px 0 0;
  vertical-align: middle;
}

.advsearch-legacy select {
  width: 245px;
  min-height: 260px;
}

.advsearch-legacy input[type="text"] {
  width: 205px;
}

.advsearch-legacy .letter-filter {
  margin-top: 16px;
  padding-top: 10px;
  border-top: 1px solid #dddddd;
}

.route-detail-box {
  width: 100%;
  margin: 0 0 12px;
  padding: 10px 15px;
  border: 1px solid #cccccc;
  background: #ffffff;
}

.route-index-box {
  margin: 0 0 10px;
  min-height: 0;
}

.route-index-box p {
  margin: 0;
  line-height: 1.7;
}

@media (max-width: 700px) {
  .site-header {
    padding-top: 12px;
    border-bottom: 1px solid var(--line);
  }

  .page-shell {
    padding: 0 10px;
  }

  .header-row {
    grid-template-columns: 1fr auto;
    min-height: 58px;
    align-items: center;
  }

  .brand {
    display: grid;
    gap: 0;
    padding: 0;
  }

  .brand-strong,
  .brand-city {
    font-size: 18px;
    line-height: 1.05;
  }

  .brand-city {
    color: var(--link);
  }

  .menu-toggle {
    display: inline-grid;
    grid-template-columns: 22px auto;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 6px 10px;
    border: 1px solid var(--line);
    background: #ffffff;
    color: var(--link);
  }

  .menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    margin: 3px 0;
    background: var(--link);
  }

  .menu-toggle b {
    font-size: 14px;
  }

  .top-nav {
    position: absolute;
    z-index: 5;
    top: calc(100% + 1px);
    right: 10px;
    display: none;
    width: min(280px, calc(100vw - 20px));
    border: 1px solid var(--line);
    background: #ffffff;
    box-shadow: 0 18px 40px rgba(48, 62, 80, .16);
  }

  .top-nav.is-open {
    display: grid;
  }

  .top-nav a {
    justify-content: start;
    min-width: 0;
    min-height: 44px;
    padding: 0 16px;
    border: 0;
    border-bottom: 1px solid var(--line);
    text-align: left;
  }

  .layout-grid {
    display: block;
  }

  .left-nav {
    display: none;
  }

  .intro-panel {
    display: block;
    width: auto;
    height: auto;
    min-height: 0;
    margin-top: 10px;
    border-width: 1px;
    background: #eef3f8;
  }

  .intro-copy {
    position: static;
    width: auto;
    max-width: none;
    min-height: 0;
    padding: 16px 16px 10px;
    color: var(--link);
    font-size: 14px;
    font-weight: 700;
    text-shadow: none;
  }

  .quick-search {
    position: static;
    width: auto;
    margin: 0;
    padding: 0 16px 16px;
    font-size: 14px;
  }

  .quick-search .inline-control {
    grid-template-columns: minmax(0, 1fr) 72px;
  }

  .content-surface {
    padding: 28px 0 36px;
  }

  h1 {
    font-size: 22px;
  }

  body {
    font-size: 16px;
  }

  .legacy-home-grid {
    grid-template-columns: 1fr;
  }

  .advsearch-legacy {
    padding: 10px;
  }

  .advsearch-legacy .advsearch-table,
  .advsearch-legacy .advsearch-table tbody,
  .advsearch-legacy .advsearch-table tr,
  .advsearch-legacy .advsearch-table td {
    display: block;
    width: 100%;
  }

  .advsearch-legacy select,
  .advsearch-legacy input[type="text"] {
    width: 100%;
  }

  .search-grid {
    grid-template-columns: 1fr;
  }

  .route-table {
    border-spacing: 0 7px;
  }

  .route-table thead {
    display: none;
  }

  .route-table tr {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    background: var(--result);
  }

  .route-table td {
    display: block;
    padding: 13px 10px;
  }

  .route-table td:first-child {
    width: auto;
    font-size: 22px;
    text-align: center;
  }

  .route-table td:nth-child(2) {
    font-size: 15px;
  }

  .street-list-table,
  .street-list-table tbody,
  .street-list-table tr,
  .street-list-table td {
    display: block;
    width: 100%;
  }

  .street-list-table td {
    padding: 4px 0;
    font-size: 15px;
  }

  .info-table,
  .info-table tbody,
  .info-table tr,
  .info-table td {
    display: block;
    width: 100%;
  }

  .info-table td:first-child {
    width: 100%;
    padding-bottom: 0;
  }

  .footer-row {
    display: block;
  }
}

@media (max-width: 520px) {
  .brand-strong,
  .brand-city {
    font-size: 16px;
  }

  .intro-copy {
    display: none;
  }

  .quick-search {
    padding-top: 14px;
  }

  .route-table tr {
    grid-template-columns: 78px minmax(0, 1fr);
  }
}

/* --- forum archive --------------------------------------------------------
   Compact directory shell matching spbmar-info route/street pages:
   cream rows, legacy blue links, Tahoma sizing, no SMF or aboutwerber look. */

.forum h1 {
  margin: 0 0 14px;
}

.forum-cat {
  margin: 18px 0 12px;
}

.forum-cat h2 {
  margin: 0 0 8px;
  padding: 5px 10px;
  background: var(--menu);
  color: #1f2a3a;
  font-size: 12px;
  font-weight: 700;
}

.forum-board-list,
.forum-topic-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.prose .forum-board-list,
.prose .forum-topic-list {
  margin-left: 0;
  padding-left: 0;
}

.forum-board-list li,
.forum-topic-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  font-size: 11px;
  line-height: 1.4;
}

.forum-board-list li > small,
.forum-topic-list li > small {
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

.forum-board-list p {
  grid-column: 1 / -1;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.forum-topic-list .sticky {
  display: none;
}

.forum-topic-list a {
  font-weight: 400;
}

.forum .crumbs {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 11px;
}

.forum .crumbs a {
  color: var(--link);
}

.forum-topic .forum-post {
  margin: 12px 0 18px;
  padding: 0 0 14px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
}

.forum-topic .forum-post:last-child {
  border-bottom: 0;
}

.forum-topic .forum-post-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 11px;
}

.forum-topic .forum-post-meta strong {
  color: var(--text-strong);
  font-weight: 700;
}

.forum-topic .forum-post-subject {
  margin: 4px 0 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-strong);
}

.forum-topic .forum-post-body {
  font-size: 11px;
  line-height: 1.55;
  color: var(--text);
}

.forum-topic .forum-post-body p {
  margin: 0 0 10px;
}

.forum-topic .forum-post-body blockquote {
  margin: 0 0 10px 8px;
  padding: 4px 10px;
  border-left: 3px solid var(--menu-active);
  background: #ffffff;
  color: var(--text);
  font-size: 11px;
}

.forum-topic .forum-post-body blockquote cite {
  display: block;
  margin-bottom: 2px;
  color: var(--link);
  font-style: normal;
  font-weight: 700;
}

.forum-topic .forum-post-body pre {
  margin: 0 0 10px;
  padding: 6px 10px;
  background: #ffffff;
  border: 1px solid var(--line);
  color: var(--text);
  font-family: Tahoma, Verdana, Arial, sans-serif;
  font-size: 11px;
  white-space: pre-wrap;
  overflow-x: auto;
}

.forum-topic .forum-post-body a {
  color: var(--link);
}

.forum-topic .forum-post-body strong {
  color: var(--text-strong);
}

.forum-topic .forum-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #ffffff;
}

.forum-topic .forum-attachments a {
  display: inline-block;
  max-width: 240px;
  color: var(--link);
  font-size: 11px;
  text-decoration: none;
}

.forum-topic .forum-attachments a:hover {
  text-decoration: underline;
}

.forum-topic .forum-attachments img {
  display: block;
  max-width: 240px;
  max-height: 240px;
  border: 1px solid var(--line);
  background: #ffffff;
}

@media (max-width: 700px) {
  .forum-board-list li,
  .forum-topic-list li {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .forum-board-list li > small,
  .forum-topic-list li > small {
    white-space: normal;
  }

  .forum-topic .forum-post {
    padding: 0 0 10px;
  }

  .forum-topic .forum-post-body {
    font-size: 14px;
    line-height: 1.55;
  }

  .forum-topic .forum-attachments a {
    max-width: 100%;
  }
}

/* --- sape / sape-rtb slots -------------------------------------------------
   Minimal wrappers: text links live in the footer (low-priority container),
   RTB blocks live in the left-nav column (legacy "left/top" area) and below
   the content column (legacy "googler"/post-content area). Mobile hides
   in-page RTB blocks to prevent horizontal overflow. */

.sape-links {
  margin: 8px 0 0;
  padding: 6px 0 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.sape-links:empty {
  display: none;
}

.sape-rtb-slot {
  display: block;
  margin: 8px 0 0;
  padding: 0;
  max-width: 100%;
  overflow: hidden;
}

.sape-rtb-slot .sape-rtb-block {
  display: block;
  min-height: 1px;
}

.site-footer .sape-links {
  margin: 0;
  padding: 6px 5px 0;
  border-top: 1px solid var(--line);
}

@media (max-width: 700px) {
  .sape-rtb-slot {
    display: none;
  }
}
