/* Instrument Serif */
@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/instrument-serif-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/instrument-serif-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Geist Mono */
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/geist-mono-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/geist-mono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

body {
  font-family: Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;
  color: #12161d;
  font-size: 16px;
}

main {
  padding-top: 1px;
}

#chemistry-jokes-banner {
  width: 100%;
}

ol li{
  margin: 0;
  padding: 20px 30px 20px 10px ;
}

.chemistry-jokes h1 {
  font-weight: 700;
}


li img {
  width: 100%;
}

.youtube-link {
  display: flex;
  justify-content: center;
}

.amazon-link {
  margin: 0;
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.amazon-link img {
  margin: 0 0 20px 0;
  width: 300px;
  height: 200px;
  object-fit: cover;
  border: #a2a2a2 solid 2px;
  border-radius: 10px;
  box-shadow: 3px 3px 6px 2px rgba(55, 55, 55, 0.308);
}

.amazon-link a {
  text-decoration: underline;
  color: #146eb4;
}

h1, h2, h3, h4{
  font-family: Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
}

li {
  margin: 8px 0;
}

#blog-heading h1 {
  margin: 30px 20px;
  font-size: 33px;
  color: #e7e7e7;
}

#blog-heading img {
  width: 45%;
}

#blog-heading {
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 90vh;
  background-color: #2b2b2b;
  color: #e7e7e7;
  text-align: center;
}

sub {
  font-size: 10px;
}

#blog-body {
  margin: 0;
  padding: 0;
  width: 100%;
  font-size: 15px;
  background-color: #f5f5f5;
}

#blog-center {
  margin: 0;
  padding: 3%;
}

#blog-left {
  display: none;
}

#blog-right {
  display: none;
}

article figure {
  margin: 50px 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

article figure a {
  text-decoration: none;
}

#timeline-infographic {
  width: 350px;
  height: 1313px;
  object-fit: cover;
  border: 1px solid rgb(184, 184, 184);
  box-shadow: 3px 3px 6px 2px rgba(55, 55, 55, 0.308);
}

figcaption {
  margin: 0 0 5px 0;
  font-size: 20px;
  font-weight: 600;
}

.download-button {
  margin: 0 10px;
  padding: 1px;
  width: 65px;
  height: 25px;
  font-size: 10px;
  border: 1px solid black;
  border-radius: 10px;
  background-color: #e7e7e7;
  color: #222222;
}

.download-button:hover {
  background-color: #4caf6a;
  color: white;
}

.download-button--page {
  width: auto;
  height: auto;
  padding: 10px 20px;
  font-size: 14px;
  border-radius: 8px;
  display: inline-block;
  text-align: center;
}

article figure div {
  margin: 10px 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

#email-subscription {
  display: none;
}

#blog-element-properties {
  border-collapse: collapse;
  border: 2px solid grey;
}

#blog-element-properties tr {
  background-color: rgb(244, 244, 244);
}

#blog-element-properties tr:nth-child(even) {
  background-color: #c5c5c5;
}

#blog-element-properties tr:hover {
  background-color: #4caf6a;
}

#blog-element-properties td {
padding: 5px;
}

#site-logo h1 {
  font-family: Helvetica;
}

h5 {
  text-align: center;
  font-size: 20px;
}


@media only screen and (min-width: 700px) {
  li img {
    width: 80%;
  }
}




/* ------------------------------------------------------------------------------------------- Desktop site */
@media only screen and (min-width: 1250px) {

  article {
    width: 50%;
  }

  #blog-left {
    width: 25%;
  }

  #blog-right {
    width: 25%;
  }

  li img {
    width: 400px;
  }

  .amazon-link {
    margin: 0;
    padding: 10px;
    display: flex;
    flex-direction: row;
    align-items:flex-start;
  }
  
  .amazon-link img {
    margin: 0 20px 0 0;
  }

  .mail-chimp-input-field input{
    padding: 2px; font-size:14px; background-color: #dedede; border: 1px solid grey; border-radius: 5px; height: 20px;
  }

  .subscribe-button input {
    background-color: #4caf6a; padding: 3px 5px 3px 5px; font-size:12px; border: 1px solid grey; border-radius: 8px;
  }

  .subscribe-button input:hover {
    cursor: pointer;
    background-color: #22c954;
  }

  #blog-heading h1 {
    font-size: 55px;
  }

  #blog-heading {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0% 20%;
  }

  #blog-heading img {
    width: 30%;
  }

  #blog-body {
    display: flex;
    background-color: #f5f5f5;
  }

  #blog-center {
    margin: 0;
    padding: 50px 0;
  }

  #blog-left {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    min-width: 20%;
  }
  
  #blog-right {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    min-width: 20%;
  }

  #sticky-email-subscription {
    display: block;
    position: sticky;
    top: 90px;
    margin: 50px 20px;
    padding: 20px;
    border: 2px solid #4caf6a;
    border-radius: 15px;
    background-color: rgb(255, 255, 255);
    box-shadow: 3px 3px 6px 2px rgba(55, 55, 55, 0.308);
  }

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

  #blog-facebook-icon {
    list-style: none;
    margin: 0 0 11px 0;
    display: inline-block;
    font-size: 30px;
    padding: 0 0 0 0;
    color: rgb(0, 0, 0);
    /* background-color: turquoise; */
  }
  
  #blog-facebook-icon:hover {
    color: #4267b2;
  }

  #blog-twitter-icon {
    list-style: none;
    margin: 0 0 11px 0;
    display: inline-block;
    font-size: 30px;
    padding: 0 0 0 0;
    color: rgb(0, 0, 0);
    /* background-color: turquoise; */
  }
  
  #blog-twitter-icon:hover {
    color: #1da1f2;
  }

  #blog-redit-icon {
    list-style: none;
    margin: 0px 0px;
    display: inline-block;
    font-size: 30px;
    padding: 0px 0px;
    color: rgb(0, 0, 0);
  }

  #blog-redit-icon:hover {
    color: #FF4500;
  }


}

/* ---- Element reference page styles ---- */

.element-symbol {
  font-size: 90px;
  font-weight: 700;
  color: #4caf6a;
  line-height: 1;
}

.element-name {
  font-size: 36px;
  font-weight: 600;
  color: #222222;
  margin: 8px 0 6px;
}

.element-tagline {
  font-size: 15px;
  color: #555555;
  margin: 0 0 16px;
}

.element-stats {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.element-stat-pill {
  background-color: #e0e0e0;
  border: 1px solid #cccccc;
  border-radius: 50px;
  padding: 5px 14px;
  font-size: 13px;
  color: #222222;
}

.element-section {
  padding: 36px 5%;
  max-width: 900px;
  margin: 0 auto;
}

.element-section h2 {
  font-size: 22px;
  font-weight: 600;
  color: #222222;
  margin: 0 0 18px;
  padding-bottom: 8px;
  border-bottom: 2px solid #4caf6a;
}

/* --- Two-column layout: Atomic Data + Electron Config --- */

.element-pair {
  background-color: #f5f5f5;
}

.element-pair .element-section {
  padding: 36px 5% 20px;
}

/* --- Atomic data card --- */

.element-atom-card {
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.05);
  max-width: 860px;
  margin: 32px auto;
  padding: 28px 24px;
}

#element-data .element-atom-card {
  margin-top: 0;
}

/* --- Breadcrumb --- */

.breadcrumb {
  padding-top: 69px;
  padding-bottom: 10px;
  padding-left: 24px;
}

.breadcrumb__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0;
  font-size: 13px;
  font-family: 'Geist Mono', monospace;
}

.breadcrumb__item {
  margin: 0;
  padding: 0;
}

.breadcrumb__item + .breadcrumb__item::before {
  content: '/';
  color: #ccc;
  padding: 0 5px;
}

.breadcrumb__item a {
  display: inline-block;
  color: #888;
  text-decoration: none;
}

.breadcrumb__item a:hover {
  color: #4caf6a;
}

.breadcrumb__item--current {
  color: #444;
}

.element-atom-card__visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid #e5e5e5;
}

.element-atom-card__table {
  /* single column — no flex overrides needed */
}

/* --- Atomic data card info column --- */

.element-atom-card__info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.element-atom-card__name {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 96px;
  font-weight: 400;
  font-style: italic;
  color: #222222;
  margin: 0;
  line-height: 1.1;
}

.element-atom-card__tag {
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.05em;
  padding: 5px 12px;
  border-radius: 999px;
}

.element-atom-card__tag--react {
  background-color: rgba(106, 187, 178, 0.2);
  color: #2e7d77;
}

.element-atom-card__tag--noble {
  background-color: rgba(234, 110, 82, 0.15);
  color: #7d2e1a;
}

.element-atom-card__tag--alkali {
  background-color: rgba(81, 148, 191, 0.15);
  color: #1e5f8e;
}

.element-atom-card__tag--alk {
  background-color: rgba(184, 199, 229, 0.3);
  color: #3d5a8a;
}
.element-atom-card__tag--halo {
  background-color: rgba(164, 145, 51, 0.15);
  color: #5a4a00;
}
.element-atom-card__tag--metallo {
  background-color: rgba(248, 165, 61, 0.15);
  color: #7a4a00;
}
.element-atom-card__tag--postmet {
  background-color: rgba(202, 185, 169, 0.3);
  color: #5a4a3a;
}
.element-atom-card__tag--transmet {
  background-color: rgba(172, 189, 173, 0.3);
  color: #3a5a3d;
}
.element-atom-card__tag--lant {
  background-color: rgba(168, 165, 181, 0.2);
  color: #000;
}
.element-atom-card__tag--acti {
  background-color: rgba(146, 114, 166, 0.2);
  color: #000;
}

.element-atom-card > h2 {
  font-size: 22px;
  font-weight: 600;
  color: #222222;
  margin: 0 0 20px;
  padding-bottom: 8px;
  border-bottom: 2px solid #4caf6a;
}

.electron-config__notation {
  font-family: 'Geist Mono', monospace;
  font-size: 32px;
  font-weight: 500;
  color: #222222;
  margin: 0 0 16px 0;
  letter-spacing: 0.02em;
}

.electron-config__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.electron-config__table-col {
  width: 100%;
}

.element-atom-card__table h2 {
  font-size: 22px;
  font-weight: 600;
  color: #222222;
  margin: 0 0 18px;
  padding-bottom: 8px;
  border-bottom: 2px solid #4caf6a;
}

/* Shell table used inside .hero-bohr — compact width */
.element-data-table--shell {
  width: auto;
  min-width: 140px;
}

/* --- Atomic data table --- */

.element-data-table {
  width: 100%;
  border-collapse: collapse;
}

.element-data-table tr {
  border-bottom: 1px solid #e5e5e5;
}

.element-data-table tr:nth-child(even) {
  background-color: #f0f0f0;
}

.element-data-table td {
  padding: 6px 10px;
  font-size: 13px;
}

.element-data-table td:first-child {
  font-weight: 500;
  color: #555555;
  width: 45%;
}

.element-data-table thead th {
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  color: #555555;
  border-bottom: 2px solid #e5e5e5;
  text-align: left;
}

.element-data-table tfoot td {
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 600;
  border-top: 2px solid #e5e5e5;
  color: #222222;
}

/* --- Bohr model --- */

.bohr-model {
  display: flex;
  justify-content: center;
  margin: 16px 0;
}

/* --- Isotopes table --- */

.isotopes-table th:nth-child(3),
.isotopes-table td:nth-child(3),
.isotopes-table th:nth-child(4),
.isotopes-table td:nth-child(4),
.isotopes-table th:nth-child(5),
.isotopes-table td:nth-child(5) {
  display: none;
}

/* --- Abundance charts --- */

.abundance-charts {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.abundance-chart {
  padding: 16px 18px;
  background: #f9f9f9;
  border-radius: 8px;
}

.chart-title {
  font-size: 12px;
  font-weight: 600;
  color: #555;
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.chart-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 3px 0;
  padding: 3px 4px;
  border-radius: 4px;
}

.chart-row--highlight {
  background: rgba(76, 175, 106, 0.09);
}

.chart-row--highlight .chart-label {
  font-weight: 700;
  color: #4caf6a;
}

.chart-label {
  width: 90px;
  font-size: 13px;
  color: #555;
  flex-shrink: 0;
}

.chart-track {
  flex: 1;
  background: #e2e2e2;
  border-radius: 4px;
  height: 22px;
  overflow: hidden;
}

.chart-bar {
  height: 100%;
  border-radius: 4px;
  min-width: 3px;
}

.chart-value {
  width: 36px;
  font-size: 12px;
  font-weight: 600;
  color: #777;
  text-align: right;
  flex-shrink: 0;
}

.chart-bar--h      { background: #4caf6a; }
.chart-bar--other  { background: #5b8dd9; }
.chart-bar--other2 { background: #888888; }
.chart-bar--trace  { background: #bbbbbb; }
.chart-bar--he { background: #ea6e52; }
.chart-bar--li { background: #5194bf; }

/* --- Donut (pie) chart --- */

.pie-chart-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin-top: 4px;
}

.pie-chart {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  flex-shrink: 0;
  background: conic-gradient(
    #4caf6a 0% 75%,
    #5b8dd9 75% 98%,
    #bbbbbb 98% 100%
  );
  mask: radial-gradient(farthest-side, transparent 52%, black 52%);
  -webkit-mask: radial-gradient(farthest-side, transparent 52%, black 52%);
}

.pie-legend {
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
}

.pie-legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #444;
}

.pie-legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

@media (min-width: 480px) {
  .pie-chart-container {
    flex-direction: row;
    align-items: center;
  }
}

/* --- History timeline --- */

.history-timeline {
  margin-top: 8px;
}

.timeline-event {
  display: flex;
  gap: 14px;
  margin-bottom: 18px;
}

.timeline-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 52px;
  flex-shrink: 0;
}

.timeline-year {
  font-size: 11px;
  font-weight: 700;
  color: #4caf6a;
  white-space: nowrap;
  margin-bottom: 4px;
  line-height: 1;
}

.timeline-dot-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  width: 100%;
}

.timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #4caf6a;
  border: 2px solid #f5f5f5;
  outline: 1px solid #4caf6a;
  flex-shrink: 0;
}

.timeline-line {
  width: 2px;
  background: #ddd;
  flex: 1;
  min-height: 20px;
}

.timeline-content {
  padding: 2px 14px 8px;
  background: #f9f9f9;
  border-radius: 8px;
  font-size: 13px;
  color: #444;
  line-height: 1.6;
  flex: 1;
}

/* --- Image gallery grid --- */

.element-gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

.element-gallery-grid figure {
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #eee;
}

.element-gallery-grid figure img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.element-gallery-grid figcaption {
  padding: 7px 10px;
  font-size: 12px;
  color: #666666;
  background: #fafafa;
}

/* --- Safety box --- */

.safety-box {
  background-color: #fffbeb;
  border-left: 4px solid #f59e0b;
  border-radius: 4px;
  padding: 16px 20px;
}

.safety-box ul {
  margin: 0;
  padding-left: 18px;
}

.safety-box li {
  margin: 7px 0;
  font-size: 14px;
}

/* --- Related elements grid --- */

.related-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.related-card {
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  padding: 14px;
  text-decoration: none;
  color: #222222;
  background-color: #ffffff;
  transition: border-color 0.2s, box-shadow 0.2s;
  display: block;
}

.related-card:hover {
  border-color: #4caf6a;
  box-shadow: 0 2px 8px rgba(76, 175, 106, 0.15);
  color: #222222;
}

.related-card-symbol {
  font-size: 24px;
  font-weight: 700;
  color: #4caf6a;
}

.related-card-name {
  font-weight: 600;
  font-size: 14px;
  margin: 3px 0 2px;
}

.related-card-desc {
  font-size: 12px;
  color: #777777;
  margin: 0;
}

/* --- FAQ accordion --- */

.faq-item {
  border-bottom: 1px solid #e5e5e5;
  padding: 2px 0;
}

.faq-item summary {
  font-weight: 500;
  font-size: 15px;
  padding: 12px 0;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: '+';
  font-size: 18px;
  color: #4caf6a;
  flex-shrink: 0;
}

.faq-item[open] summary::after {
  content: '\2212';
}

.faq-item p {
  padding: 0 0 14px;
  color: #444444;
  font-size: 14px;
  line-height: 1.7;
}

/* --- Download grid --- */

.download-grid {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}

/* --- Hero table-of-contents nav --- */

.hero-toc {
  display: none;
}

.page-sidebar {
  display: none;
}

.hero-toc__label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #111111;
  margin-bottom: 10px;
}

.hero-toc__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hero-toc__list a {
  display: block;
  font-size: 13px;
  color: #555555;
  text-decoration: none;
  padding-top: 5px;
}

.hero-toc__list a:hover {
  color: #4caf6a;
  text-decoration: underline;
}

/* --- Video container (kept for reuse) --- */

.video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  margin: 20px 0;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* --- Desktop breakpoint --- */

@media only screen and (min-width: 850px) {
  .isotopes-table th:nth-child(3),
  .isotopes-table td:nth-child(3),
  .isotopes-table th:nth-child(4),
  .isotopes-table td:nth-child(4),
  .isotopes-table th:nth-child(5),
  .isotopes-table td:nth-child(5) {
    display: table-cell;
  }

  .element-pair {
    display: flex;
    align-items: flex-start;
    max-width: 900px;
    margin: 0 auto;
  }

  .element-pair > section {
    flex: 1;
  }

  .element-pair .element-section {
    max-width: none;
    padding: 36px 24px 24px;
    margin: 0;
  }

  .element-gallery-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .element-gallery-grid figure img {
    height: 200px;
  }

  .element-atom-card__visual {
    flex-direction: row;
    justify-content: flex-start;
    gap: 32px;
  }

  .element-atom-card__info {
    align-items: flex-start;
    text-align: left;
  }

  .element-atom-card__tag {
    white-space: nowrap;
  }

  .electron-config__body {
    flex-direction: row;
    align-items: flex-start;
    gap: 40px;
  }

  .electron-config__table-col {
    flex: 1;
  }

}

@media only screen and (min-width: 1250px) {
  .element-section {
    padding: 40px 0;
  }

  .element-pair {
    max-width: 900px;
  }

  .element-pair .element-section {
    padding: 40px 24px 28px;
  }

  .element-symbol {
    font-size: 110px;
  }

  .element-name {
    font-size: 48px;
  }

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

  .element-gallery-grid figure img {
    height: 220px;
  }

  .page-layout {
    display: flex;
    align-items: stretch;
    padding: 0 4% 28px;
    gap: 2%;
  }

  .page-sidebar {
    display: block;
    width: 22%;
    flex-shrink: 0;
    padding-top: 102px;
  }

  .sidebar-content {
    position: sticky;
    top: 28px;
    bottom: 28px;
  }

  .sidebar-nav-card {
    margin-top: 0;
    margin-bottom: 12px;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 14px 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  }

  .sidebar-nav-card__label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #111111;
    margin-bottom: 10px;
  }

  .sidebar-nav-card__list {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .sidebar-nav-card__list a {
    display: block;
    font-size: 13px;
    color: #555555;
    text-decoration: none;
    padding-top: 5px;
  }

  .sidebar-nav-card__list a:hover {
    color: #4caf6a;
    text-decoration: underline;
  }

  .hero-toc {
    display: block;
    margin-top: 0;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 14px 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  }

  .page-content {
    flex: 1;
    min-width: 0;
  }

  .page-content .element-atom-card {
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
}

/* --- Hero element tile (periodic-table-style card in the hero) --- */

.hero-tile {
  width: 95px;
  height: 110px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #222222;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  padding: 8px;
  box-sizing: border-box;
  position: relative;
}
.hero-tile.react {
  background-color: #6abbb2;
}
.hero-tile.noble {
  background-color: #ea6e52;
}
.hero-tile.alkali {
  background-color: #5194bf;
}
.hero-tile.alk {
  background-color: #b8c7e5;
}
.hero-tile.halo {
  background-color: #a49133;
}
.hero-tile.metallo {
  background-color: #f8a53d;
}
.hero-tile.postmet {
  background-color: #cab9a9;
}
.hero-tile.transmet {
  background-color: #acbdad;
}
.hero-tile.lant {
  background-color: #a8a5b5;
  color: #000;
}
.hero-tile.acti {
  background-color: #9272a6;
  color: #000;
}
.hero-tile__num {
  position: absolute;
  top: 7px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 11px;
  font-weight: 500;
  opacity: 0.9;
}
.hero-tile__sym {
  font-size: 46px;
  font-weight: 700;
  line-height: 1;
  margin-top: 8px;
}
.hero-tile__name {
  font-size: 9px;
  margin-top: 4px;
  letter-spacing: 0.03em;
}
.hero-tile__mass {
  font-size: 9px;
  opacity: 0.85;
  margin-top: 2px;
}
.hero-tile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.element-tag {
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 50px;
  background-color: #e8f5f4;
  border: 1px solid #6abbb2;
  color: #1a5c57;
  font-weight: 500;
}
.element-tag--category {
  background-color: #6abbb2;
  border-color: #6abbb2;
  color: #ffffff;
}
/* --- Hero tile legend annotation --- */
.hero-tile-legend {
  display: flex;
  align-items: flex-start;
}

.htl-lines {
  display: flex;
  flex-direction: column;
}

.htl-lines div {
  border-top: 1px solid #999;
  position: relative;
  height: 0;
  width: 20px;
}

/* y-centers in 110px tile: num≈11px, sym≈47px, name≈79px, mass≈90px */
.htl-line-1 { top: 11px; }
.htl-line-2 { top: 47px; }
.htl-line-3 { top: 79px; }
.htl-line-4 { top: 90px; }

.htl-labels {
  display: flex;
  flex-direction: column;
  height: 110px;
  text-align: left;
  font-size: 11px;
  color: #666;
  white-space: nowrap;
  padding-left: 3px;
}

.htl-label-1 { margin-top: 6px;  height: 11px; }
.htl-label-2 { margin-top: 25px; height: 11px; }
.htl-label-3 { margin-top: 21px; height: 11px; }
.htl-label-4 { margin-top: 0px;  height: 11px; }

@media (min-width: 850px) {
  #element-data .element-atom-card {
    margin-top: 0;
  }

  .hero-tile {
    width: 115px;
    height: 130px;
  }
  .hero-tile__sym {
    font-size: 54px;
  }

  /* y-centers in 130px tile: num≈11px, sym≈57px, name≈93px, mass≈104px */
  .htl-line-2 { top: 57px; }
  .htl-line-3 { top: 93px; }
  .htl-line-4 { top: 104px; }

  .htl-labels { height: 130px; }
  .htl-label-2 { margin-top: 35px; }
  .htl-label-3 { margin-top: 25px; }
  .htl-label-4 { margin-top: 0px;  }
}
