@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;450;500;550;600;700&display=swap');

/* Material 3 color, type, shape, elevation, and state roles. */
:root {
  --md-primary: #315da8;
  --md-on-primary: #fff;
  --md-primary-container: #d9e2ff;
  --md-on-primary-container: #001944;
  --md-secondary-container: #dfe3f4;
  --md-on-secondary-container: #171c2b;
  --md-surface: #f8f9ff;
  --md-surface-container-low: #f2f3fc;
  --md-surface-container: #eef0f9;
  --md-surface-container-high: #e7e9f3;
  --md-on-surface: #1a1b20;
  --md-on-surface-variant: #44474f;
  --md-outline: #74777f;
  --md-outline-variant: #c4c6d0;
  --md-elevation-1: 0 1px 2px #1a1b2026, 0 1px 3px 1px #1a1b200d;
  --md-elevation-2: 0 2px 6px 2px #1a1b2014, 0 1px 2px #1a1b2026;
  --blue: var(--md-primary);
  --ink: var(--md-on-surface);
  --muted: var(--md-on-surface-variant);
  --line: var(--md-outline-variant);
  --surface: var(--md-surface-container-low);
  --selected: var(--md-primary-container);
  --font: Roboto, Arial, sans-serif;
  --ease: cubic-bezier(.2, 0, 0, 1);
}

body { background: var(--md-surface); line-height: 1.5; }
.wrap { max-width: 1200px; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid var(--md-primary); outline-offset: 4px; }
button, a { transition: background-color 160ms, color 160ms, box-shadow 200ms var(--ease), transform 200ms var(--ease); }
.notice { background: var(--md-surface-container); }
.notice .wrap { min-height: 40px; }
.version-link { display: inline-flex; align-items: center; gap: 12px; min-height: 40px; color: var(--md-primary); font-size: 12px; font-weight: 500; }
.version-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.header { height: 96px; }
.brand { font-size: 18px; letter-spacing: 0; font-weight: 600; }
.brand > span > span { font-weight: 400; }
.brand svg { fill: var(--md-surface); }
nav { gap: 8px; }
nav a { display: inline-flex; align-items: center; min-height: 48px; padding: 12px 18px; border-radius: 28px; font-size: 14px; font-weight: 500; letter-spacing: .1px; }
nav a:hover { background: var(--md-secondary-container); color: var(--md-on-secondary-container); }
.header-link { border-radius: 24px; padding: 12px 16px; gap: 14px; color: var(--md-primary); font-weight: 500; }
.header-link:hover { background: #315da80d; }

.hero { grid-template-columns: 1.12fr 1fr; min-height: 470px; padding: 36px 36px 36px 44px; gap: 32px; background: var(--md-primary-container); border: 0; border-radius: 28px; }
h1 { color: var(--md-on-primary-container); font-size: 57px; font-weight: 400; line-height: 64px; letter-spacing: -.25px; margin-bottom: 20px; }
h1 > span { color: var(--md-primary); }
.hero-copy > p { color: #334667; font-size: 16px; line-height: 24px; margin-bottom: 24px; max-width: 370px; }
.button { position: relative; isolation: isolate; overflow: hidden; min-height: 52px; border-radius: 28px; padding: 14px 24px; gap: 20px; font-size: 14px; line-height: 20px; font-weight: 500; letter-spacing: .1px; }
.primary { color: var(--md-on-primary); background: var(--md-primary); box-shadow: var(--md-elevation-1); }
.primary:hover { color: var(--md-on-primary); background: #2c559d; box-shadow: var(--md-elevation-2); }
.primary:active { box-shadow: none; transform: scale(.98); }
.hero-copy > .text-link { border-radius: 24px; padding: 10px 12px; margin-left: -12px; color: var(--md-primary); font-size: 14px; font-weight: 500; }
.hero-copy > .text-link:hover { background: #315da810; }
.hero-art { min-height: 365px; border-radius: 24px; background-color: #23468b; background-image: none; }
.molecule { width: 110%; height: 110%; top: -4%; left: -5%; }

.section { padding-block: 64px; }
h2 { font-size: 32px; line-height: 40px; font-weight: 400; letter-spacing: 0; }
.section-head { margin-bottom: 28px; }
.section-head > p { font-size: 16px; line-height: 24px; }
.directory-layout { grid-template-columns: 256px minmax(0, 1fr); gap: 32px; }
.directory-sidebar { padding-top: 4px; }
.directory-sidebar label, .filter-label { font-size: 14px; line-height: 20px; letter-spacing: .1px; font-weight: 500; }
.search-box { min-height: 56px; border: 1px solid transparent; border-radius: 28px; background: var(--md-surface-container-high); padding: 12px 18px; gap: 12px; margin-top: 12px; margin-bottom: 28px; }
.search-box:focus-within { border-color: var(--md-primary); outline: 2px solid var(--md-primary); outline-offset: -2px; }
.search-box svg { width: 20px; height: 20px; stroke-width: 1.8; }
.search-box input { line-height: 24px; font-size: 16px; }
.search-box kbd { border-color: #a7aab5; border-radius: 4px; }
.filter-label { margin-bottom: 12px; }
.filters { gap: 6px; }
.filters button { position: relative; isolation: isolate; overflow: hidden; min-height: 48px; border: 1px solid transparent; border-radius: 28px; padding: 12px 18px; font-weight: 500; letter-spacing: .1px; }
.filters button:hover { background: #1a1b200a; }
.filters button.active { color: var(--md-on-secondary-container); background: var(--md-secondary-container); border: 1px solid transparent; }
.filters button.active::before { content: ''; width: 18px; height: 18px; margin-right: 12px; flex-shrink: 0; background: currentColor; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m9 16.2-4.2-4.2-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/contain no-repeat; }
.filters button.active > span { margin-left: auto; }
.sidebar-note { padding: 18px 14px 0; border-top: 0; margin-top: 16px; font-size: 14px; line-height: 22px; }
.sidebar-note button { font-size: 14px; min-height: 44px; }
.directory-layout > div { padding: 22px 24px; border-radius: 20px; background: #fff; box-shadow: var(--md-elevation-1); }
.index-heading { font-size: 12px; line-height: 16px; padding: 0 0 16px; border-bottom-color: var(--md-outline-variant); }
.peptide-row { position: relative; isolation: isolate; overflow: hidden; min-height: 84px; border-bottom-color: #e2e3eb; border-radius: 8px; padding: 16px 12px 16px 4px; gap: 16px; }
.peptide-row:last-child { border-bottom: 0; }
.peptide-row:hover { background: #315da808; }
.peptide-row:focus-visible { outline-offset: -3px; }
.row-number { display: grid; place-items: center; width: 40px; height: 40px; min-width: 40px; border-radius: 50%; background: var(--md-primary-container); color: var(--md-on-primary-container); font-size: 14px; font-weight: 500; }
.peptide-name { font-size: 22px; line-height: 28px; font-weight: 400; letter-spacing: 0; }
.row-arrow { display: grid; place-items: center; width: 36px; height: 36px; min-width: 36px; border-radius: 50%; color: var(--md-on-surface-variant); font-size: 24px; }
.index-status { font-size: 12px; line-height: 16px; }
.index-note { font-size: 14px; line-height: 20px; margin-top: 12px; }
.empty-state button { padding: 10px 16px; margin-top: 10px; border-radius: 24px; background: var(--md-primary-container); color: var(--md-on-primary-container); text-decoration: none; font-weight: 500; }

.articles-section { background: transparent; }
.articles-section .section { padding-top: 24px; }
.article-grid { gap: 24px; grid-template-columns: 1.08fr 1fr; }
.article-card { background: var(--md-surface-container); border-radius: 20px; overflow: hidden; }
.featured-article { padding-bottom: 24px; border: 0; }
.article-image { height: 240px; border-radius: 16px; }
.featured-article .article-image { width: calc(100% - 16px); margin: 8px 8px 0; }
.featured-article .article-meta, .featured-article h3, .featured-article > p { margin-inline: 24px; }
.featured-article .article-meta { margin-top: 20px; }
.featured-article h3 { font-size: 24px; line-height: 32px; letter-spacing: 0; margin-block: 10px 12px; }
.article-meta { font-size: 12px; line-height: 16px; }
h3 { font-size: 22px; line-height: 28px; letter-spacing: 0; }
.article-card > p { font-size: 16px; line-height: 24px; }
.supporting-article { padding: 16px; border: 0; gap: 0 20px; grid-template-columns: 128px minmax(0, 1fr); }
.supporting-article:last-child { padding: 16px; }
.supporting-article .article-image { min-height: 176px; }
.supporting-article .article-meta { margin-top: 3px; font-size: 12px; line-height: 16px; }
.supporting-article h3 { font-size: 22px; line-height: 28px; margin-block: 10px; }
.supporting-article > p { font-size: 14px; line-height: 20px; }
.image-one { background: #e1e7f8; }
.paper-visual { border-radius: 8px 8px 0 0; border-color: #c4cbe0; box-shadow: 8px 8px 0 #c8d2ea; }
.paper-visual > span { font-size: 14px; }
.paper-visual b { font-size: 14px; }
.image-two { background: var(--md-primary); }
.image-three { background: #dfe4f3; }

.resources-grid { gap: 24px; }
.resources-grid > a { position: relative; isolation: isolate; overflow: hidden; padding: 24px; border: 1px solid var(--md-outline-variant); border-radius: 16px; background: #fff; }
.resources-grid > a:hover { background: var(--md-surface-container-low); box-shadow: var(--md-elevation-1); }
.resources-grid h3 { font-size: 22px; line-height: 28px; }
.resources-grid h3 > span { color: var(--md-primary); }
.resources-grid p { font-size: 16px; line-height: 24px; }
.resource-domain { font-size: 12px; line-height: 16px; margin-top: 24px; }
footer { border: 0; padding: 0 28px; background: var(--md-surface-container); border-radius: 28px 28px 0 0; }
.footer-brand { font-size: 22px; line-height: 28px; font-weight: 500; letter-spacing: 0; }
.footer-top button, .footer-top > a:last-child { border-radius: 24px; padding-inline: 12px; font-size: 14px; min-height: 48px; }
.footer-top button:hover, .footer-top > a:last-child:hover { background: #315da80d; }
.footer-top > div { gap: 4px; }
.footer-bottom { border-top-color: var(--md-outline-variant); }
.footer-note { font-size: 13px; }

dialog { border: 0; border-radius: 28px; background: var(--md-surface-container-high); box-shadow: 0 12px 32px #0003; padding: 56px 40px 32px; }
dialog::backdrop { background: #1a1b2066; backdrop-filter: none; }
dialog h2 { font-size: 32px; line-height: 40px; letter-spacing: 0; }
dialog h3 { font-size: 22px; line-height: 28px; letter-spacing: 0; }
dialog p, dialog li { font-size: 16px; line-height: 26px; }
.dialog-tag { font-size: 12px !important; font-weight: 500; letter-spacing: .2px; }
.close-dialog { width: 48px; height: 48px; border-radius: 50%; right: 12px; top: 8px; }
.close-dialog:hover { background: #1a1b2014; }
.dialog-links { border-top-color: var(--md-outline-variant); gap: 8px; }
.dialog-links > a { min-height: 48px; padding: 10px 18px; border-radius: 26px; background: var(--md-primary-container); color: var(--md-on-primary-container); text-decoration: none; font-weight: 500; }
.dialog-links > a:hover { background: #c9d7fc; }
.article-partner { background: #fff; border-radius: 16px; }
.article-partner h3 { font-size: 18px; line-height: 24px; }
.article-partner p { font-size: 14px; line-height: 22px; }
.related-article { position: relative; isolation: isolate; overflow: hidden; border: 0; border-radius: 16px; background: var(--md-primary-container); color: var(--md-on-primary-container); font-weight: 500; }
.related-article:hover { background: #c9d7fc; }
.draft-note { border-top-color: var(--md-outline-variant); }

.material-ripple { position: absolute; z-index: -1; border-radius: 50%; background: currentColor; opacity: 0; transform: scale(0); pointer-events: none; animation: material-ripple 450ms var(--ease) forwards; }
@keyframes material-ripple { 0% { opacity: .18; transform: scale(0); } 65% { opacity: .1; } 100% { opacity: 0; transform: scale(1); } }

@media (max-width: 1100px) {
  .hero { padding: 32px; gap: 24px; grid-template-columns: 1.1fr 1fr; }
  h1 { font-size: 45px; line-height: 52px; }
  .hero-art { min-height: 340px; }
  .directory-layout { grid-template-columns: 230px minmax(0, 1fr); gap: 24px; }
  .supporting-article { grid-template-columns: 98px minmax(0, 1fr); gap: 0 16px; }
  .supporting-article h3 { font-size: 20px; line-height: 28px; }
  .supporting-article .article-image { min-height: 190px; }
  .resources-grid { gap: 16px; }
  .resources-grid > a { padding: 20px; }
}

@media (max-width: 760px) {
  .notice .wrap { min-height: 36px; font-size: 11px; }
  .version-link { min-height: 36px; font-size: 11px; gap: 8px; }
  .header { height: 88px; }
  .brand { font-size: 16px; gap: 10px; }
  .menu-toggle { border-radius: 24px; padding: 8px 12px; min-height: 48px; gap: 12px; }
  .menu-toggle:hover { background: var(--md-secondary-container); }
  nav { top: 78px; left: 0; right: 0; border: 0; border-radius: 20px; box-shadow: var(--md-elevation-2); background: var(--md-surface-container-high); padding: 12px; }
  nav a { min-height: 48px; }
  .hero { width: calc(100% - 24px); padding: 28px 24px 16px; gap: 24px; grid-template-columns: 1fr; min-height: 0; border-radius: 28px; }
  h1 { font-size: clamp(34px, 9.3vw, 45px); line-height: 1.2; letter-spacing: 0; margin-bottom: 20px; }
  .hero-copy > p { font-size: 16px; line-height: 24px; margin-bottom: 24px; }
  .hero-copy > .text-link { font-size: 13px; gap: 12px; }
  .hero-art { min-height: 0; height: 190px; border-radius: 20px; }
  .molecule { top: -15%; left: 0; width: 100%; height: 130%; }
  .section { padding-block: 48px; }
  h2 { font-size: 28px; line-height: 36px; }
  .section-head > p { font-size: 16px; line-height: 24px; }
  .directory-layout { grid-template-columns: 1fr; gap: 20px; }
  .directory-sidebar { padding-top: 0; }
  .search-box { margin-top: 10px; margin-bottom: 16px; }
  .search-box kbd { display: none; }
  .filters { gap: 6px; }
  .filters button { min-height: 48px; border: 1px solid var(--md-outline); border-radius: 12px; padding: 8px 10px; font-size: 14px; }
  .filters button:first-child { flex: 1.8; }
  .filters button.active { border: 1px solid transparent; }
  .filters button.active::before { margin-right: 4px; width: 16px; height: 16px; }
  .directory-layout > div { margin-inline: -4px; padding: 20px 16px; border-radius: 20px; }
  .index-heading { font-size: 11px; line-height: 16px; gap: 8px; }
  .peptide-row { min-height: 80px; padding: 16px 0; gap: 12px; }
  .row-number { min-width: 36px; width: 36px; height: 36px; font-size: 12px; }
  .peptide-name { font-size: 20px; line-height: 28px; }
  .row-arrow { min-width: 26px; width: 26px; font-size: 22px; }
  .index-note { font-size: 14px; line-height: 20px; }
  .article-grid { grid-template-columns: 1fr; gap: 20px; }
  .featured-article { padding-bottom: 24px; }
  .featured-article .article-image { height: 216px; }
  .featured-article .article-meta, .featured-article h3, .featured-article > p { margin-inline: 20px; }
  .featured-article h3 { font-size: 24px; line-height: 32px; }
  .article-card > p { font-size: 16px; line-height: 24px; }
  .paper-visual { width: 80%; left: 10%; padding: 18px; top: 32px; }
  .paper-visual > span, .paper-visual b { font-size: 12px; }
  .supporting-article, .supporting-article:last-child { grid-template-columns: 72px minmax(0, 1fr); padding: 16px; gap: 0 16px; }
  .supporting-article .article-image { min-height: 170px; border-radius: 12px; }
  .supporting-article h3 { font-size: 20px; line-height: 28px; }
  .supporting-article > p { font-size: 14px; line-height: 20px; }
  .resources-grid { grid-template-columns: 1fr; gap: 16px; }
  .resources-grid > a { padding: 24px; }
  .resources-grid h3 { font-size: 22px; line-height: 28px; }
  .resources-grid p { font-size: 16px; line-height: 24px; }
  footer { padding-inline: 20px; width: calc(100% - 24px) !important; }
  .footer-brand { font-size: 20px; line-height: 26px; }
  .footer-top { gap: 16px 8px; }
  .footer-top > a:last-child { padding-inline: 8px; font-size: 13px; }
  .footer-top > div { gap: 0; justify-content: space-between; }
  .footer-top button { font-size: 13px; padding-inline: 8px; }
  .footer-bottom { padding-top: 20px; }
  dialog { padding: 56px 24px 28px; border-radius: 28px; width: calc(100% - 32px); }
  dialog h2 { font-size: 28px; line-height: 36px; }
  dialog p, dialog li { font-size: 16px; line-height: 26px; }
  .dialog-links { flex-direction: column; align-items: stretch; }
  .dialog-links > a { justify-content: center; }
}

@media (max-width: 360px) {
  .brand { font-size: 14px; }
  .hero { padding-inline: 20px; }
  h1 { font-size: 34px; }
  .button { gap: 12px; padding-inline: 18px; font-size: 13px; }
  .hero-copy > .text-link { font-size: 12px; gap: 8px; }
  .filters button { font-size: 12px; padding-inline: 6px; }
  .peptide-name { font-size: 18px; }
  .row-number { min-width: 32px; width: 32px; height: 32px; }
  .supporting-article, .supporting-article:last-child { grid-template-columns: 68px minmax(0, 1fr); gap: 0 12px; }
  .footer-top button { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .material-ripple { display: none; }
}
