/* Johnny Castaway — island field journal styles. */
:root {
  --navy: #102a43;
  --navy-2: #173f5f;
  --sea: #2f80a5;
  --sea-soft: #dff3f4;
  --sand: #f7edd6;
  --paper: #fffdf7;
  --ink: #182b39;
  --muted: #647789;
  --coral: #e2755e;
  --sun: #f3bd55;
  --line: rgba(16, 42, 67, .14);
  --shadow: 0 22px 55px rgba(16, 42, 67, .14);
  --radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--ink);
  background: linear-gradient(180deg, rgba(223,243,244,.92), rgba(247,237,214,.98) 68%, #efe0bf), url("images/tile.jpg");
  background-attachment: fixed;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 18px; line-height: 1.82;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: 5px; z-index: 20; background: linear-gradient(90deg, var(--coral), var(--sun), var(--sea)); }
a { color: var(--navy-2); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--coral); }
img { max-width: 100%; height: auto; }

.site-header { position: sticky; top: 0; z-index: 10; border-bottom: 1px solid rgba(255,255,255,.28); background: rgba(16,42,67,.95); color: #fff; box-shadow: 0 8px 24px rgba(16,42,67,.15); backdrop-filter: blur(16px); }
.site-header-inner, .page-frame, .site-footer-inner { width: min(1180px, calc(100% - 36px)); margin: 0 auto; }
.site-header-inner { min-height: 78px; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 12px; min-width: max-content; color: #fff; text-decoration: none; }
.brand img { width: 44px; height: 44px; object-fit: cover; border-radius: 13px; border: 2px solid rgba(255,255,255,.7); background: var(--sea-soft); }
.brand strong { display: block; font-family: Georgia, serif; font-size: 1.13rem; letter-spacing: .02em; }
.brand small { display: block; margin-top: -3px; color: #b9dce2; font-size: .69rem; letter-spacing: .08em; text-transform: uppercase; }
.site-nav { display: flex; align-items: center; justify-content: flex-end; gap: 4px; flex: 1; flex-wrap: wrap; }
.site-nav a { padding: 9px 12px; border-radius: 999px; color: #d9eef0; font-size: .85rem; font-weight: 700; text-decoration: none; transition: background .18s ease, color .18s ease, transform .18s ease; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--navy); background: #fff; transform: translateY(-1px); }
.site-nav .nav-cta { color: var(--navy); background: var(--sun); }
.site-nav .nav-cta:hover { background: #ffd47e; }

.page-frame { padding: 54px 0 80px; }
.page-hero { position: relative; overflow: hidden; margin-bottom: 26px; padding: clamp(28px,5vw,54px); border: 1px solid rgba(255,255,255,.7); border-radius: var(--radius); background: linear-gradient(120deg, rgba(255,253,247,.97), rgba(223,243,244,.94)); box-shadow: var(--shadow); }
.page-hero::after { content: "✦"; position: absolute; right: 7%; top: 22px; color: rgba(226,117,94,.35); font-size: 5rem; transform: rotate(15deg); }
.eyebrow { margin: 0 0 8px; color: var(--coral); font-size: .74rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.page-hero h1, .home-page h1, .legacy-content h1, .legacy-content h2, .legacy-content h3 { color: var(--navy); font-family: Georgia, "Times New Roman", serif; line-height: 1.13; }
.page-hero h1 { max-width: 820px; margin: 0; font-size: clamp(2.25rem,5vw,4.4rem); }
.page-hero p { max-width: 720px; margin: 18px 0 0; color: #40596a; font-size: 1.08rem; line-height: 1.65; }
.page-card, .legacy-content { min-width: 0; padding: clamp(24px,5vw,52px); border: 1px solid rgba(255,255,255,.88); border-radius: var(--radius); background: rgba(255,253,247,.93); box-shadow: 0 14px 36px rgba(16,42,67,.09); }
.legacy-content { display: block; width: 100%; font-size: 1.06rem; line-height: 1.82; text-align: left; }
.legacy-content > img[src*="blank.gif"] { display: none; }
.legacy-content h1 { margin-top: 0; font-size: clamp(2rem,4vw,3.1rem); }
.legacy-content h2 { margin-top: 2rem; font-size: clamp(1.45rem,3vw,2rem); }
.legacy-content h3 { font-size: 1.25rem; }
.legacy-content hr { height: 1px; margin: 28px 0; border: 0; background: var(--line); }
.legacy-content p { max-width: 78ch; }
.legacy-content blockquote { margin: 24px 0; padding: 18px 22px; border-left: 4px solid var(--sun); border-radius: 0 15px 15px 0; background: #fff8e7; color: #5e503d; }
.legacy-content table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 22px 0; }
.legacy-content td, .legacy-content th { padding: 12px 14px; vertical-align: top; }
.legacy-content table:not([width]) td { border-bottom: 1px solid var(--line); }
.legacy-content table img, .legacy-content p img, .legacy-content h2 img { border-radius: 14px; box-shadow: 0 9px 20px rgba(16,42,67,.16); }
.legacy-content ul { padding-left: 1.25rem; }
.legacy-content li::marker { color: var(--coral); }
.archive-list { max-width: 78ch; padding-left: 1.35rem; }
.archive-list li { margin: 11px 0; padding-left: 5px; }
code { padding: 2px 6px; border-radius: 6px; background: #eaf3f2; color: var(--navy); font-size: .88em; }
.legacy-content .centre, .legacy-content center { text-align: center; }
.legacy-content .little, .legacy-content .tiny { color: var(--muted); font-size: .76rem; }
.legacy-content font { color: inherit !important; }
.legacy-content [style*="color: rgb(0, 0, 0)"], .legacy-content [style*="color: black"] { color: inherit !important; }
.asset-missing { display: inline-flex; align-items: center; min-height: 34px; padding: 7px 11px; border: 1px dashed rgba(16,42,67,.24); border-radius: 10px; background: #f4f7f5; color: var(--muted); font-size: .76rem; font-style: italic; }
.article-lead { max-width: 72ch; margin-top: 0; color: #243e50; font-size: clamp(1.18rem, 2vw, 1.42rem); font-weight: 600; line-height: 1.6; }
.feature-image { display: block; width: min(100%, 640px); margin: 28px auto; border-radius: 18px; box-shadow: 0 16px 32px rgba(16,42,67,.18); }
.feature-panel, .split-note { display: grid; grid-template-columns: minmax(120px, 220px) 1fr; align-items: center; gap: 24px; margin: 28px 0; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: #f4fbf9; }
.feature-panel img, .split-note img { width: 100%; max-height: 190px; object-fit: contain; border-radius: 14px; }
.feature-panel h2, .split-note h2 { margin-top: 0; }
.feature-panel p, .split-note p { margin-bottom: 0; }
.image-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: center; gap: 16px; margin: 28px 0; }
.image-strip img { width: 100%; height: 170px; object-fit: contain; padding: 8px; border: 1px solid var(--line); border-radius: 16px; background: #eef8f7; box-shadow: 0 8px 18px rgba(16,42,67,.1); }
.scene-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 28px 0; }
.scene-card { display: grid; grid-template-columns: 86px 1fr; gap: 16px; align-items: center; min-height: 150px; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: #fbfdf9; }
.scene-card img { width: 86px; height: 86px; object-fit: contain; padding: 6px; border-radius: 14px; background: var(--sea-soft); }
.scene-card h2 { margin: 0 0 6px; font-size: 1.23rem; }
.scene-card p { margin: 0; color: #4a6170; font-size: .98rem; line-height: 1.56; }
.callout { margin: 30px 0 6px; padding: 18px 22px; border-left: 5px solid var(--coral); border-radius: 0 15px 15px 0; background: #fff5dc; color: #314b5b; }
.timeline { display: grid; gap: 0; margin: 26px 0 32px; }
.timeline > div { display: grid; grid-template-columns: 58px 150px 1fr; gap: 16px; align-items: baseline; padding: 17px 0; border-bottom: 1px solid var(--line); }
.timeline > div:first-child { border-top: 1px solid var(--line); }
.timeline span { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--navy); color: #fff; font-size: .82rem; font-weight: 800; }
.timeline h2 { margin: 0; font-size: 1.25rem; }
.timeline p { margin: 0; color: #4a6170; }
.steps { padding-left: 1.6rem; }
.steps li { margin: 16px 0; padding-left: 8px; }
.steps li::marker { color: var(--coral); font-weight: 800; }
.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 26px 0; }
.news-grid article { padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: #fbfdf9; }
.news-grid span { color: var(--coral); font-size: .8rem; font-weight: 900; letter-spacing: .12em; }
.news-grid h2 { margin: 10px 0 8px; font-size: 1.25rem; }
.news-grid p { margin: 0; color: #4a6170; font-size: .96rem; line-height: 1.56; }
.link-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 26px; }
.link-grid a { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: #fbfdf9; text-decoration: none; }
.link-grid a:hover { border-color: var(--coral); background: #fff8e9; }
.link-grid strong { color: var(--navy); }
.link-grid span { color: #567080; font-size: .9rem; }

.home-page { display: grid; gap: 26px; }
.home-hero { display: grid; grid-template-columns: 1.06fr .94fr; align-items: center; gap: 34px; padding: clamp(26px,5vw,64px); overflow: hidden; border-radius: 30px; background: radial-gradient(circle at 85% 15%, rgba(243,189,85,.33), transparent 26%), linear-gradient(135deg,#fffdf7 0%,#e3f4f2 100%); box-shadow: var(--shadow); }
.home-hero h1 { margin: 0; max-width: 670px; font-size: clamp(2.8rem,6vw,6rem); letter-spacing: -.055em; }
.home-hero .lead { max-width: 560px; margin: 20px 0 0; color: var(--muted); font-size: clamp(1rem,1.6vw,1.18rem); }
.home-hero-art { position: relative; display: grid; place-items: center; }
.home-hero-art::before { content: ""; position: absolute; width: 86%; aspect-ratio: 1; border-radius: 50%; background: rgba(47,128,165,.12); }
.home-hero-art img { position: relative; width: min(100%,430px); border-radius: 24px; box-shadow: 0 26px 50px rgba(16,42,67,.22); transform: rotate(2deg); }
.button-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 11px 18px; border: 0; border-radius: 999px; background: var(--navy); color: #fff; font-weight: 800; text-decoration: none; box-shadow: 0 8px 16px rgba(16,42,67,.15); }
.button:hover { color: var(--navy); background: var(--sun); }
.button.secondary { border: 1px solid var(--line); background: #fff; color: var(--navy); box-shadow: none; }
.button.secondary:hover { border-color: var(--coral); color: var(--coral); background: #fff; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 16px 0 6px; }
.section-heading h2 { margin: 0; color: var(--navy); font-family: Georgia, serif; font-size: clamp(1.8rem,4vw,2.7rem); }
.section-heading p { margin: 0; color: var(--muted); }
.activity-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.activity-card { display: flex; flex-direction: column; gap: 13px; min-height: 230px; padding: 20px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,253,247,.93); box-shadow: 0 10px 25px rgba(16,42,67,.07); transition: transform .18s ease, box-shadow .18s ease; }
.activity-card:hover { transform: translateY(-4px); box-shadow: 0 18px 32px rgba(16,42,67,.13); }
.activity-card img { width: 74px; height: 74px; object-fit: contain; border-radius: 16px; background: var(--sea-soft); }
.activity-card h3 { margin: 0; color: var(--navy); font-family: Georgia, serif; font-size: 1.2rem; }
.activity-card p { margin: 0; color: var(--muted); font-size: .91rem; line-height: 1.5; }
.activity-card a { margin-top: auto; font-weight: 800; }
.home-band { display: grid; grid-template-columns: 1.1fr .9fr; gap: 18px; }
.home-note { padding: 30px; border-radius: 22px; background: var(--navy); color: #eaf7f5; box-shadow: var(--shadow); }
.home-note h2 { margin-top: 0; color: #fff; font-family: Georgia, serif; }
.home-note p { color: #c4e1e1; }
.home-note a { color: var(--sun); }
.home-mini { padding: 30px; border-radius: 22px; background: rgba(255,253,247,.9); border: 1px solid var(--line); }
.home-mini h2 { margin-top: 0; color: var(--navy); font-family: Georgia, serif; }
.research-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.research-stats div { min-height: 150px; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,253,247,.93); box-shadow: 0 10px 25px rgba(16,42,67,.06); }
.research-stats strong { display: block; color: var(--coral); font-family: Georgia, serif; font-size: clamp(2rem, 4vw, 3rem); line-height: 1; }
.research-stats span { display: block; margin-top: 12px; color: #496273; font-size: .9rem; line-height: 1.45; }
.home-story { padding: 28px; border-radius: 22px; background: rgba(255,253,247,.75); border: 1px solid var(--line); }
.home-timeline { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.home-timeline div { position: relative; padding: 18px 15px; border-top: 4px solid var(--sun); border-radius: 14px; background: #fbfdf9; }
.home-timeline span { display: inline-grid; place-items: center; width: 30px; height: 30px; margin-bottom: 12px; border-radius: 50%; background: var(--navy); color: #fff; font-size: .7rem; font-weight: 900; }
.home-timeline strong { display: block; color: var(--navy); font-family: Georgia, serif; font-size: 1.12rem; }
.home-timeline p { margin: 6px 0 0; color: #526978; font-size: .87rem; line-height: 1.48; }
.site-footer { padding: 28px 0 44px; color: #547081; }
.site-footer-inner { display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid rgba(16,42,67,.16); padding-top: 20px; font-size: .84rem; }
.site-footer a { color: var(--navy-2); font-weight: 800; }

/* Hide the original fixed-width shell after site.js moves its article into the new frame. */
body > table, body > div:not(.site-app), body > span:not(.site-app), body > center { display: none !important; }
.auto-style1, .auto-style2, .auto-style3, .auto-style4, .auto-style5, .auto-style6, .auto-style7, .auto-style8, .auto-style9, .auto-style10, .auto-style12, .auto-style13, .auto-style14, .auto-style15, .auto-style16, .auto-style17, .auto-style18, .auto-style19, .auto-style20, .auto-style21, .auto-style23, .auto-style24, .auto-style25, .auto-style26, .auto-style27, .auto-style28, .auto-style29 { font-family: inherit; color: inherit; font-size: inherit; }
.auto-style6, .auto-style4 { font-weight: inherit; }

@media (max-width: 900px) {
  .site-header-inner { align-items: flex-start; padding: 13px 0; flex-direction: column; gap: 10px; }
  .site-nav { justify-content: flex-start; width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; }
  .site-nav a { white-space: nowrap; }
  .page-frame { padding-top: 28px; }
  .home-hero, .home-band { grid-template-columns: 1fr; }
  .home-hero-art { order: -1; }
  .activity-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .news-grid { grid-template-columns: 1fr; }
  .research-stats { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .home-timeline { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 600px) {
  .site-header-inner, .page-frame, .site-footer-inner { width: min(100% - 22px,1180px); }
  .home-hero { padding: 26px 20px 30px; }
  .home-hero h1 { font-size: clamp(2.55rem,14vw,4rem); }
  .page-card, .legacy-content { padding: 22px 18px; border-radius: 18px; }
  .page-hero { padding: 28px 22px; border-radius: 18px; }
  .activity-grid { grid-template-columns: 1fr; }
  .research-stats, .home-timeline { grid-template-columns: 1fr; }
  .scene-grid, .link-grid { grid-template-columns: 1fr; }
  .feature-panel, .split-note { grid-template-columns: 1fr; }
  .feature-panel img, .split-note img { max-height: 220px; }
  .image-strip { grid-template-columns: 1fr; }
  .image-strip img { height: auto; max-height: 220px; }
  .timeline > div { grid-template-columns: 48px 1fr; }
  .timeline p { grid-column: 2; }
  .legacy-content table { display: block; overflow-x: auto; }
  .legacy-content td, .legacy-content th { min-width: 150px; }
  .site-footer-inner { flex-direction: column; }
}
