/* ===== DungyCrab.com — coastal PNW editorial =================================
   Tokens + base styles for all page artboards.
   Type:   Newsreader (display serif), IBM Plex Sans (body), IBM Plex Mono (data)
   Palette: deep harbor / fog / sand / driftwood + crab-orange accent
   ============================================================================ */

:root {
  /* Neutrals — slightly warm, weathered-wood feel */
  --ink:        oklch(20% 0.015 240);   /* near-black, cool */
  --ink-2:      oklch(32% 0.018 240);
  --ink-3:      oklch(48% 0.012 240);
  --ink-4:      oklch(62% 0.008 240);
  --rule:       oklch(85% 0.006 240);
  --rule-2:     oklch(92% 0.005 240);
  --paper:      oklch(97.5% 0.006 80);  /* warm off-white, sand-tinted */
  --paper-2:    oklch(94.5% 0.012 80);  /* card / pull-out bg */
  --paper-3:    oklch(91% 0.018 75);    /* deeper sand */

  /* Harbor / ocean — primary brand */
  --harbor:     oklch(28% 0.045 235);   /* deep nav blue */
  --harbor-2:   oklch(22% 0.04 235);
  --harbor-ink: oklch(96% 0.01 235);

  /* Crab — accent, used SPARINGLY */
  --crab:       oklch(62% 0.165 38);
  --crab-2:     oklch(55% 0.18 35);
  --crab-soft:  oklch(92% 0.04 45);

  /* Driftwood / kelp — supporting */
  --drift:      oklch(45% 0.018 70);
  --kelp:       oklch(40% 0.05 145);

  /* Functional */
  --ok:         oklch(55% 0.13 150);
  --warn:       oklch(70% 0.14 75);

  --serif: 'Newsreader', 'Source Serif Pro', Georgia, serif;
  --sans:  'IBM Plex Sans', -apple-system, system-ui, sans-serif;
  --mono:  'IBM Plex Mono', ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; }

.page {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  width: 100%;
  min-height: 100%;
  font-feature-settings: 'ss01', 'ss02', 'kern';
  -webkit-font-smoothing: antialiased;
}

.page a:not(.btn) { color: inherit; }
.page button { font-family: inherit; }

/* ---- Type ------------------------------------------------------------- */
.serif { font-family: var(--serif); font-feature-settings: 'liga', 'kern'; letter-spacing: -0.01em; }
.mono  { font-family: var(--mono); }
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.h-display { font-family: var(--serif); font-weight: 500; letter-spacing: -0.025em; line-height: 1; }
.h-section { font-family: var(--serif); font-weight: 500; letter-spacing: -0.02em; line-height: 1.05; }

/* ---- Header / mega-menu ----------------------------------------------- */
.dc-header-bar {
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  position: relative;
}
.dc-topstrip {
  background: var(--harbor);
  color: var(--harbor-ink);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  padding: 7px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.dc-topstrip .dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--ok);
  margin-right: 8px;
  box-shadow: 0 0 0 3px oklch(55% 0.13 150 / 0.25);
}
.dc-navrow {
  display: flex; align-items: center;
  padding: 22px 40px;
  gap: 72px;
}
.dc-logo {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none;
}
.dc-logo-mark {
  width: 40px; height: 40px;
  display: block;
  object-fit: contain;
  transform: translateY(0);
}
.dc-logo-word {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.dc-logo-sub {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-left: 4px;
}
.dc-nav {
  display: flex; gap: 28px;
  font-size: 14px;
  font-weight: 500;
  flex: 1;
}
.dc-nav-item {
  cursor: pointer;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  color: var(--ink-2);
  display: flex; align-items: center; gap: 4px;
  position: relative;
}
.dc-nav-item:hover, .dc-nav-item.open { color: var(--ink); border-bottom-color: var(--crab); }
.dc-nav-item.active { color: var(--ink); border-bottom-color: var(--crab); }
.dc-nav-cta {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--crab);
  background: var(--crab);
  color: white;
  padding: 9px 14px;
  border-radius: 2px;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.dc-nav-cta:hover { background: var(--crab-2); border-color: var(--crab-2); }
.dc-mega {
  position: absolute;
  top: 100%; left: 0; right: 0;
  background: var(--paper);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 28px 40px 32px;
  z-index: 50;
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr 1fr;
  gap: 36px;
  box-shadow: 0 16px 24px -16px rgba(0,0,0,0.12);
}
.dc-mega h5 {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 12px;
  font-weight: 500;
}
.dc-mega ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.dc-mega li a {
  text-decoration: none; color: var(--ink-2);
  font-size: 14px;
  display: flex; justify-content: space-between;
  gap: 10px;
}
.dc-mega li a:hover { color: var(--crab-2); }
.dc-mega li a .arrow { color: var(--ink-4); }
.dc-mega-feat {
  background: var(--paper-2);
  padding: 18px;
  border-radius: 2px;
}
.dc-mega-feat .img {
  aspect-ratio: 4/3;
  background:
    repeating-linear-gradient(135deg, oklch(82% 0.02 235) 0 6px, oklch(78% 0.02 235) 6px 12px);
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
}
img.img.dc-mega-img,
.dc-mega-feat img.img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4/3;
  object-fit: cover;
  object-position: center;
  background: none;
}
.dc-mega-feat .img::after {
  content: 'PHOTO · NEWPORT DOCK';
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  color: rgba(0,0,0,0.45);
}
.dc-mega-feat h4 {
  font-family: var(--serif);
  font-size: 17px;
  margin: 0 0 4px;
  font-weight: 500;
  letter-spacing: -0.015em;
}
.dc-mega-feat p { font-size: 12px; color: var(--ink-3); margin: 0; }

/* ---- Buttons ---------------------------------------------------------- */
.btn {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  padding: 11px 16px;
  cursor: pointer;
  border-radius: 2px;
  display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none;
  transition: all .15s;
}
.btn:hover { background: var(--harbor); border-color: var(--harbor); }
.btn-crab { background: var(--crab); border-color: var(--crab); color: white; }
.btn-crab:hover { background: var(--crab-2); border-color: var(--crab-2); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-lg { padding: 14px 22px; font-size: 14px; }

/* ---- Image placeholders ---------------------------------------------- */
.imgph {
  position: relative; overflow: hidden;
  background:
    repeating-linear-gradient(135deg, oklch(80% 0.02 235) 0 8px, oklch(76% 0.02 235) 8px 16px);
}
.imgph[data-tone="dark"] {
  background:
    repeating-linear-gradient(135deg, oklch(35% 0.04 235) 0 8px, oklch(30% 0.04 235) 8px 16px);
}
.imgph[data-tone="sand"] {
  background:
    repeating-linear-gradient(135deg, oklch(85% 0.025 75) 0 8px, oklch(81% 0.025 75) 8px 16px);
}
.imgph[data-tone="crab"] {
  background:
    repeating-linear-gradient(135deg, oklch(72% 0.12 38) 0 8px, oklch(67% 0.13 38) 8px 16px);
}
.imgph::after {
  content: attr(data-label);
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: rgba(0,0,0,0.5);
  text-align: center;
  padding: 8px;
}
.imgph[data-tone="dark"]::after { color: rgba(255,255,255,0.55); }

/* ---- Footer ---------------------------------------------------------- */
.dc-footer {
  background: var(--harbor);
  color: var(--harbor-ink);
  padding: 56px 40px 28px;
  font-size: 13px;
}
.dc-footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid oklch(40% 0.04 235);
}
.dc-footer h5 {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: oklch(75% 0.02 235);
  margin: 0 0 14px;
  font-weight: 500;
}
.dc-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.dc-footer a { color: oklch(88% 0.012 235); text-decoration: none; font-size: 13px; }
.dc-footer a:hover { color: white; }
.dc-footer-legal {
  display: flex; justify-content: space-between;
  margin-top: 22px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: oklch(70% 0.02 235);
}

/* ---- Vendor card ----------------------------------------------------- */
.vcard {
  display: grid;
  grid-template-columns: 56px 1.4fr 1fr 1fr 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 24px 28px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 2px;
  position: relative;
}
.vcard.featured {
  background: var(--paper);
  border-color: var(--crab);
  box-shadow: 0 0 0 3px var(--crab-soft), 0 1px 0 var(--rule);
}
.vcard .rank {
  font-family: var(--serif);
  font-size: 42px;
  line-height: 1;
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.vcard.featured .rank { color: var(--crab); }
.vcard .name {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.015em;
  margin: 0 0 4px;
}
.vcard .blurb { font-size: 12px; color: var(--ink-3); margin: 0; line-height: 1.45; }
.vcard .lbl {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-4);
  margin-bottom: 4px;
  display: block;
}
.vcard .val {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.vcard .val small { font-family: var(--sans); font-size: 11px; color: var(--ink-3); font-weight: 400; letter-spacing: 0; margin-left: 2px; }
.vcard .ribbon {
  position: absolute; top: -10px; left: 24px;
  background: var(--crab);
  color: white;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  padding: 4px 10px;
  text-transform: uppercase;
}

/* ---- Star rating ----------------------------------------------------- */
.stars { display: inline-flex; gap: 1px; color: var(--crab); font-size: 12px; }
.stars .s { width: 11px; height: 11px; display: inline-block; }

/* ---- Status pill ----------------------------------------------------- */
.pill {
  display: inline-flex; align-items: center;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 2px;
  border: 1px solid currentColor;
  gap: 6px;
}
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-ok { color: var(--ok); }
.pill-warn { color: var(--warn); }
.pill-crab { color: var(--crab); border-color: var(--crab); background: var(--crab-soft); }

/* ---- Price table ----------------------------------------------------- */
.ptable { width: 100%; border-collapse: collapse; font-size: 14px; }
.ptable th, .ptable td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--rule);
}
.ptable thead th {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  background: var(--paper-2);
  font-weight: 500;
  border-bottom: 1px solid var(--rule);
  cursor: pointer;
  user-select: none;
}
.ptable thead th .arr { opacity: 0.4; margin-left: 4px; font-size: 9px; }
.ptable thead th.sorted .arr { opacity: 1; color: var(--crab); }
.ptable tbody tr:hover { background: oklch(95% 0.012 80); }
.ptable .src {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.ptable .price {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 500;
}
.ptable .change.up { color: var(--crab); }
.ptable .change.down { color: var(--ok); }
.ptable td.right { text-align: right; }

/* ---- Cross-link strip ----------------------------------------------- */
.xlink {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.xlink a {
  text-decoration: none;
  color: var(--ink);
  padding: 28px 24px;
  border-right: 1px solid var(--rule);
  display: block;
  transition: background .15s;
}
.xlink a:last-child { border-right: 0; }
.xlink a:hover { background: var(--paper-2); }
.xlink .l-eye {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 8px;
}
.xlink .l-title {
  font-family: var(--serif);
  font-size: 19px;
  letter-spacing: -0.015em;
  font-weight: 500;
  line-height: 1.15;
}
.xlink .l-arrow { color: var(--crab); margin-top: 12px; font-size: 13px; }

/* ---- Newport authority badge ----------------------------------------- */
.authority {
  border: 1px solid var(--rule);
  background: var(--paper-2);
  padding: 22px 24px;
  display: flex; gap: 18px;
  align-items: center;
}
.authority .seal {
  flex: 0 0 56px;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--harbor);
  color: white;
  display: grid; place-items: center;
  font-family: var(--serif);
  font-size: 11px;
  text-align: center;
  line-height: 1.1;
  letter-spacing: -0.005em;
}
.authority h4 {
  font-family: var(--serif);
  font-size: 17px;
  margin: 0 0 4px;
  font-weight: 500;
  letter-spacing: -0.015em;
}
.authority p { margin: 0; font-size: 12px; color: var(--ink-3); }

/* ---- Disclosure ------------------------------------------------------ */
.disclose {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--ink-4);
  text-transform: uppercase;
  border-top: 1px dashed var(--rule);
  border-bottom: 1px dashed var(--rule);
  padding: 10px 0;
  margin: 24px 0;
}
.disclose strong { color: var(--ink-3); font-weight: 500; }

/* ---- Misc ----------------------------------------------------------- */
.hr-dot { display: flex; align-items: center; gap: 8px; color: var(--ink-4); font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; }
.hr-dot::before, .hr-dot::after { content: ''; flex: 1; height: 1px; background: var(--rule); }

/* ============================================================================
   RESPONSIVE LAYER  — added to make the site mobile-friendly.
   Strategy: the desktop layout is untouched above. Below it reflows via
   media queries. Inline-styled grids/paddings/type are overridden with
   !important attribute-substring selectors (author !important beats inline).
   ============================================================================ */

.ptable-wrap { width: 100%; }
.dc-burger { display: none; }
.dc-mobile { display: none; }

/* ---- Kill the desktop floor so the page can actually narrow ---------- */
@media (max-width: 1280px) {
  body { min-width: 0 !important; }
}

/* ===========================================================  ≤ 900px === */
@media (max-width: 900px) {
  /* --- Header: swap mega-nav for a hamburger drawer --- */
  .dc-nav, .dc-nav-cta { display: none !important; }
  .dc-mega { display: none !important; }
  .dc-navrow { padding: 14px 20px; gap: 0; }
  .dc-topstrip { padding: 6px 20px; font-size: 10px; }

  .dc-burger {
    display: inline-flex; flex-direction: column; justify-content: center;
    gap: 5px; width: 46px; height: 42px; margin-left: auto;
    background: none; border: 1px solid var(--rule); border-radius: 2px;
    cursor: pointer; padding: 0 11px;
  }
  .dc-burger span {
    display: block; height: 2px; width: 100%; background: var(--ink);
    transition: transform .2s ease, opacity .15s ease;
  }
  .dc-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .dc-burger.open span:nth-child(2) { opacity: 0; }
  .dc-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .dc-mobile {
    display: block; background: var(--paper);
    border-top: 1px solid var(--rule);
    max-height: calc(100vh - 110px); overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .dc-mobile-home, .dc-mobile-h {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; text-align: left; box-sizing: border-box;
    font-family: var(--serif); font-size: 19px; font-weight: 500;
    letter-spacing: -0.015em; color: var(--ink); text-decoration: none;
    background: none; border: 0; border-bottom: 1px solid var(--rule);
    padding: 17px 20px; cursor: pointer;
  }
  .dc-mobile-home.active, .dc-mobile-h.open { color: var(--crab); }
  .dc-mobile-h .sign { font-family: var(--mono); font-size: 19px; color: var(--ink-4); font-weight: 400; }
  .dc-mobile-links {
    background: var(--paper-2);
    border-bottom: 1px solid var(--rule);
    padding: 6px 20px 14px;
  }
  .dc-mobile-links a {
    display: block; text-decoration: none; color: var(--ink-2);
    padding: 12px 0; font-size: 15px; border-bottom: 1px solid var(--rule-2);
  }
  .dc-mobile-links a:last-child { border-bottom: 0; }
  .dc-mobile-links a em {
    display: block; font-style: normal; font-family: var(--mono);
    font-size: 11px; letter-spacing: 0.04em; color: var(--ink-4); margin-top: 3px;
  }
  .dc-mobile-cta {
    display: block; margin: 16px 20px 22px; text-align: center;
    font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em;
    text-transform: uppercase; background: var(--crab); color: #fff;
    padding: 15px; border-radius: 2px; text-decoration: none;
  }

  /* --- Tighter gutters everywhere the section padding is 56/48px --- */
  .page [style*="px 56px"], .page [style*="px 48px"] {
    padding-left: 26px !important; padding-right: 26px !important;
  }

  /* --- Footer reflow --- */
  .dc-footer { padding: 44px 26px 26px; }
  .dc-footer-grid { grid-template-columns: 1fr 1fr; gap: 30px 26px; }
  .dc-footer-legal { flex-direction: column; gap: 8px; }
}

/* ===========================================================  ≤ 640px === */
@media (max-width: 640px) {
  .dc-topstrip { justify-content: center; text-align: center; }
  .dc-topstrip > div:last-child { display: none; }

  .page [style*="px 56px"], .page [style*="px 48px"] {
    padding-left: 18px !important; padding-right: 18px !important;
  }

  /* Collapse every multi-column inline grid to a single stacked column */
  .page [style*="grid-template-columns"] { grid-template-columns: 1fr !important; }

  /* Class-based grids */
  .vcard { grid-template-columns: 1fr !important; gap: 14px !important; text-align: left; }
  .vcard .rank { font-size: 32px; }
  .xlink { grid-template-columns: 1fr 1fr; }
  .xlink a { border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 22px 18px; }
  .xlink a:nth-child(2n) { border-right: 0; }

  /* Cap the tall hero image columns so they read as a band, not a wall */
  .page [style*="min-height: 720px"],
  .page [style*="min-height: 600px"],
  .page [style*="min-height: 540px"],
  .page [style*="min-height: 460px"],
  .page [style*="min-height: 360px"] { min-height: 300px !important; }

  /* Scale down the big display type so headlines don't overflow */
  .page .h-display { line-height: 1.07 !important; }
  .page .h-section { line-height: 1.13 !important; }
  .page [style*="font-size: 84px"],
  .page [style*="font-size: 76px"],
  .page [style*="font-size: 72px"] { font-size: 40px !important; }
  .page [style*="font-size: 64px"] { font-size: 37px !important; }
  .page [style*="font-size: 60px"] { font-size: 35px !important; }
  .page [style*="font-size: 56px"] { font-size: 33px !important; }
  .page [style*="font-size: 52px"] { font-size: 31px !important; }
  .page [style*="font-size: 48px"] { font-size: 30px !important; }
  .page [style*="font-size: 46px"] { font-size: 29px !important; }
  .page [style*="font-size: 44px"],
  .page [style*="font-size: 42px"] { font-size: 28px !important; }

  /* Price table — let it scroll instead of crushing 6 columns */
  .ptable-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--rule); }
  .ptable { min-width: 640px; }

  /* Breadcrumb can wrap */
  .page [style*="text-transform: uppercase"][style*="px 56px"] { white-space: normal; }
}

/* ===========================================================  ≤ 400px === */
@media (max-width: 400px) {
  .dc-footer-grid { grid-template-columns: 1fr; }
  .xlink { grid-template-columns: 1fr; }
  .xlink a:nth-child(n) { border-right: 0; }
}
