
:root {
  --navy: #092d59;
  --blue: #07528d;
  --sky: #e6f2fa;
  --ink: #0b315f;
  --muted: #627996;
  --border: #dae9f4;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #eaf4fb;
  color: var(--ink);
}

a {
  text-decoration: none;
  color: inherit;
}

/* HEADER */

.coast-header {
  height: 100px;
  background: #e7f6ff url('/assets/images/header-coast.jpg') center center / cover no-repeat;
}

.coast-head-inner {
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2.2%;
  gap: 16px;
}

.brand img {
  display: block;
  width: min(470px, 39vw);
  height: auto;
  max-height: 93px;
  object-fit: contain;
  object-position: left;
}

.head-right {
  display: flex;
  align-items: center;
  gap: 40px;
}

.search-preview {
  width: 250px;
  padding: 10px 13px;
  background: #fafcffeb;
  border: 1px solid #b8d0df;
  border-radius: 8px;
  color: #667b8d;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}

.header-verse {
  font-family: 'Segoe Print', 'Comic Sans MS', cursive;
  text-align: center;
  color: white;
  font-style: italic;
  text-shadow: 1px 2px 4px #153757;
  line-height: 1.28;
  font-size: 16px;
  margin: 0;
}

/* NAVIGATION */

.site-nav {
  background: #fff;
  border-bottom: 1px solid #cadeea;
  box-shadow: 0 2px 8px #5b89ab14;
}

.nav-inner {
  min-height: 46px;
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 13px;
  padding: 0 12px;
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 12px;
  white-space: nowrap;
  padding: 8px 5px;
  color: var(--navy);
  font-weight: 600;
}

.nav-item > span:first-child {
  font-size: 19px;
  font-weight: bold;
}

.nav-item.selected {
  border-bottom: 3px solid #ed3247;
}

.nav-member {
  margin-left: auto;
  font-weight: 400;
}

.nav-member img {
  width: 29px;
  height: 29px;
  border-radius: 50%;
  object-fit: cover;
}

/* COMING SOON BANNER */

.coming-strip {
  background: #11497c;
  color: #fff;
  text-align: center;
  padding: 11px;
  font-size: 14px;
  border-bottom: 2px solid #d5b661;
}

.coming-strip strong {
  color: #fbe69c;
  letter-spacing: 1.4px;
}

/* MAIN THREE-COLUMN LAYOUT */

.home-shell {
  display: grid;
  grid-template-columns: 208px minmax(0, 1fr) 205px;
  gap: 9px;
  max-width: 1535px;
  margin: auto;
  padding: 10px 14px;
}

.panel {
  background: #fff;
  border: 1px solid #e3edf5;
  border-radius: 9px;
  box-shadow: 0 2px 12px #779cba10;
}

.left-rail,
.right-rail {
  min-width: 0;
}

/* LEFT SIDEBAR */

.profile-panel {
  padding: 12px;
}

.profile-top {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.profile-pic {
  width: 69px;
  height: 69px;
  object-fit: cover;
  border-radius: 50%;
}

.profile-top strong {
  font-size: 14px;
}

.profile-top small,
.member-list small {
  display: block;
  font-size: 10px;
  color: #7184a0;
  line-height: 1.4;
  margin-top: 5px;
}

.profile-top b {
  color: var(--blue);
}

.fake-btn {
  display: block;
  text-align: center;
  padding: 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: bold;
  cursor: default;
}

.pale {
  background: #e7f1f8;
  margin-top: 13px;
}

.profile-panel hr {
  border: 0;
  border-top: 1px solid #e9eef3;
  margin: 15px 0;
}

.profile-panel h4 {
  font-size: 11px;
  margin: 0 0 10px;
}

.side-link {
  padding: 6px 3px;
  font-size: 12px;
  color: #0c3f77;
}

/* NEWFOUNDLAND HOMETOWNS CARD */

.hometown-mini {
  margin-top: 16px;
  background: #e8f3fc;
  border-radius: 7px;
  padding: 12px 9px;
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 8px;
}

.nl-shape {
  font-size: 55px;
  line-height: 1;
  color: #6890b2;
}

.hometown-mini b {
  font-size: 12px;
}

.hometown-mini small {
  display: block;
  font-size: 10px;
  color: #657e98;
  line-height: 1.4;
  margin-top: 5px;
}

.hometown-mini .fake-btn {
  grid-column: 1 / -1;
}

.outline {
  border: 1px solid #9cb7d1;
  background: #fff;
}

/* RED CHAIR SIDEBAR IMAGE */

.chair-tile {
  position: relative;
  margin-top: 10px;
  border-radius: 8px;
  overflow: hidden;
  min-height: 370px;
}

.chair-tile img {
  width: 100%;
  height: 370px;
  object-fit: cover;
  display: block;
}

.chair-tile div {
  position: absolute;
  right: 8px;
  top: 14px;
  text-align: center;
  font: italic 20px / 1.2 'Segoe Print', 'Comic Sans MS', cursive;
  color: #0c3561;
  transform: rotate(-5deg);
  text-shadow: 0 1px 4px white;
}

/* MAIN HOMETOWN TIME MACHINE */

.center-stage {
  min-width: 0;
  background: #fff;
  border-radius: 8px;
  padding: 0 6px 8px;
}

.machine-hero {
  height: 248px;
  background: #0d5790 url('/assets/images/hare-bay-hero.jpg') center / cover no-repeat;
  border-radius: 8px;
  overflow: hidden;
}

.hero-overlay {
  height: 100%;
  padding: 20px 23px;
  background: linear-gradient(
    90deg,
    #083a70c7 0%,
    #0c498c75 54%,
    transparent 95%
  );
  color: #fff;
}

.machine-hero h1 {
  font-family: 'Segoe Print', 'Comic Sans MS', cursive;
  font-size: clamp(30px, 3.4vw, 53px);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -2px;
  line-height: 1.12;
  margin: 0 0 6px;
}

.machine-hero p {
  font-family: 'Segoe Print', 'Comic Sans MS', cursive;
  font-style: italic;
  font-size: 14px;
  margin: 0 0 23px;
}

.hero-features {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 11px;
  margin-bottom: 18px;
}

.town-search {
  display: flex;
  gap: 8px;
  background: #f5fbff;
  padding: 7px;
  border-radius: 8px;
  max-width: 565px;
  color: var(--ink);
  align-items: center;
  font-size: 13px;
}

.town-search span {
  flex: 1;
  font-weight: bold;
  padding-left: 8px;
}

.town-search strong {
  background: #0960a9;
  color: white;
  border-radius: 6px;
  padding: 10px 16px;
  font-size: 11px;
}

/* DECADE SELECTION BAR */

.decade-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #e5f2fc;
  border-radius: 7px;
  padding: 10px;
  margin: 9px 0 13px;
  font-size: 11px;
}

.decade-bar strong {
  white-space: nowrap;
  margin-right: 5px;
}

.decade-bar span {
  background: white;
  border-radius: 20px;
  text-align: center;
  padding: 7px 10px;
  min-width: 60px;
  font-weight: bold;
}

.decade-bar .chosen {
  background: #104879;
  color: white;
}

.decade-bar em {
  margin-left: auto;
  font: italic 13px 'Segoe Print', 'Comic Sans MS', cursive;
  text-align: center;
  white-space: nowrap;
}

/* TOWN OVERVIEW */

.town-overview {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 18px;
  align-items: center;
  margin: 10px 8px;
}

.town-overview h2 {
  font-size: 21px;
  margin: 0 0 4px;
}

.heart {
  color: #cb2536;
}

.scriptline {
  font: italic 13px 'Segoe Print', 'Comic Sans MS', cursive;
  margin: 0 0 10px;
}

.muted {
  font-size: 11px;
  color: #7c8da4;
  line-height: 1.5;
  margin: 0;
}

.mini-stats {
  background: #eaf5fd;
  border-radius: 9px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px;
  min-height: 105px;
}

.mini-stats > div {
  flex: 1;
}

.mini-stats b {
  font-size: 12px;
}

.mini-stats small {
  font-size: 10px;
  display: block;
}

.mini-stats p {
  font-size: 9px;
}

.mini-stats img {
  width: 45%;
  height: 94px;
  object-fit: cover;
  border-radius: 4px;
}

/* MEMORY GALLERY */

.memories-section {
  margin: 14px 5px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.section-head h3 {
  font-size: 14px;
  margin: 0;
}

.section-head > span {
  color: #227fbe;
  font-size: 10px;
  text-decoration: underline;
}

.memory-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.photo-card {
  overflow: hidden;
  border-radius: 7px;
  background: #f7fbff;
  border: 1px solid #eaf0f5;
  padding-bottom: 8px;
}

.photo-card img {
  display: block;
  width: 100%;
  height: 107px;
  object-fit: cover;
}

.photo-card b,
.photo-card small {
  display: block;
  padding: 0 6px;
}

.photo-card b {
  margin-top: 6px;
  font-size: 10px;
}

.photo-card small {
  font-size: 9px;
  color: #647f98;
}

/* BOTTOM COMMUNITY PANELS */

.community-grid {
  display: grid;
  grid-template-columns: 1fr 1.16fr 0.9fr 1.18fr;
  gap: 8px;
  margin-top: 12px;
}

.community-panel {
  padding: 9px;
  min-width: 0;
}

.community-panel .section-head h3 {
  font-size: 12px;
}

.member-list > div {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 7px 0;
}

.member-list img {
  width: 31px;
  height: 31px;
  border-radius: 50%;
  object-fit: cover;
}

.member-list p {
  margin: 0;
  flex: 1;
  min-width: 0;
}

.member-list p b {
  font-size: 10px;
}

.member-list small {
  font-size: 9px;
  margin: 0;
}

.member-list span {
  font-size: 9px;
  padding: 5px;
  background: #e7f0f8;
  border-radius: 4px;
}

/* COMMUNITY CONVERSATIONS */

.conversation {
  padding: 7px 2px;
  border-bottom: 1px solid #edf1f5;
}

.conversation b,
.conversation small {
  display: block;
  font-size: 10px;
}

.conversation small,
.mini-caption {
  font-size: 9px;
  color: #7185a0;
}

/* IDENTIFY PEOPLE IN PHOTOS */

.wide-thumb {
  width: 100%;
  height: 120px;
  object-fit: cover;
}

.fake-btn.blue {
  background: #075c9c;
  color: white;
  margin: 6px 0;
}

.community-panel > small {
  font-size: 9px;
  color: #8091a5;
}

/* THEN AND NOW */

.comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.comparison img {
  width: 100%;
  height: 130px;
  object-fit: cover;
}

.small-script {
  text-align: center;
  margin-top: 7px;
  font-size: 10px;
}

/* RIGHT SIDEBAR */

.right-panel {
  padding: 10px;
  margin-bottom: 9px;
}

.right-panel > h3,
.right-panel .section-head h3 {
  font-size: 13px;
  margin: 0 0 8px;
}

.side-cover {
  width: 100%;
  height: 75px;
  object-fit: cover;
  border-radius: 5px;
}

.stat-row {
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 8px 4px;
}

.stat-row > span {
  border-radius: 50%;
  background: #e3f1fc;
  padding: 7px;
  color: #0d4f88;
  font-size: 15px;
  min-width: 33px;
  text-align: center;
}

.stat-row p,
.related-town p {
  margin: 0;
}

.stat-row b {
  font-size: 13px;
  display: block;
}

.stat-row small,
.related-town small {
  display: block;
  font-size: 10px;
  color: #617b98;
}

.related-town {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 9px 0;
}

.related-town img {
  width: 48px;
  height: 39px;
  border-radius: 5px;
  object-fit: cover;
}

.related-town b {
  font-size: 11px;
}

/* DEMO NOTICE AND FOOTER */

.demo-notice {
  text-align: center;
  font-size: 11px;
  color: #5c7791;
  margin: 8px 20px 20px;
}

.site-footer {
  background: #103b60;
  color: #e7f4fd;
  padding: 20px 5%;
  font-size: 12px;
}

.footer-container {
  max-width: 1400px;
  margin: auto;
}

.footer-top,
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.footer-logo {
  font-weight: bold;
  font-size: 18px;
}

.footer-brand {
  max-width: 470px;
}

.footer-links {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.footer-bottom {
  border-top: 1px solid #6a8499;
  padding-top: 10px;
}

.footer-bottom p {
  margin: 5px 0;
}

.brand-dot {
  color: #1671af;
}

/* TABLET */

@media (max-width: 1100px) {
  .home-shell {
    grid-template-columns: 185px minmax(0, 1fr);
  }

  .right-rail {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .right-panel {
    margin: 0;
  }

  .community-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav-inner {
    gap: 7px;
  }

  .nav-item {
    font-size: 10px;
  }

  .nav-member {
    display: none;
  }
}

/* MOBILE */

@media (max-width: 720px) {
  .coast-header {
    height: 95px;
  }

  .coast-head-inner {
    padding: 0 10px;
  }

  .brand img {
    width: min(76vw, 400px);
  }

  .search-preview,
  .header-verse {
    display: none;
  }

  .nav-inner {
    overflow-x: auto;
    justify-content: flex-start;
    white-space: nowrap;
  }

  .nav-item {
    flex-shrink: 0;
    font-size: 11px;
  }

  .home-shell {
    grid-template-columns: minmax(0, 1fr);
    padding: 9px;
  }

  .left-rail {
    order: 2;
  }

  .center-stage {
    order: 1;
  }

  .right-rail {
    order: 3;
    grid-column: 1;
    grid-template-columns: 1fr 1fr;
  }

  .profile-panel {
    display: block;
  }

  .chair-tile {
    min-height: 240px;
  }

  .chair-tile img {
    height: 240px;
  }

  .machine-hero {
    height: auto;
    min-height: 285px;
  }

  .hero-overlay {
    padding: 18px;
  }

  .machine-hero h1 {
    font-size: 32px;
  }

  .hero-features {
    gap: 7px;
  }

  .decade-bar {
    overflow-x: auto;
  }

  .decade-bar em {
    display: none;
  }

  .town-overview {
    grid-template-columns: 1fr;
  }

  .memory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .photo-card img {
    height: 120px;
  }

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

  .footer-top,
  .footer-bottom {
    flex-direction: column;
  }
}

/* SMALL PHONES */

@media (max-width: 440px) {
  .right-rail,
  .community-grid {
    grid-template-columns: 1fr;
  }

  .hero-features span {
    width: 48%;
  }

  .town-search {
    font-size: 11px;
  }

  .town-search strong {
    padding: 10px 6px;
  }

  .coming-strip {
    font-size: 12px;
  }

  .memory-grid {
    gap: 6px;
  }
}
