/* The Living Coast — Electrolips */

:root {
  --bg: #041014;
  --bg-soft: #071a20;
  --panel: rgba(8, 28, 35, 0.95);
  --panel-strong: rgba(11, 38, 47, 0.97);
  --text: #e8f4f5;
  --muted: #a9c2c7;
  --line: #245969;
  --accent: #67d2e5;
  --accent-soft: #b9f3fa;
  --green: #78d6ad;
  --gold: #e8b85f;
  --danger: #d6816f;
  --shadow: rgba(0, 0, 0, 0.38);
  --max-width: 1260px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    linear-gradient(rgba(1, 8, 11, 0.90), rgba(1, 8, 11, 0.97)),
    radial-gradient(circle at 12% 10%, rgba(20, 103, 123, 0.38), transparent 30%),
    radial-gradient(circle at 88% 16%, rgba(20, 111, 78, 0.23), transparent 27%),
    #041014;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.72;
}

a {
  color: var(--accent-soft);
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid var(--line);
  background: rgba(1, 10, 13, 0.95);
  backdrop-filter: blur(12px);
}

.header-inner {
  width: min(var(--max-width), calc(100% - 32px));
  margin: 0 auto;
  padding: 12px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  color: #fff;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-decoration: none;
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.top-nav a,
.top-nav button {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px 12px;
  background: #0b2028;
  color: var(--text);
  font: inherit;
  font-size: 0.91rem;
  cursor: pointer;
}

.top-nav a:hover,
.top-nav button:hover {
  background: #123a47;
  text-decoration: none;
}

main {
  width: min(var(--max-width), calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  margin: 52px 0 20px;
  padding: 44px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(13, 58, 70, 0.96), rgba(5, 20, 26, 0.97)),
    var(--panel);
  box-shadow: 0 22px 60px var(--shadow);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.78rem;
  font-weight: 800;
}

h1 {
  margin: 0;
  max-width: 920px;
  font-size: clamp(2.5rem, 6vw, 5.5rem);
  line-height: 1;
  letter-spacing: -0.045em;
}

.subtitle {
  max-width: 960px;
  margin: 22px 0 0;
  color: var(--accent-soft);
  font-size: clamp(1.08rem, 2.5vw, 1.55rem);
  line-height: 1.45;
}

.inventor-credit {
  margin-top: 26px;
  padding: 18px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 9px 14px;
  align-items: baseline;
  border-left: 4px solid var(--gold);
  background: rgba(81, 57, 13, 0.34);
}

.inventor-credit strong {
  color: #fff0bd;
  font-size: 1.45rem;
}

.date-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.date-card {
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(3, 21, 27, 0.70);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.date-label {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.72rem;
}

.date-card strong {
  color: var(--accent-soft);
  font-size: 1.2rem;
}

.credit-banner,
.notice {
  margin-top: 14px;
  padding: 18px 20px;
  border-radius: 10px;
}

.credit-banner {
  border: 1px solid #75622b;
  background: rgba(73, 54, 11, 0.44);
  color: #f5e8b8;
}

.notice {
  border: 1px solid #315d67;
  background: rgba(15, 49, 58, 0.55);
  color: #d5e9ec;
}

.page-grid {
  display: grid;
  grid-template-columns: minmax(235px, 300px) minmax(0, 1fr);
  gap: 24px;
  margin-top: 24px;
  align-items: start;
}

.contents {
  position: sticky;
  top: 86px;
  max-height: calc(100vh - 106px);
  overflow: auto;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: 0 16px 35px var(--shadow);
}

.contents h2 {
  margin: 0 0 12px;
  font-size: 1.25rem;
}

.contents ol {
  margin: 0;
  padding-left: 21px;
}

.contents li {
  margin: 7px 0;
  color: var(--muted);
  line-height: 1.4;
}

.contents a {
  font-size: 0.9rem;
}

.contents a.active {
  color: #fff;
  font-weight: 800;
}

.article {
  min-width: 0;
  padding: 35px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: 0 18px 46px var(--shadow);
}

.article section {
  scroll-margin-top: 96px;
}

.article section + section {
  margin-top: 58px;
  padding-top: 10px;
}

.original-article {
  padding: 28px;
  border: 1px solid #7e672d;
  border-radius: 14px;
  background:
    linear-gradient(145deg, rgba(67, 51, 13, 0.29), rgba(8, 28, 35, 0.95));
}

.article-meta {
  margin-bottom: 22px;
  padding: 14px 16px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(5, 23, 29, 0.86);
  color: var(--muted);
  font-size: 0.88rem;
}

.article-meta strong {
  color: var(--gold);
}

.review-meta strong {
  color: var(--accent-soft);
}

h2 {
  margin: 0 0 18px;
  color: var(--accent-soft);
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  line-height: 1.2;
}

h3 {
  margin-top: 30px;
  color: var(--accent);
  font-size: 1.2rem;
  line-height: 1.3;
}

p {
  margin: 1rem 0;
}

ul,
ol {
  padding-left: 1.45rem;
}

li {
  margin: 0.48rem 0;
}

blockquote {
  margin: 24px 0;
  padding: 20px 24px;
  border-left: 5px solid var(--accent);
  border-radius: 8px;
  background: rgba(15, 58, 69, 0.72);
  color: #f3fbfc;
  font-size: 1.06rem;
}

.highlight {
  padding: 18px 20px;
  border: 1px solid #2f735c;
  border-radius: 10px;
  background: rgba(17, 75, 57, 0.42);
  color: #d9fff0;
}

.timeline {
  display: grid;
  gap: 12px;
  margin: 24px 0;
}

.timeline div {
  padding: 17px 18px;
  border-left: 4px solid var(--gold);
  background: var(--panel-strong);
}

.timeline strong,
.timeline span {
  display: block;
}

.timeline strong {
  color: #ffe8a7;
  margin-bottom: 4px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0;
}

.info-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel-strong);
}

.info-card h3 {
  margin-top: 0;
}

.table-wrap {
  overflow-x: auto;
  margin: 24px 0;
}

table {
  width: 100%;
  min-width: 650px;
  border-collapse: collapse;
  background: #06171d;
}

th,
td {
  padding: 13px 14px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: #0d3440;
  color: var(--accent-soft);
}

.roadmap {
  counter-reset: roadmap;
  list-style: none;
  padding: 0;
}

.roadmap li {
  position: relative;
  margin: 0 0 15px;
  padding: 18px 18px 18px 58px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-strong);
}

.roadmap li::before {
  counter-increment: roadmap;
  content: counter(roadmap);
  position: absolute;
  left: 16px;
  top: 16px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #041014;
  font-weight: 900;
}

.final-principle {
  padding: 23px;
  border: 1px solid var(--accent);
  border-radius: 11px;
  background: linear-gradient(145deg, rgba(18, 67, 77, 0.86), rgba(9, 34, 42, 0.96));
  font-size: 1.1rem;
  font-weight: 800;
}

.references {
  color: var(--muted);
}

.references a {
  overflow-wrap: anywhere;
}

.bottom-view-space {
  min-height: 1500px;
}

.top-button {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 70;
  display: none;
  padding: 11px 16px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: #0d3440;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 25px var(--shadow);
}

.top-button.visible {
  display: block;
}

footer {
  padding: 30px 18px;
  border-top: 1px solid var(--line);
  background: #01080a;
  color: var(--muted);
  text-align: center;
}

footer p {
  margin: 5px 0;
}

footer strong {
  color: var(--accent-soft);
}

@media (max-width: 960px) {
  .page-grid {
    grid-template-columns: 1fr;
  }

  .contents {
    position: static;
    max-height: none;
  }

  .contents ol {
    columns: 2;
    column-gap: 32px;
  }
}

@media (max-width: 700px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-nav {
    justify-content: flex-start;
  }

  .hero,
  .article,
  .original-article {
    padding: 22px;
  }

  .hero {
    margin-top: 28px;
  }

  .date-grid,
  .card-grid {
    grid-template-columns: 1fr;
  }

  .contents ol {
    columns: 1;
  }

  .bottom-view-space {
    min-height: 1000px;
  }
}

@media print {
  body {
    background: #fff;
    color: #000;
  }

  .site-header,
  .contents,
  .top-button,
  .bottom-view-space {
    display: none !important;
  }

  main {
    width: 100%;
  }

  .hero,
  .article,
  .original-article,
  .notice,
  .credit-banner,
  .info-card,
  .roadmap li {
    background: #fff;
    color: #000;
    box-shadow: none;
  }

  .page-grid {
    display: block;
  }

  h1,
  h2,
  h3,
  .subtitle,
  a,
  footer strong {
    color: #000;
  }

  blockquote,
  .highlight,
  .final-principle {
    background: #f3f3f3;
    color: #000;
  }

  footer {
    background: #fff;
    color: #000;
  }
}
