/* Free Boat Mafia — weathered chart / photocopied-zine theme.
   Dense bordered tables, rectangular controls, underlined links. No gloss. */

:root {
  --paper: #efe6cf;        /* weathered cream */
  --paper-2: #e7dbb9;      /* darker cream: alternating rows, chips */
  --panel: #e9dfc3;        /* panels and forms */
  --ink: #1d1f24;          /* near-black printing ink */
  --navy: #2b4262;         /* faded navy */
  --navy-deep: #1e2f4a;
  --sea: #4f7a6c;          /* sea green */
  --sea-deep: #3a5c51;
  --rust: #8e3a22;
  --rust-2: #9a3b22;
  --brass: #b08a34;
  --brass-text: #7a5d1d;   /* darker brass for text contrast */
  --line: #bfb08a;         /* worn tan hairlines */
  --line-dk: #a2946e;
  --row-alt: #ece1c2;
  --field-bg: #fbf5e3;
  --text-dim: #5c5441;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font: 13px/1.45 Verdana, Tahoma, sans-serif;
  color: var(--ink);
  background: var(--paper) url("../assets/paper.svg");
}

/* ---------- type & links ---------- */

h1, h2, h3 {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--navy-deep);
  line-height: 1.2;
}
h1 { font-size: 21px; margin: 14px 0 8px; }
h2 { font-size: 16px; margin: 12px 0 6px; }
h3 { font-size: 14px; margin: 10px 0 4px; }

a { color: var(--navy); text-decoration: underline; }
a:hover { color: var(--rust-2); }

.mono { font-family: "Courier New", Courier, monospace; font-size: 11px; }
.muted { color: var(--text-dim); }
.by { font-size: 11px; color: var(--text-dim); }
.desc { margin: 3px 0 0; font-size: 11px; color: var(--text-dim); }

:focus-visible { outline: 2px solid var(--rust-2); outline-offset: 1px; }
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--rust-2);
  outline-offset: 0;
  border-color: var(--rust-2);
}

/* ---------- accessibility helpers ---------- */

.vh {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10;
  background: var(--navy-deep);
  color: #f4ecd6;
  padding: 8px 14px;
}
.skip:focus { left: 0; }

.m-only { display: none; }

/* ---------- layout ---------- */

.wrap {
  max-width: 1020px;
  margin: 0 auto;
  padding: 0 10px 26px;
}

/* ---------- masthead ---------- */

.masthead {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 8px 10px;
  border-bottom: 3px double var(--navy);
  overflow: hidden;
}
.masthead::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../assets/chart.svg") right center / auto 150% no-repeat;
  opacity: .14;
  pointer-events: none;
}
.masthead > * { position: relative; }

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}
.emblem { width: 56px; height: 56px; flex: none; }
.brand-text { min-width: 0; }
.wordmark {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: bold;
  font-size: 26px;
  letter-spacing: .5px;
  color: var(--navy-deep);
}
.tagline {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-size: 12px;
  color: var(--rust);
  margin-top: 1px;
}
.masthead-art { width: 168px; height: auto; flex: none; }

/* ---------- navbar ---------- */

.navbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 12px;
  background: var(--navy);
  border: 1px solid var(--navy-deep);
  padding: 0 8px;
}
.navbar ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
}
.navbar li a {
  display: block;
  color: #f4ecd6;
  padding: 8px 9px;
  font-size: 12px;
}
.navbar li a:hover { color: #fff; background: var(--navy-deep); }
.navbar li a[aria-current="page"] {
  background: var(--navy-deep);
  font-weight: bold;
  color: #fff;
}
.quicksearch {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 5px 0;
  margin-left: auto;
}
.quicksearch input {
  font: 12px Verdana, Tahoma, sans-serif;
  padding: 4px 6px;
  border: 1px solid var(--navy-deep);
  background: var(--field-bg);
  color: var(--ink);
  width: 170px;
}
.quicksearch .btn { border-color: var(--navy-deep); }

/* ---------- notices ---------- */

.localnotice {
  border: 1px solid var(--brass);
  border-left-width: 4px;
  background: #f0e5c4;
  padding: 7px 10px;
  margin: 10px 0 0;
  font-size: 12px;
}

.caution {
  border: 1px solid var(--brass);
  border-left-width: 4px;
  background: #eee1ba;
  padding: 7px 10px;
  margin: 10px 0;
  font-size: 12px;
}

/* ---------- crumbs ---------- */

.crumbs { font-size: 12px; margin: 10px 0 6px; }
.crumbs ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
}
.crumbs li + li::before {
  content: "\00BB";
  margin: 0 7px;
  color: var(--brass-text);
}

/* ---------- tables ---------- */

.grid {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--navy);
  margin: 0 0 14px;
  background: #f4ecd6;
}
.grid .cat {
  caption-side: top;
  text-align: left;
  background: var(--navy);
  color: #f4ecd6;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: bold;
  font-size: 13px;
  letter-spacing: .6px;
  padding: 5px 8px;
  border: 1px solid var(--navy);
  border-bottom: none;
}
.grid th, .grid td {
  border: 1px solid var(--line);
  padding: 5px 8px;
  vertical-align: top;
  text-align: left;
}
.grid thead th {
  background: #d8cca6;
  border-color: var(--line-dk);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--ink);
  white-space: nowrap;
}
.grid tbody tr:nth-child(even) { background: var(--row-alt); }
.grid tbody tr:hover { background: #e3d6b0; }

.c-ico { width: 28px; text-align: center; }
.c-ico .ico { vertical-align: -3px; }
.c-num { width: 58px; text-align: center; font-size: 11px; }
.c-last { width: 185px; font-size: 11px; }
.c-board { width: 145px; font-size: 12px; }
.c-board-name { min-width: 200px; }
.c-topic { min-width: 200px; }

.board-link { font-weight: bold; font-size: 14px; }
.topic-link { font-weight: bold; }
.c-last .mono { font-size: 10px; }

/* report details table on thread pages */
.grid.report th[scope="row"] {
  width: 150px;
  background: #e0d4ae;
  font-size: 11px;
  white-space: nowrap;
}
.grid.report td { font-size: 12px; }

/* ---------- tags ---------- */

.tag {
  display: inline-block;
  font-family: "Courier New", Courier, monospace;
  font-size: 10px;
  font-weight: bold;
  letter-spacing: .5px;
  padding: 0 4px;
  border: 1px solid;
  vertical-align: 1px;
  white-space: nowrap;
}
.tag-sample     { color: #5d584a; border-color: #8d8670; background: #e6dfca; }
.tag-local      { color: var(--navy); border-color: var(--navy); background: #dde3ec; }
.tag-firsthand  { color: var(--sea-deep); border-color: var(--sea); background: #dce7e0; }
.tag-secondhand { color: var(--brass-text); border-color: var(--brass); background: #efe3c0; }
.tag-unverified { color: var(--rust); border-color: var(--rust-2); background: #ecd9cb; }

/* ---------- index blocks ---------- */

.block { margin-top: 16px; }
.block-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
  border: 1px solid var(--navy);
  border-bottom: none;
  background: #dccfa9;
  padding: 4px 8px;
}
.block-head h2 { margin: 0; font-size: 15px; }

.inline-filter {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  font-size: 12px;
}
.inline-filter select {
  font: 12px Verdana, Tahoma, sans-serif;
  padding: 3px;
  border: 1px solid var(--line-dk);
  background: var(--field-bg);
  color: var(--ink);
  max-width: 240px;
}

.legend {
  font-size: 11px;
  color: var(--text-dim);
  margin: 6px 0 0;
}
.legend .ico { vertical-align: -3px; }

.ico { vertical-align: -3px; }

/* ---------- board view ---------- */

.board-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.board-head .ico { width: 20px; height: 20px; vertical-align: baseline; }
.board-head h1 { margin: 0; }
.board-desc {
  margin: 5px 0 10px;
  font-size: 12px;
  color: #4c4636;
  max-width: 78ch;
}

.toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 8px 0 12px;
}

/* ---------- thread view ---------- */

.thread-head { margin-top: 8px; }
.thread-head h1 { display: inline; margin-right: 6px; }

.posts { margin: 12px 0 16px; }
.post {
  display: flex;
  border: 1px solid var(--navy);
  margin: 0 0 -1px;
  background: #f4ecd6;
}
.postbit {
  flex: 0 0 150px;
  border-right: 1px solid var(--line);
  background: var(--paper-2);
  padding: 8px;
}
.author {
  display: block;
  font-weight: bold;
  color: var(--navy-deep);
  overflow-wrap: break-word;
}
.role {
  display: block;
  font-size: 10px;
  color: var(--text-dim);
  margin-top: 3px;
}
.postmain { flex: 1; min-width: 0; }
.posthead {
  border-bottom: 1px solid var(--line);
  background: #ede2c4;
  padding: 5px 8px;
  font-size: 11px;
  color: var(--text-dim);
}
.postbody {
  padding: 9px 10px;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}
.postbody a { overflow-wrap: anywhere; }

/* ---------- panels & forms ---------- */

.panel {
  border: 1px solid var(--navy);
  background: var(--panel);
  padding: 10px 12px;
  margin: 10px 0;
}
.prose { max-width: 78ch; }
.prose h2 { margin-top: 16px; }
.prose ul { padding-left: 22px; }
.prose li { margin-bottom: 4px; }

.form .field { margin: 0 0 12px; }
.form label {
  display: block;
  font-weight: bold;
  font-size: 12px;
  margin-bottom: 3px;
}
.form input[type="text"],
.form input[type="search"],
.form input[type="date"],
.form input:not([type]),
.form textarea {
  display: block;
  width: 100%;
  max-width: 520px;
  font: 13px Verdana, Tahoma, sans-serif;
  padding: 5px 6px;
  border: 1px solid var(--line-dk);
  background: var(--field-bg);
  color: var(--ink);
}
.form textarea { max-width: 100%; }
.form select {
  display: block;
  max-width: 520px;
  width: 100%;
  font: 13px Verdana, Tahoma, sans-serif;
  padding: 4px;
  border: 1px solid var(--line-dk);
  background: var(--field-bg);
  color: var(--ink);
}

fieldset.field { border: 1px solid var(--sea); padding: 8px 10px 10px; }
fieldset.field legend {
  font-size: 11px;
  font-weight: bold;
  color: var(--sea-deep);
  padding: 0 5px;
}
.radio {
  display: block;
  font-weight: normal;
  font-size: 12px;
  margin: 4px 0;
  padding: 5px 7px;
  border: 1px solid var(--line);
  background: #f4ecd6;
}
.radio input { margin: 0 5px 0 0; vertical-align: -1px; }
.radio .ico { vertical-align: -3px; }

.err {
  color: var(--rust-2);
  font-weight: bold;
  font-size: 12px;
  margin: 5px 0 0;
}
.err:empty { display: none; }

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  font: 12px Verdana, Tahoma, sans-serif;
  padding: 5px 12px;
  background: var(--paper-2);
  color: var(--ink);
  border: 1px solid var(--navy);
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: #d9cbA4; color: var(--ink); }
.btn:active { background: #cfc09a; }
.btn-primary {
  background: var(--navy);
  color: #f4ecd6;
  border-color: var(--navy-deep);
}
.btn-primary:hover { background: var(--navy-deep); color: #fff; }
.btn-primary:active { background: #17252f; }

.linkbtn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--rust-2);
  text-decoration: underline;
  cursor: pointer;
}
.linkbtn:hover { color: var(--rust); }

/* ---------- search ---------- */

.snippet {
  font-size: 11px;
  color: var(--text-dim);
  margin: 4px 0 0;
}
mark {
  background: #ead9a0;
  color: inherit;
  padding: 0 1px;
}

/* ---------- main & footer ---------- */

#main { padding: 2px 0 10px; }
#main:focus { outline: none; }

.foot {
  margin-top: 18px;
  border-top: 2px solid var(--navy);
  padding: 10px 4px 0;
  font-size: 12px;
  text-align: center;
  color: var(--text-dim);
}
.foot p { margin: 4px 0; }

/* ---------- small screens ---------- */

@media (max-width: 639px) {
  .wrap { padding: 0 6px 20px; }

  .masthead { padding: 9px 4px 8px; gap: 8px; }
  .masthead::before { background-size: auto 170%; }
  .emblem { width: 40px; height: 40px; }
  .wordmark { font-size: 19px; }
  .tagline { font-size: 11px; }
  .masthead-art { width: 104px; }

  .navbar { padding: 0 4px; }
  .navbar li a { padding: 7px 7px; }
  .quicksearch { width: 100%; padding-bottom: 6px; }
  .quicksearch input { flex: 1; width: auto; }

  /* hide desktop-only table columns; per-row .m-only meta takes over */
  .grid .c-num, .grid .c-last, .grid .c-board { display: none; }
  .m-only { display: inline; }
  .grid th, .grid td { padding: 4px 5px; }

  .post { flex-direction: column; }
  .postbit {
    flex: none;
    width: auto;
    border-right: none;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 5px 8px;
  }
  .role { margin-top: 0; }

  h1 { font-size: 18px; }
  .thread-head h1 { display: inline; }
}

@media (max-width: 400px) {
  .masthead-art { display: none; }
  .masthead::before { background-size: auto 200%; opacity: .1; }
}

/* reduced motion: nothing animated here, but honor it for any future tween */
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
