:root {
  --red: #e30613;
  --red-dark: #99000b;
  --ink: #15161a;
  --ink-soft: #343841;
  --muted: #66707f;
  --line: #e5e7eb;
  --paper: #ffffff;
  --soft: #f6f7f9;
  --soft-red: #fff1f2;
  --shadow: 0 18px 50px rgba(21, 22, 26, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--soft);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
}

.skip-link:focus {
  top: 16px;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(229, 231, 235, 0.82);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.brand img {
  width: 42px;
  height: 42px;
  border-radius: 8px;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-menu a {
  padding: 10px 12px;
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 0.94rem;
  font-weight: 700;
  text-decoration: none;
}

.nav-menu a:hover,
.nav-menu a[aria-current="page"] {
  background: var(--soft-red);
  color: var(--red-dark);
}

.nav-menu .nav-cta {
  margin-left: 6px;
  color: #fff;
  background: var(--red);
}

.nav-menu .nav-cta:hover {
  color: #fff;
  background: var(--red-dark);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: var(--ink);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.82fr);
  gap: 52px;
  align-items: center;
  padding: 72px 0 80px;
}

.hero h1,
.page-hero h1,
.section-title h2 {
  margin: 0;
  letter-spacing: 0;
  line-height: 1.04;
}

.hero h1 {
  max-width: 760px;
  font-size: clamp(3rem, 7vw, 6.2rem);
}

.hero-lead,
.page-hero p,
.section-title p {
  color: var(--muted);
  font-size: 1.12rem;
}

.hero-lead {
  max-width: 680px;
  margin: 24px 0 0;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 850;
  text-decoration: none;
}

.button.primary {
  color: #fff;
  background: var(--red);
  box-shadow: 0 16px 34px rgba(227, 6, 19, 0.22);
}

.button.primary:hover {
  background: var(--red-dark);
}

.button.secondary {
  border-color: var(--line);
  background: #fff;
}

.hero-media {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow);
}

.hero-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.hero-media-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
}

.metric {
  padding: 18px;
}

.metric + .metric {
  border-left: 1px solid var(--line);
}

.metric strong {
  display: block;
  font-size: 1.4rem;
}

.metric span {
  color: var(--muted);
  font-size: 0.9rem;
}

.trust-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  overflow: hidden;
  margin-bottom: 72px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--line);
}

.trust-bar div {
  padding: 22px;
  background: #fff;
}

.trust-bar strong {
  display: block;
  margin-bottom: 4px;
}

.trust-bar span {
  color: var(--muted);
  font-size: 0.94rem;
}

main {
  padding-bottom: 80px;
}

.section {
  margin-bottom: 78px;
}

.section-title {
  max-width: 780px;
  margin-bottom: 28px;
}

.section-title.split {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  max-width: none;
}

.section-title h2,
.page-hero h1 {
  font-size: clamp(2.2rem, 4.5vw, 4rem);
}

.two-col {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 40px;
}

.panel {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 34px rgba(21, 22, 26, 0.06);
}

.panel h3 {
  margin-top: 0;
  font-size: 1.35rem;
}

.panel p {
  color: var(--muted);
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.card,
.project-card,
.timeline-item,
.contact-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 34px rgba(21, 22, 26, 0.06);
}

.card {
  padding: 24px;
}

.card .number {
  color: var(--red);
  font-weight: 900;
}

.card h3 {
  margin: 12px 0 8px;
}

.card p,
.project-card p,
.timeline-item p,
.contact-card p {
  color: var(--muted);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.project-card {
  overflow: hidden;
}

.project-card img {
  width: 100%;
  aspect-ratio: 1.35 / 1;
  object-fit: cover;
}

.project-body {
  padding: 20px;
}

.tag {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--soft-red);
  color: var(--red-dark);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-card h3 {
  margin: 0 0 8px;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.text-link,
.project-links a {
  color: var(--red);
  font-weight: 850;
  text-decoration: none;
}

.text-link:hover,
.project-links a:hover {
  color: var(--red-dark);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 24px;
}

.filter-button {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-soft);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.filter-button.is-active {
  border-color: var(--red);
  color: #fff;
  background: var(--red);
}

.timeline {
  display: grid;
  gap: 14px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 24px;
  padding: 22px;
}

.timeline-item strong {
  color: var(--red-dark);
}

.cta-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 34px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
}

.cta-band p {
  max-width: 700px;
  color: rgba(255, 255, 255, 0.72);
}

.page-hero {
  padding: 62px 0 46px;
}

.page-hero p {
  max-width: 740px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.contact-card {
  padding: 24px;
  text-decoration: none;
}

.contact-card:hover {
  border-color: rgba(227, 6, 19, 0.38);
}

.form-shell {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 28px;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--ink-soft);
  font-weight: 800;
}

input,
textarea,
select {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

textarea {
  min-height: 150px;
  resize: vertical;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #fff;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 30px;
  padding: 36px 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.footer-links a {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  font-weight: 750;
  text-decoration: none;
}

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

@media (max-width: 980px) {
  .nav-toggle {
    display: block;
  }

  .nav-menu {
    position: absolute;
    top: 76px;
    right: 16px;
    left: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    box-shadow: var(--shadow);
  }

  .nav-menu.is-open {
    display: flex;
  }

  .nav-menu .nav-cta {
    margin-left: 0;
  }

  .hero,
  .two-col,
  .form-shell,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 44px;
  }

  .trust-bar,
  .cards,
  .project-grid,
  .contact-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .section-title.split,
  .cta-band {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 660px) {
  .brand small {
    display: none;
  }

  .hero h1 {
    font-size: 2.65rem;
  }

  .trust-bar,
  .cards,
  .project-grid,
  .contact-grid,
  .field-grid,
  .timeline-item,
  .hero-media-footer {
    grid-template-columns: 1fr;
  }

  .metric + .metric {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .button,
  .hero-actions,
  .button-row {
    width: 100%;
  }

  .cta-band {
    padding: 24px;
  }
}


/* v5 Robotech light theme: white-first with red and black accents */
:root {
  --red: #e30613;
  --red-dark: #99000b;
  --ink: #101114;
  --ink-soft: #2c3037;
  --muted: #646b76;
  --line: #e4e6ea;
  --paper: #ffffff;
  --soft: #f7f8fa;
  --soft-red: #fff0f2;
  --shadow: 0 18px 48px rgba(16, 17, 20, 0.09);
}

body {
  background:
    radial-gradient(circle at top left, rgba(227, 6, 19, 0.08), transparent 30rem),
    linear-gradient(180deg, #ffffff 0%, #f7f8fa 46%, #ffffff 100%);
  color: var(--ink);
}

.site-header {
  border-bottom: 1px solid rgba(16, 17, 20, 0.08);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 30px rgba(16, 17, 20, 0.04);
}

.brand {
  color: var(--ink);
}

.brand img {
  background: #fff;
  box-shadow: 0 0 0 1px rgba(227, 6, 19, 0.18), 0 10px 26px rgba(16, 17, 20, 0.08);
}

.nav-menu a {
  color: var(--ink-soft);
}

.nav-menu a:hover,
.nav-menu a[aria-current="page"] {
  background: var(--soft-red);
  color: var(--red-dark);
}

.nav-menu .nav-cta,
.button.primary,
.filter-button.is-active {
  color: #fff;
  background: var(--red);
  box-shadow: 0 14px 30px rgba(227, 6, 19, 0.18);
}

.nav-menu .nav-cta:hover,
.button.primary:hover {
  background: var(--red-dark);
}

.button.secondary,
.filter-button,
input,
textarea,
select,
.nav-toggle {
  background: #fff;
  color: var(--ink);
}

.hero {
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 44px auto auto -24px;
  z-index: -1;
  width: min(420px, 54vw);
  height: min(420px, 54vw);
  border-radius: 999px;
  background: radial-gradient(circle, rgba(227, 6, 19, 0.11), transparent 68%);
}

.hero h1,
.page-hero h1,
.section-title h2 {
  color: #0c0d10;
}

.hero-media,
.panel,
.card,
.project-card,
.timeline-item,
.contact-card,
.trust-bar div {
  border-color: var(--line);
  background: #fff;
  box-shadow: var(--shadow);
}

.hero-media {
  border-top: 5px solid var(--red);
}

.hero-media img,
.project-card img {
  filter: saturate(1.03) contrast(1.02);
}

.trust-bar {
  border-color: var(--line);
  background: var(--line);
  box-shadow: var(--shadow);
}

.trust-bar strong,
.card h3,
.project-card h3,
.timeline-item h3,
.contact-card h3,
.panel h3 {
  color: #101114;
}

.card {
  border-top: 3px solid var(--red);
}

.project-body {
  border-top: 1px solid var(--line);
}

.tag {
  background: var(--soft-red);
  color: var(--red-dark);
}

.timeline-item strong,
.eyebrow,
.card .number,
.text-link,
.project-links a {
  color: var(--red);
}

.cta-band {
  border: 1px solid #15161a;
  background:
    linear-gradient(135deg, rgba(227, 6, 19, 0.1), rgba(227, 6, 19, 0)),
    #111216;
  color: #fff;
  box-shadow: var(--shadow);
}

.cta-band .eyebrow {
  color: #ff5a64;
}

.site-footer {
  border-top-color: var(--line);
  background: #ffffff;
}

.footer-links a {
  background: #fff;
  color: var(--ink-soft);
}

::selection {
  background: var(--red);
  color: #fff;
}

@media (max-width: 980px) {
  .nav-menu {
    background: #fff;
    border-color: var(--line);
  }
}


/* theme switch and donation popup */
.theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 850;
  cursor: pointer;
  user-select: none;
}

.theme-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.theme-switch__track {
  position: relative;
  display: inline-flex;
  width: 48px;
  height: 26px;
  border-radius: 999px;
  background: #d7dbe2;
  box-shadow: inset 0 0 0 1px rgba(16, 17, 20, 0.08);
  transition: background 0.2s ease;
}

.theme-switch__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 12px rgba(16, 17, 20, 0.18);
  transition: transform 0.2s ease;
}

.theme-switch input:checked + .theme-switch__track {
  background: var(--red);
}

.theme-switch input:checked + .theme-switch__track .theme-switch__thumb {
  transform: translateX(22px);
}

.donate-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 80;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 54px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: #fff;
  box-shadow: 0 18px 42px rgba(227, 6, 19, 0.28);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

.donate-fab__icon {
  display: inline-grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

.donation-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(8, 9, 12, 0.64);
  backdrop-filter: blur(8px);
}

.donation-modal[hidden] {
  display: none;
}

.donation-modal__card {
  width: min(520px, 100%);
  padding: 30px;
  border: 1px solid var(--line);
  border-top: 5px solid var(--red);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.34);
  position: relative;
}

.donation-modal__card h2 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: clamp(1.7rem, 4vw, 2.35rem);
  line-height: 1.06;
}

.donation-modal__card p:not(.eyebrow) {
  color: var(--muted);
}

.donation-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
}

.has-modal {
  overflow: hidden;
}

html[data-theme="dark"] {
  --ink: #f7f7f8;
  --ink-soft: #d9dde5;
  --muted: #a6adba;
  --line: #343946;
  --paper: #171a20;
  --soft: #0d0f13;
  --soft-red: rgba(240, 6, 22, 0.15);
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.42);
}

html[data-theme="dark"] body {
  background:
    radial-gradient(circle at top left, rgba(240, 6, 22, 0.2), transparent 34rem),
    radial-gradient(circle at 85% 18%, rgba(240, 6, 22, 0.12), transparent 26rem),
    linear-gradient(180deg, #12151b 0%, #0d0f13 38%, #111319 100%);
  color: var(--ink);
}

html[data-theme="dark"] .site-header {
  border-bottom-color: rgba(240, 6, 22, 0.28);
  background: rgba(12, 14, 18, 0.92);
}

html[data-theme="dark"] .brand,
html[data-theme="dark"] .nav-menu a,
html[data-theme="dark"] .filter-button,
html[data-theme="dark"] label,
html[data-theme="dark"] .theme-switch {
  color: var(--ink-soft);
}

html[data-theme="dark"] .theme-switch,
html[data-theme="dark"] .button.secondary,
html[data-theme="dark"] .filter-button,
html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select,
html[data-theme="dark"] .nav-toggle {
  background: #101217;
  color: var(--ink);
}

html[data-theme="dark"] .nav-menu a:hover,
html[data-theme="dark"] .nav-menu a[aria-current="page"] {
  background: var(--soft-red);
  color: #fff;
}

html[data-theme="dark"] .hero h1,
html[data-theme="dark"] .page-hero h1,
html[data-theme="dark"] .section-title h2,
html[data-theme="dark"] .trust-bar strong,
html[data-theme="dark"] .card h3,
html[data-theme="dark"] .project-card h3,
html[data-theme="dark"] .timeline-item h3,
html[data-theme="dark"] .contact-card h3,
html[data-theme="dark"] .panel h3,
html[data-theme="dark"] .donation-modal__card h2 {
  color: #fff;
}

html[data-theme="dark"] .hero-media,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .card,
html[data-theme="dark"] .project-card,
html[data-theme="dark"] .timeline-item,
html[data-theme="dark"] .contact-card,
html[data-theme="dark"] .trust-bar div,
html[data-theme="dark"] .donation-modal__card {
  border-color: var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018)), var(--paper);
  box-shadow: var(--shadow);
}

html[data-theme="dark"] .site-footer {
  background: #090b0e;
}

html[data-theme="dark"] .footer-links a {
  background: var(--paper);
  color: var(--ink-soft);
}

html[data-theme="dark"] .nav-menu {
  background: #101217;
}

html[data-theme="dark"] .donation-modal__close {
  background: #101217;
  color: #fff;
}

@media (max-width: 1120px) {
  .theme-switch {
    order: 3;
    margin-left: auto;
  }
}

@media (max-width: 980px) {
  .theme-switch {
    margin-left: 0;
  }

  .nav {
    flex-wrap: wrap;
  }
}

@media (max-width: 660px) {
  .theme-switch__text {
    display: none;
  }

  .donate-fab {
    right: 16px;
    bottom: 16px;
    min-height: 50px;
    padding: 0 14px;
  }

  .donation-modal__card {
    padding: 24px;
  }
}

/* v8: quieter institutional layout and PET assistant */
:root {
  --red: #d71920;
  --red-dark: #9f1016;
  --ink: #17191d;
  --ink-soft: #343941;
  --muted: #626b76;
  --line: #dfe3e8;
  --paper: #ffffff;
  --soft: #f5f6f7;
  --soft-red: #fff3f4;
  --shadow: 0 8px 22px rgba(17, 24, 39, 0.08);
}

body {
  background: #f7f8f9;
  color: var(--ink);
}

.site-header {
  position: sticky;
  border-bottom: 1px solid #d9dde3;
  background: #fff;
  box-shadow: none;
  backdrop-filter: none;
}

.nav {
  min-height: 68px;
  gap: 18px;
}

.brand {
  gap: 10px;
  font-weight: 800;
}

.brand img {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  box-shadow: none;
}

.brand small {
  color: #6b7280;
  font-weight: 600;
}

.nav-menu {
  gap: 18px;
}

.nav-menu a {
  padding: 0;
  border-radius: 0;
  color: #303640;
  font-size: 0.94rem;
  font-weight: 700;
}

.nav-menu a:hover,
.nav-menu a[aria-current="page"] {
  background: transparent;
  color: var(--red-dark);
  text-decoration: underline;
  text-underline-offset: 5px;
}

.nav-menu .nav-cta {
  margin-left: 4px;
  padding: 8px 13px;
  border: 1px solid var(--red);
  border-radius: 6px;
  background: #fff;
  color: var(--red-dark);
  box-shadow: none;
}

.nav-menu .nav-cta:hover {
  background: var(--red);
  color: #fff;
  text-decoration: none;
}

.theme-switch {
  padding: 4px 6px;
  border-radius: 6px;
  background: #fff;
  font-size: 0.76rem;
}

.theme-switch__track {
  width: 42px;
  height: 22px;
}

.theme-switch__thumb {
  width: 16px;
  height: 16px;
}

.theme-switch input:checked + .theme-switch__track .theme-switch__thumb {
  transform: translateX(20px);
}

.hero {
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.82fr);
  gap: 44px;
  min-height: auto;
  padding: 56px 0 58px;
}

.hero::before {
  content: none;
}

.hero h1 {
  max-width: 760px;
  font-size: clamp(2.45rem, 5.4vw, 4.85rem);
  line-height: 1.03;
}

.hero-lead {
  max-width: 650px;
  font-size: 1.06rem;
}

.eyebrow {
  color: var(--red-dark);
  letter-spacing: 0.08em;
}

.button {
  min-height: 44px;
  border-radius: 6px;
  font-weight: 800;
}

.button.primary {
  background: var(--red);
  box-shadow: none;
}

.button.secondary {
  border-color: #cfd5dd;
  background: #fff;
}

.hero-media {
  border-top: 0;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-media img {
  aspect-ratio: 16 / 10;
}

.metric {
  padding: 16px;
}

.metric strong {
  font-size: 1.08rem;
}

.trust-bar {
  margin-bottom: 62px;
  border-radius: 8px;
  box-shadow: none;
}

.panel,
.card,
.project-card,
.timeline-item,
.contact-card,
.trust-bar div {
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.card {
  border-top: 1px solid var(--line);
}

.card .number,
.timeline-item strong,
.text-link,
.project-links a {
  color: var(--red-dark);
}

.section-title h2,
.page-hero h1 {
  font-size: clamp(2rem, 4vw, 3.35rem);
}

.project-card img {
  filter: none;
}

.cta-band {
  border: 1px solid #292d33;
  border-radius: 8px;
  background: #191b20;
  box-shadow: none;
}

.donate-fab,
.donation-modal {
  display: none;
}


.pet-assistant {
  position: fixed;
  right: 24px;
  bottom: 52px;
  z-index: 90;
  display: grid;
  justify-items: end;
  gap: 10px;
  pointer-events: none;
}

.pet-assistant__bubble {
  position: relative;
  width: min(315px, calc(100vw - 34px));
  padding: 15px 42px 15px 16px;
  border: 1px solid #c8d0da;
  border-radius: 8px;
  background: #fff;
  color: #22262d;
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.12);
  pointer-events: auto;
}

.pet-assistant__bubble::after {
  content: "";
  position: absolute;
  right: 34px;
  bottom: -10px;
  width: 18px;
  height: 18px;
  border-right: 1px solid #c8d0da;
  border-bottom: 1px solid #c8d0da;
  background: #fff;
  transform: rotate(45deg);
}

.pet-assistant__bubble[hidden] {
  display: none;
}

.pet-assistant__bubble p {
  margin: 0 0 10px;
  font-weight: 800;
  line-height: 1.3;
}

.pet-assistant__close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  border: 1px solid #d6dbe2;
  border-radius: 5px;
  background: #fff;
  color: #3b414a;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}

.pet-assistant__links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.pet-assistant__links a {
  padding: 6px 8px;
  border: 1px solid #d8dde5;
  border-radius: 5px;
  background: #fff;
  color: var(--red-dark);
  font-size: 0.86rem;
  font-weight: 800;
  text-decoration: none;
}

.pet-assistant__links a:hover {
  border-color: var(--red);
  background: var(--soft-red);
}

.pet-assistant__pet {
  width: 118px;
  height: 82px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0 7px 9px rgba(17, 24, 39, 0.16));
  pointer-events: auto;
}

.pet-assistant__pet img {
  width: 142px;
  max-width: none;
  transform: translateX(-16px);
}

html[data-theme="dark"] body {
  background: #101216;
}

html[data-theme="dark"] .site-header {
  border-bottom-color: #303641;
  background: #111419;
}

html[data-theme="dark"] .nav-menu .nav-cta,
html[data-theme="dark"] .theme-switch,
html[data-theme="dark"] .pet-assistant__links a,
html[data-theme="dark"] .pet-assistant__close {
  background: #171b22;
}

html[data-theme="dark"] .pet-assistant__bubble,
html[data-theme="dark"] .pet-assistant__bubble::after {
  border-color: #3a414d;
  background: #171b22;
  color: #f4f6f8;
}

html[data-theme="dark"] .pet-assistant__links a {
  border-color: #3a414d;
  color: #ff858b;
}

@media (max-width: 980px) {
  .nav-menu {
    top: 68px;
    gap: 0;
    border-radius: 8px;
  }

  .nav-menu a {
    padding: 12px;
  }

  .hero {
    padding-top: 40px;
  }
}

@media (max-width: 660px) {
  .hero h1 {
    font-size: 2.35rem;
  }

  .pet-assistant {
    right: 14px;
    bottom: 36px;
  }

  .pet-assistant__pet {
    width: 92px;
    height: 68px;
  }

  .pet-assistant__pet img {
    width: 116px;
    transform: translateX(-14px);
  }
}


/* v8 header cleanup */
.site-header {
  border-top: 3px solid var(--red);
  border-bottom: 1px solid #e1e5ea;
  background: rgba(255, 255, 255, 0.98);
}

.nav {
  min-height: 72px;
  align-items: center;
}

.brand {
  gap: 14px;
  min-width: 220px;
}

.brand img {
  width: 124px;
  height: auto;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.brand span {
  display: grid;
  gap: 1px;
  padding-left: 14px;
  border-left: 1px solid #dde2e8;
  font-size: 0.98rem;
  line-height: 1.1;
}

.brand small {
  color: #707782;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0;
}

.nav-menu {
  gap: 0;
  margin-left: auto;
}

.nav-menu a {
  position: relative;
  padding: 25px 11px 22px;
  color: #30343b;
  font-size: 0.92rem;
  font-weight: 650;
  text-decoration: none;
}

.nav-menu a::after {
  content: "";
  position: absolute;
  right: 11px;
  bottom: 17px;
  left: 11px;
  height: 2px;
  background: transparent;
}

.nav-menu a:hover,
.nav-menu a[aria-current="page"] {
  color: #111318;
  text-decoration: none;
}

.nav-menu a:hover::after,
.nav-menu a[aria-current="page"]::after {
  background: var(--red);
}

.nav-menu .nav-cta {
  margin-left: 10px;
  padding: 25px 0 22px 14px;
  border: 0;
  border-left: 1px solid #dde2e8;
  border-radius: 0;
  background: transparent;
  color: var(--red-dark);
}

.nav-menu .nav-cta:hover {
  background: transparent;
  color: var(--red);
}

.nav-menu .nav-cta::after {
  right: 0;
  left: 14px;
}

.pet-assistant {
  bottom: 132px;
}

.pet-assistant__bubble {
  box-shadow: 0 7px 16px rgba(17, 24, 39, 0.1);
}

@media (max-width: 980px) {
  .brand img {
    width: 112px;
  }

  .brand span {
    font-size: 0.92rem;
  }

  .nav-menu {
    top: 72px;
  }

  .nav-menu a,
  .nav-menu .nav-cta {
    padding: 12px;
  }

  .nav-menu a::after,
  .nav-menu .nav-cta::after {
    display: none;
  }

  .nav-menu .nav-cta {
    margin-left: 0;
    border-left: 0;
  }

  .pet-assistant {
    bottom: 104px;
  }
}

@media (max-width: 660px) {
  .nav {
    min-height: 66px;
  }

  .brand {
    min-width: 0;
    gap: 10px;
  }

  .brand img {
    width: 96px;
  }

  .brand span {
    padding-left: 10px;
    font-size: 0.86rem;
  }

  .pet-assistant {
    bottom: 88px;
  }
}

/* v8 BIT chat and workshop cards */
.pet-assistant__hint {
  position: relative;
  margin-right: 16px;
  padding: 7px 10px;
  border: 1px solid #c8d0da;
  border-radius: 7px;
  background: #fff;
  color: #2e333a;
  box-shadow: 0 6px 14px rgba(17, 24, 39, 0.1);
  font-size: 0.88rem;
  font-weight: 750;
  pointer-events: none;
}

.pet-assistant__hint::after {
  content: "";
  position: absolute;
  right: 20px;
  bottom: -7px;
  width: 12px;
  height: 12px;
  border-right: 1px solid #c8d0da;
  border-bottom: 1px solid #c8d0da;
  background: #fff;
  transform: rotate(45deg);
}

.pet-assistant__bubble {
  width: min(350px, calc(100vw - 34px));
  padding: 14px;
}

.pet-assistant__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  padding-bottom: 9px;
  border-bottom: 1px solid #e2e6ec;
}

.pet-assistant__top strong {
  font-size: 0.98rem;
}

.pet-assistant__answer {
  margin: 0 0 12px;
  color: #343a43;
  font-size: 0.93rem;
  line-height: 1.45;
}

.pet-assistant__questions {
  display: grid;
  gap: 7px;
  margin-bottom: 11px;
}

.pet-assistant__questions button {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #d8dde5;
  border-radius: 5px;
  background: #f8f9fb;
  color: #252a31;
  cursor: pointer;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  text-align: left;
}

.pet-assistant__questions button:hover {
  border-color: #c9d0da;
  background: #fff;
}

.workshop-item {
  grid-template-columns: 150px 150px minmax(0, 1fr);
  align-items: center;
}

.workshop-item > img {
  width: 150px;
  height: 104px;
  border-radius: 7px;
  object-fit: cover;
}

html[data-theme="dark"] .pet-assistant__hint,
html[data-theme="dark"] .pet-assistant__hint::after,
html[data-theme="dark"] .pet-assistant__questions button {
  border-color: #3a414d;
  background: #171b22;
  color: #f4f6f8;
}

html[data-theme="dark"] .pet-assistant__top {
  border-bottom-color: #303641;
}

html[data-theme="dark"] .pet-assistant__answer {
  color: #d8dde5;
}

@media (max-width: 760px) {
  .workshop-item {
    grid-template-columns: 1fr;
  }

  .workshop-item > img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }
}


.pet-assistant__top .pet-assistant__close {
  position: static;
  flex: 0 0 auto;
}

.pet-assistant__bubble .pet-assistant__answer {
  font-weight: 500;
}

.theme-switch__icon {
  display: inline-grid;
  width: 18px;
  place-items: center;
  color: #555d68;
  font-size: 0.92rem;
  line-height: 1;
}

html[data-theme="dark"] .theme-switch__icon {
  color: #d8dde5;
}

.contact-grid {
  grid-template-columns: repeat(4, 1fr);
}

.contact-card {
  display: grid;
  align-content: start;
  gap: 10px;
}

.contact-icon {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid #d8dde5;
  border-radius: 8px;
  background: #fff;
  color: var(--red-dark);
}

.contact-icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-card:hover .contact-icon {
  border-color: rgba(215, 25, 32, 0.45);
  background: var(--soft-red);
}

html[data-theme="dark"] .contact-icon {
  border-color: #3a414d;
  background: #171b22;
  color: #ff858b;
}

@media (max-width: 980px) {
  .contact-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

/* v8 workshop detail polish */
.workshop-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
  gap: 34px;
  align-items: center;
  padding-bottom: 30px;
}

.workshop-hero img {
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: clamp(22px, 5vw, 54px);
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.workshop-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  margin: 0 0 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.workshop-meta div {
  padding: 16px 18px;
  background: var(--paper);
}

.workshop-meta strong,
.workshop-meta span {
  display: block;
}

.workshop-meta strong {
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.workshop-meta span {
  margin-top: 3px;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 850;
}

.workshop-detail .panel {
  padding: 0;
  overflow: hidden;
}

.check-list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding: 18px 22px 18px 54px;
  color: var(--ink-soft);
  font-weight: 650;
}

.check-list li + li {
  border-top: 1px solid var(--line);
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 22px;
  top: 20px;
  width: 16px;
  height: 16px;
  border: 2px solid var(--red);
  border-radius: 50%;
  background: radial-gradient(circle, var(--red) 0 3px, transparent 4px);
}

.footer-links.contact-links a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.footer-icon {
  display: inline-grid;
  width: 18px;
  height: 18px;
  place-items: center;
  color: currentColor;
}

.footer-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 980px) {
  .workshop-hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 660px) {
  .workshop-meta {
    grid-template-columns: 1fr;
  }
}

.footer-links.contact-links a {
  min-height: 38px;
  padding: 7px 10px 7px 7px;
  gap: 8px;
}

.footer-icon {
  display: inline-grid;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid #d8dde5;
  border-radius: 7px;
  background: #fff;
  color: var(--red-dark);
}

.footer-icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.footer-links.contact-links a:hover .footer-icon {
  border-color: rgba(215, 25, 32, 0.45);
  background: var(--soft-red);
}

html[data-theme="dark"] .footer-icon {
  border-color: #3a414d;
  background: #171b22;
  color: #ff858b;
}

/* footer social links: icon above label */

.footer-links.contact-links {
  align-items: start;
  gap: 18px;
}

.footer-links.contact-links a {
  display: inline-grid;
  justify-items: center;
  gap: 6px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink-soft);
  font-size: 0.82rem;
  line-height: 1.1;
  text-align: center;
}

.footer-links.contact-links a:hover {
  background: transparent;
  color: var(--red-dark);
}

.footer-icon {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: currentColor;
}

.footer-icon svg {
  width: 24px;
  height: 24px;
}

.footer-links.contact-links a:hover .footer-icon {
  border-color: transparent;
  background: transparent;
}

html[data-theme="dark"] .footer-links.contact-links a {
  color: var(--ink-soft);
}

html[data-theme="dark"] .footer-links.contact-links a:hover {
  color: #ff858b;
}

html[data-theme="dark"] .footer-icon {
  border-color: transparent;
  background: transparent;
  color: currentColor;
}

/* v8 project page polish */
.projects-hero {
  padding-bottom: 26px;
}

.project-overview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  margin: 0 0 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.project-overview div {
  padding: 18px 20px;
  background: var(--paper);
}

.project-overview strong,
.project-overview span {
  display: block;
}

.project-overview strong {
  color: var(--ink);
  font-size: 1.8rem;
  line-height: 1;
}

.project-overview span {
  margin-top: 5px;
  color: var(--muted);
  font-weight: 700;
}

.projects-section {
  margin-bottom: 58px;
}

.projects-section .filters {
  align-items: center;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.projects-section .filter-button {
  border-radius: 6px;
  box-shadow: none;
}

.project-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.project-card {
  display: grid;
  grid-template-rows: auto 1fr;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.project-card:hover {
  border-color: rgba(215, 25, 32, 0.32);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.1);
}

.project-card img {
  aspect-ratio: 16 / 10;
  background: #f0f2f4;
}

.project-body {
  display: flex;
  flex-direction: column;
  min-height: 250px;
}

.project-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.project-meta .tag {
  margin-bottom: 0;
}

.project-state {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.project-state::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: currentColor;
  vertical-align: 1px;
}

.project-state.is-active {
  color: #1f7a4d;
}

.project-state.is-archived {
  color: #7b8491;
}

.project-body p {
  margin-bottom: 0;
}

.project-links {
  margin-top: auto;
  padding-top: 18px;
}

.project-links a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid #d8dde5;
  border-radius: 6px;
  color: var(--red-dark);
}

.project-links a:hover {
  border-color: rgba(215, 25, 32, 0.45);
  background: var(--soft-red);
  text-decoration: none;
}

.project-card[data-category="antiguos"] img {
  filter: saturate(0.9) contrast(0.98);
}

html[data-theme="dark"] .project-overview div {
  background: var(--paper);
}

html[data-theme="dark"] .project-state.is-active {
  color: #75d39d;
}

html[data-theme="dark"] .project-links a {
  border-color: #3a414d;
  color: #ff858b;
}

@media (max-width: 980px) {
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 660px) {
  .project-overview,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .project-body {
    min-height: 0;
  }
}

/* v8 mobile hardening */
html,
body {
  overflow-x: hidden;
}

@media (max-width: 760px) {
  .container {
    width: min(100% - 28px, 1180px);
  }

  .site-header {
    position: sticky;
  }

  .nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    min-height: 64px;
    gap: 8px;
    align-items: center;
  }

  .brand {
    min-width: 0;
    gap: 8px;
  }

  .brand img {
    width: 82px;
    min-width: 82px;
  }

  .brand span {
    min-width: 0;
    padding-left: 9px;
    overflow: hidden;
    font-size: 0.82rem;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .brand small {
    display: none;
  }

  .theme-switch {
    order: initial;
    margin-left: 0;
    padding: 4px;
    gap: 4px;
  }

  .theme-switch__icon {
    width: 16px;
    font-size: 0.86rem;
  }

  .theme-switch__track {
    width: 38px;
    height: 22px;
  }

  .theme-switch__thumb {
    width: 16px;
    height: 16px;
  }

  .theme-switch input:checked + .theme-switch__track .theme-switch__thumb {
    transform: translateX(16px);
  }

  .nav-toggle {
    width: 40px;
    height: 40px;
  }

  .nav-menu {
    position: absolute;
    top: 67px;
    right: 14px;
    left: 14px;
    grid-column: 1 / -1;
    max-height: calc(100dvh - 86px);
    overflow: auto;
    padding: 8px;
    border-radius: 8px;
  }

  .nav-menu a,
  .nav-menu .nav-cta {
    padding: 12px 10px;
    border: 0;
    text-align: left;
  }

  .hero,
  .page-hero,
  .workshop-hero {
    padding-top: 34px;
  }

  .hero {
    gap: 26px;
  }

  .hero h1,
  .page-hero h1 {
    font-size: clamp(2.2rem, 13vw, 3.15rem);
    line-height: 1.04;
  }

  .hero-lead,
  .page-hero p {
    font-size: 1rem;
  }

  .hero-actions,
  .button-row {
    display: grid;
    width: 100%;
  }

  .button {
    width: 100%;
  }

  .hero-media,
  .project-card,
  .panel,
  .card,
  .timeline-item,
  .contact-card {
    border-radius: 8px;
  }

  .hero-media img,
  .project-card img,
  .workshop-hero img {
    aspect-ratio: 16 / 10;
  }

  .trust-bar,
  .cards,
  .project-grid,
  .contact-grid,
  .workshop-meta,
  .project-overview {
    grid-template-columns: 1fr;
  }

  .section {
    margin-bottom: 54px;
  }

  .section-title.split {
    display: grid;
    gap: 14px;
  }

  .projects-section .filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .filter-button {
    min-height: 40px;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 0.9rem;
  }

  .project-body {
    min-height: 0;
    padding: 16px;
  }

  .project-meta {
    align-items: flex-start;
  }

  .tag,
  .project-state {
    font-size: 0.68rem;
  }

  .timeline-item,
  .workshop-item {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 16px;
  }

  .workshop-item > img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .form-shell,
  .field-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    gap: 22px;
  }

  .footer-links.contact-links {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    justify-content: stretch;
    gap: 10px;
    width: 100%;
  }

  .footer-links.contact-links a {
    min-width: 0;
    font-size: 0.76rem;
  }

  .footer-icon,
  .footer-icon svg {
    width: 24px;
    height: 24px;
  }

  .pet-assistant {
    right: 10px;
    bottom: 72px;
    max-width: calc(100vw - 20px);
  }

  .pet-assistant__hint {
    margin-right: 8px;
    padding: 6px 8px;
    font-size: 0.8rem;
  }

  .pet-assistant__bubble {
    width: min(310px, calc(100vw - 24px));
    padding: 12px;
  }

  .pet-assistant__pet {
    width: 82px;
    height: 60px;
  }

  .pet-assistant__pet img {
    width: 108px;
    transform: translateX(-12px);
  }
}

@media (max-width: 420px) {
  .brand img {
    width: 72px;
    min-width: 72px;
  }

  .brand span {
    max-width: 128px;
    font-size: 0.78rem;
  }

  .projects-section .filters,
  .footer-links.contact-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-meta {
    display: grid;
    justify-content: start;
  }

  .pet-assistant__bubble {
    width: calc(100vw - 20px);
  }
}

/* v8 about page and donation intro */
.about-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.78fr);
  gap: 34px;
  align-items: center;
  padding-bottom: 30px;
}

.about-hero img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.about-values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  margin: 0 0 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.about-values div {
  padding: 20px;
  background: var(--paper);
}

.about-values strong,
.about-values span {
  display: block;
}

.about-values strong {
  color: var(--red-dark);
  font-size: 1.05rem;
}

.about-values span {
  margin-top: 6px;
  color: var(--muted);
}

.about-location {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.about-location h2 {
  margin: 0 0 10px;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  line-height: 1.08;
}

.about-location p:not(.eyebrow) {
  max-width: 760px;
  color: var(--muted);
}

.pet-assistant.is-donation .pet-assistant__pet {
  transform: scale(1.18) translateY(-8px);
}

.pet-assistant.is-donation .pet-assistant__bubble {
  border-color: rgba(215, 25, 32, 0.36);
  box-shadow: 0 16px 38px rgba(17, 24, 39, 0.18);
}

.pet-assistant.is-donation .pet-assistant__top strong::after {
  content: " · donaciones";
  color: var(--red-dark);
  font-weight: 800;
}

@media (max-width: 760px) {
  .about-hero,
  .about-values {
    grid-template-columns: 1fr;
  }

  .about-location {
    display: grid;
    padding: 22px;
  }

  .pet-assistant.is-donation .pet-assistant__pet {
    transform: scale(1.1) translateY(-6px);
  }
}

/* local preview */
.local-preview {
  margin-bottom: 68px;
}

.local-preview__frame {
  position: relative;
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f1116;
  box-shadow: var(--shadow);
}

.local-preview__frame img {
  display: block;
  width: 100%;
  aspect-ratio: 1788 / 954;
  object-fit: cover;
  object-position: center;
  filter: saturate(1.02) contrast(1.02);
}

@media (max-width: 760px) {
  .local-preview {
    margin-bottom: 48px;
  }

  .local-preview__frame img {
    aspect-ratio: 16 / 10;
  }
}

/* final dark mode and mobile navigation pass */
.site-header .brand img {
  display: block;
  object-fit: contain;
}

.theme-switch,
.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  padding: 4px 7px;
  border: 1px solid #d6dbe2;
  border-radius: 7px;
  background: #fff;
  color: #3b424c;
  box-shadow: none;
}

.language-switch {
  padding: 4px 5px;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
}

.language-select {
  min-height: 24px;
  min-width: 104px;
  padding: 0 24px 0 7px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.language-select:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

.language-select option {
  background: #fff;
  color: #15161a;
}

.theme-switch__icon {
  display: inline-grid;
  width: 15px;
  height: 15px;
  place-items: center;
}

.theme-switch__icon svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.theme-switch__track {
  position: relative;
  width: 34px;
  height: 18px;
  border-radius: 999px;
  background: #cfd5dd;
  box-shadow: inset 0 0 0 1px rgba(17, 24, 39, 0.08);
}

.theme-switch__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 2px 5px rgba(17, 24, 39, 0.2);
  transition: transform 0.18s ease;
}

.theme-switch input:checked + .theme-switch__track {
  background: var(--red);
}

.theme-switch input:checked + .theme-switch__track .theme-switch__thumb {
  transform: translateX(16px);
}

.nav-menu .nav-cta {
  margin-left: 10px;
  padding: 25px 0 22px 14px;
  border: 0;
  border-left: 1px solid #dde2e8;
  border-radius: 0;
  background: transparent;
  color: var(--red-dark);
  box-shadow: none;
}

.nav-menu .nav-cta:hover,
.nav-menu .nav-cta:focus-visible {
  background: transparent;
  color: var(--red);
}

html[data-theme="dark"] {
  --ink: #f4f6f8;
  --ink-soft: #d3d8e0;
  --muted: #9fa8b5;
  --line: #2b313b;
  --paper: #151922;
  --soft: #0f1218;
  --soft-red: rgba(215, 25, 32, 0.14);
  --shadow: 0 12px 34px rgba(0, 0, 0, 0.32);
}

html[data-theme="dark"] body {
  background: #0f1218;
  color: var(--ink);
}

html[data-theme="dark"] .site-header {
  border-top-color: var(--red);
  border-bottom-color: #2b313b;
  background: rgba(13, 16, 22, 0.98);
  box-shadow: none;
}

html[data-theme="dark"] .site-header .brand img {
  padding: 5px 7px;
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16);
}

html[data-theme="dark"] .brand span {
  border-left-color: #596170;
  color: #f4f6f8;
}

html[data-theme="dark"] .brand small {
  color: #aeb6c2;
}

html[data-theme="dark"] .nav-menu a {
  background: transparent;
  color: #d3d8e0;
}

html[data-theme="dark"] .nav-menu a:hover,
html[data-theme="dark"] .nav-menu a[aria-current="page"] {
  background: transparent;
  color: #fff;
}

html[data-theme="dark"] .nav-menu a:hover::after,
html[data-theme="dark"] .nav-menu a[aria-current="page"]::after {
  background: var(--red);
}

html[data-theme="dark"] .nav-menu .nav-cta {
  border-left-color: #3a414d;
  background: transparent;
  color: #fff;
}

html[data-theme="dark"] .nav-menu .nav-cta:hover,
html[data-theme="dark"] .nav-menu .nav-cta:focus-visible {
  color: #ff858b;
  background: transparent;
}

html[data-theme="dark"] .theme-switch,
html[data-theme="dark"] .language-switch {
  border-color: #3a414d;
  background: #121620;
  color: #e8ecf2;
}

html[data-theme="dark"] .theme-switch__track {
  background: #3a414d;
}

html[data-theme="dark"] .language-select option {
  background: #121620;
  color: #e8ecf2;
}

html[data-theme="dark"] .nav-toggle {
  border-color: #3a414d;
  background: #121620;
}

html[data-theme="dark"] .nav-toggle span {
  background: #f4f6f8;
}

html[data-theme="dark"] .site-footer,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .card,
html[data-theme="dark"] .project-card,
html[data-theme="dark"] .timeline-item,
html[data-theme="dark"] .contact-card,
html[data-theme="dark"] .trust-bar div,
html[data-theme="dark"] .project-overview div,
html[data-theme="dark"] .workshop-meta div,
html[data-theme="dark"] .about-values div,
html[data-theme="dark"] .about-location {
  background: var(--paper);
  border-color: var(--line);
}

@media (max-width: 1120px) {
  .nav {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  .theme-switch,
  .language-switch {
    order: initial;
    margin-left: 0;
  }

  .nav-toggle {
    display: block;
  }

  .nav-menu {
    position: absolute;
    top: 72px;
    right: 16px;
    left: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: calc(100dvh - 92px);
    overflow: auto;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    box-shadow: var(--shadow);
  }

  .nav-menu.is-open {
    display: flex;
  }

  .nav-menu a,
  .nav-menu .nav-cta {
    padding: 12px 10px;
    border: 0;
    border-radius: 6px;
    text-align: left;
  }

  .nav-menu a::after,
  .nav-menu .nav-cta::after {
    display: none;
  }

  .nav-menu a:hover,
  .nav-menu a[aria-current="page"] {
    background: var(--soft-red);
    color: var(--red-dark);
  }

  html[data-theme="dark"] .nav-menu {
    background: #121620;
  }

  html[data-theme="dark"] .nav-menu a:hover,
  html[data-theme="dark"] .nav-menu a[aria-current="page"] {
    background: rgba(215, 25, 32, 0.14);
    color: #fff;
  }
}

@media (max-width: 760px) {
  .nav {
    min-height: 62px;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 7px;
  }

  .brand {
    min-width: 0;
    gap: 8px;
  }

  .brand img {
    width: 76px;
    min-width: 76px;
    max-height: 38px;
  }

  html[data-theme="dark"] .site-header .brand img {
    padding: 4px 5px;
  }

  .brand span {
    max-width: 150px;
    padding-left: 9px;
    overflow: hidden;
    font-size: 0.8rem;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .brand small {
    display: none;
  }

  .theme-switch,
  .language-switch {
    min-height: 30px;
    padding: 3px 5px;
    gap: 3px;
  }

  .language-switch {
    font-size: 0.66rem;
  }

  .language-select {
    min-width: 96px;
    min-height: 22px;
    padding-left: 4px;
  }

  .theme-switch__icon {
    width: 13px;
    height: 13px;
  }

  .theme-switch__icon svg {
    width: 12px;
    height: 12px;
  }

  .theme-switch__track {
    width: 30px;
    height: 16px;
  }

  .theme-switch__thumb {
    top: 3px;
    left: 3px;
    width: 10px;
    height: 10px;
  }

  .theme-switch input:checked + .theme-switch__track .theme-switch__thumb {
    transform: translateX(14px);
  }

  .nav-toggle {
    width: 36px;
    height: 36px;
  }

  .nav-menu {
    top: 65px;
    right: 12px;
    left: 12px;
  }
}

@media (max-width: 420px) {
  .brand img {
    width: 68px;
    min-width: 68px;
  }

  .brand span {
    max-width: 112px;
    font-size: 0.76rem;
  }

  .theme-switch__icon:first-child {
    display: none;
  }
}

/* compact desktop header fit */
@media (min-width: 1121px) {
  .nav {
    min-height: 64px;
  }

  .brand {
    min-width: 188px;
    gap: 10px;
  }

  .brand img {
    width: 104px;
  }

  .brand span {
    padding-left: 10px;
    font-size: 0.9rem;
  }

  .brand small {
    font-size: 0.66rem;
  }

  .nav-menu a,
  .nav-menu .nav-cta {
    white-space: nowrap;
  }

  .nav-menu a {
    padding: 21px 8px 18px;
    font-size: 0.86rem;
  }

  .nav-menu a::after {
    right: 8px;
    bottom: 14px;
    left: 8px;
  }

  .nav-menu .nav-cta {
    margin-left: 7px;
    padding: 21px 0 18px 10px;
  }

  .nav-menu .nav-cta::after {
    left: 10px;
  }
}

/* mobile overflow guard */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

img,
canvas,
svg,
video {
  max-width: 100%;
}

.admin-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 1180px) {
  .admin-grid--three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .container {
    width: min(100% - 28px, var(--container));
  }

  .project-card,
  .sponsor-card,
  .workshop-item,
  .admin-panel,
  .panel,
  .card {
    min-width: 0;
  }

  .project-links,
  .button-row,
  .filters {
    width: 100%;
  }

  .project-links a,
  .button,
  .filter-button {
    min-width: 0;
    white-space: normal;
  }

  .admin-grid--three {
    grid-template-columns: 1fr;
  }
}

/* coffee donation popup */
.coffee-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 88;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 6px 12px 6px 7px;
  border: 1px solid rgba(215, 25, 32, 0.3);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.14);
  cursor: pointer;
  font: inherit;
  font-weight: 850;
}

.coffee-fab img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.coffee-debug {
  position: fixed;
  left: 12px;
  bottom: 12px;
  z-index: 120;
  min-height: 30px;
  padding: 0 8px;
  border: 1px dashed #9aa3af;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.86);
  color: #343941;
  cursor: pointer;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 800;
}

.coffee-modal {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(8, 10, 14, 0.64);
  backdrop-filter: blur(7px);
}

.coffee-modal[hidden] {
  display: none;
}

.coffee-modal__card {
  position: relative;
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 22px;
  width: min(680px, 100%);
  padding: 28px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--red);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.32);
}

.coffee-modal__pet {
  align-self: center;
  width: 170px;
  max-width: 100%;
  filter: drop-shadow(0 12px 14px rgba(17, 24, 39, 0.18));
}

.coffee-modal__card h2 {
  margin: 0 0 12px;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.05;
}

.coffee-modal__card p:not(.eyebrow) {
  color: var(--muted);
}

.coffee-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  font-size: 1.3rem;
  line-height: 1;
}

html[data-theme="dark"] .coffee-fab,
html[data-theme="dark"] .coffee-debug,
html[data-theme="dark"] .coffee-modal__card,
html[data-theme="dark"] .coffee-modal__close {
  border-color: var(--line);
  background: var(--paper);
  color: var(--ink);
}

@media (max-width: 760px) {
  .coffee-fab {
    right: 12px;
    bottom: 12px;
  }

  .coffee-fab span {
    display: none;
  }

  .coffee-modal__card {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 24px;
  }

  .coffee-modal__pet {
    width: 132px;
    margin: -8px auto 0;
  }
}

/* keep coffee controls visible above BIT */
.coffee-fab {
  right: 18px;
  bottom: 196px;
  z-index: 126;
}

.coffee-debug {
  bottom: 58px;
  z-index: 126;
}

.coffee-modal {
  overflow: auto;
}

.coffee-modal__card {
  max-height: calc(100dvh - 36px);
  overflow: auto;
}

@media (max-width: 760px) {
  .coffee-fab {
    right: 12px;
    bottom: 150px;
    min-height: 44px;
    padding: 5px;
  }

  .coffee-fab img {
    width: 38px;
    height: 38px;
  }

  .coffee-debug {
    left: 10px;
    bottom: 58px;
  }
}

@media (max-width: 420px) {
  .coffee-fab {
    bottom: 136px;
  }
}

/* coffee button refinement */
.coffee-fab {
  min-width: 48px;
  justify-content: center;
}

.coffee-fab img {
  display: none;
}

.coffee-fab__cup {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  background: var(--soft-red);
  color: var(--red-dark);
}

.coffee-fab__cup svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.coffee-modal__pet {
  border-radius: 10px;
  background: #050505;
}

html[data-theme="dark"] .coffee-fab__cup {
  background: rgba(215, 25, 32, 0.16);
  color: #ff858b;
}

@media (max-width: 760px) {
  .coffee-fab__cup {
    width: 34px;
    height: 34px;
  }
}


/* project detail page */
.project-detail-hero {
  padding-bottom: 28px;
}

.detail-index {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.detail-index a {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 850;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(16, 17, 20, 0.05);
}

.detail-index a:hover {
  border-color: rgba(227, 6, 19, 0.34);
  color: var(--red-dark);
  background: var(--soft-red);
}

.project-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 28px;
  align-items: stretch;
  scroll-margin-top: 104px;
  margin-bottom: 34px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.project-detail.is-archived {
  background: linear-gradient(180deg, #ffffff 0%, #f8f9fb 100%);
}

.detail-copy h2 {
  margin: 0 0 14px;
  color: var(--ink);
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.04;
  letter-spacing: 0;
}

.detail-copy p {
  color: var(--muted);
}

.detail-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 22px;
}

.detail-columns h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 1.02rem;
}

.detail-columns p,
.detail-columns ul {
  margin: 0;
}

.detail-columns ul {
  display: grid;
  gap: 8px;
  padding-left: 20px;
  color: var(--muted);
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.detail-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-content: start;
}

.detail-gallery img {
  width: 100%;
  min-height: 0;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
  background: #fff;
}

.detail-gallery img:first-child {
  grid-column: 1 / -1;
  aspect-ratio: 16 / 9;
}

@media (max-width: 980px) {
  .project-detail {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 660px) {
  .project-detail {
    padding: 20px;
  }

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

  .detail-actions,
  .detail-actions .button {
    width: 100%;
  }
}


.project-card > img,
.detail-gallery img {
  cursor: zoom-in;
}

.project-card > img:focus-visible,
.detail-gallery img:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}

.image-carousel {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 72px;
  grid-template-rows: 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 28px;
  background: rgba(8, 9, 12, 0.86);
  backdrop-filter: blur(10px);
}

.image-carousel[hidden] {
  display: none;
}

.image-carousel__stage {
  grid-column: 2;
  display: grid;
  place-items: center;
  min-height: 0;
}

.image-carousel__image {
  display: block;
  max-width: min(100%, 1120px);
  max-height: calc(100vh - 150px);
  border-radius: 10px;
  object-fit: contain;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
}

.image-carousel__caption {
  grid-column: 2;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  text-align: center;
  font-weight: 750;
}

.image-carousel__button {
  display: inline-grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 1.5rem;
  font-weight: 900;
}

.image-carousel__button:hover {
  background: rgba(255, 255, 255, 0.2);
}

.image-carousel__close {
  position: absolute;
  top: 18px;
  right: 18px;
}

.image-carousel__prev {
  grid-column: 1;
  justify-self: center;
}

.image-carousel__next {
  grid-column: 3;
  justify-self: center;
}

@media (max-width: 660px) {
  .image-carousel {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr auto auto;
    padding: 18px;
  }

  .image-carousel__stage,
  .image-carousel__caption {
    grid-column: 1 / -1;
  }

  .image-carousel__prev,
  .image-carousel__next {
    grid-column: auto;
    grid-row: 3;
  }

  .image-carousel__image {
    max-height: calc(100vh - 180px);
  }
}


/* QR / link hub landing */
.qr-page {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(16, 17, 20, 0.2), rgba(16, 17, 20, 0.78)),
    url("img/local/local_1.jpeg") center / cover fixed;
  color: #fff;
}

.qr-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: rgba(16, 17, 20, 0.44);
  backdrop-filter: blur(2px);
}

.qr-shell {
  width: min(100%, 520px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 16px max(22px, env(safe-area-inset-bottom));
}

.qr-profile {
  display: grid;
  justify-items: center;
  padding: 18px 0 14px;
  text-align: center;
}

.qr-logo {
  display: inline-grid;
  width: 88px;
  height: 88px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.28);
}

.qr-logo img {
  width: 74px;
  height: 74px;
  object-fit: contain;
}

.qr-kicker {
  margin: 16px 0 6px;
  color: #ffb4b9;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.qr-profile h1 {
  margin: 0;
  font-size: clamp(2.35rem, 13vw, 4.2rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.qr-profile p:last-child {
  max-width: 28rem;
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1rem;
}

.qr-main-link,
.qr-link,
.qr-quick-grid a,
.qr-feature-strip a {
  color: inherit;
  text-decoration: none;
}

.qr-main-link {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 36px;
  gap: 14px;
  align-items: center;
  min-height: 108px;
  margin: 10px 0 14px;
  padding: 10px 12px 10px 10px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 18px;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  box-shadow: 0 24px 54px rgba(227, 6, 19, 0.32);
}

.qr-main-link__media {
  overflow: hidden;
  border-radius: 14px;
}

.qr-main-link__media img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.qr-main-link__copy {
  display: grid;
  gap: 4px;
}

.qr-main-link strong,
.qr-link strong {
  display: block;
  font-size: 1.1rem;
  line-height: 1.1;
}

.qr-main-link small,
.qr-link small {
  display: block;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 650;
  line-height: 1.3;
}

.qr-arrow {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.qr-arrow svg,
.qr-link__icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.qr-quick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.qr-quick-grid a {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-height: 104px;
  padding: 12px 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(12px);
  font-weight: 900;
}

.qr-quick-grid img {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  object-fit: cover;
  background: #fff;
}

.qr-link-stack {
  display: grid;
  gap: 10px;
}

.qr-link {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 68px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  background: rgba(17, 18, 22, 0.72);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(14px);
}

.qr-link--discord {
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.92), rgba(17, 18, 22, 0.82));
}

.qr-link__icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.qr-feature-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.qr-feature-strip a {
  position: relative;
  overflow: hidden;
  min-height: 112px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  background: #111216;
}

.qr-feature-strip img {
  width: 100%;
  height: 100%;
  min-height: 112px;
  object-fit: cover;
  opacity: 0.76;
}

.qr-feature-strip span {
  position: absolute;
  right: 10px;
  bottom: 8px;
  left: 10px;
  font-weight: 900;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.52);
}

.qr-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 18px 0 4px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.86rem;
  font-weight: 750;
  text-align: center;
}

.qr-footer img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.qr-main-link:active,
.qr-link:active,
.qr-quick-grid a:active,
.qr-feature-strip a:active {
  transform: translateY(1px);
}

.qr-main-link:focus-visible,
.qr-link:focus-visible,
.qr-quick-grid a:focus-visible,
.qr-feature-strip a:focus-visible,
.qr-logo:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

@media (min-width: 720px) {
  .qr-shell {
    padding-top: 36px;
    padding-bottom: 36px;
  }

  .qr-main-link,
  .qr-link,
  .qr-quick-grid a,
  .qr-feature-strip a {
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
  }

  .qr-main-link:hover,
  .qr-link:hover,
  .qr-quick-grid a:hover,
  .qr-feature-strip a:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.38);
  }
}

@media (max-width: 380px) {
  .qr-shell {
    padding-right: 12px;
    padding-left: 12px;
  }

  .qr-main-link {
    grid-template-columns: 78px minmax(0, 1fr) 30px;
  }

  .qr-quick-grid a {
    min-height: 94px;
    font-size: 0.88rem;
  }

  .qr-quick-grid img {
    width: 46px;
    height: 46px;
  }
}


/* donation button: icon-only, replacing debug position */
.coffee-fab {
  right: auto;
  left: 12px;
  bottom: 12px;
  z-index: 126;
  width: 54px;
  height: 54px;
  min-width: 54px;
  min-height: 54px;
  padding: 0;
  justify-content: center;
}

.coffee-fab__cup {
  width: 38px;
  height: 38px;
}

.coffee-debug {
  display: none;
}

@media (max-width: 760px) {
  .coffee-fab {
    right: auto;
    left: 10px;
    bottom: 58px;
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    padding: 0;
  }

  .coffee-fab__cup {
    width: 34px;
    height: 34px;
  }
}

@media (max-width: 420px) {
  .coffee-fab {
    bottom: 58px;
  }
}


/* WhatsApp-style mascot chat */
.pet-assistant__bubble {
  width: min(370px, calc(100vw - 28px));
  overflow: hidden;
  padding: 0;
  border-radius: 14px;
  background: #f2f5f1;
}

.pet-assistant__bubble::after {
  display: none;
}

.pet-assistant__top {
  margin: 0;
  padding: 11px 12px;
  border-bottom: 1px solid rgba(17, 24, 39, 0.08);
  background: #111216;
  color: #fff;
}

.pet-assistant__top strong {
  font-size: 0.98rem;
}

.pet-assistant__messages {
  display: grid;
  gap: 8px;
  max-height: 280px;
  overflow: auto;
  padding: 12px;
  background:
    linear-gradient(rgba(242, 245, 241, 0.93), rgba(242, 245, 241, 0.93)),
    radial-gradient(circle at 18px 18px, rgba(17, 24, 39, 0.08) 1px, transparent 1.5px);
  background-size: auto, 22px 22px;
}

.pet-message {
  width: fit-content;
  max-width: 86%;
  margin: 0;
  padding: 9px 11px;
  border-radius: 14px;
  font-size: 0.91rem;
  font-weight: 550;
  line-height: 1.35;
  box-shadow: 0 3px 9px rgba(17, 24, 39, 0.08);
}

.pet-message--bot {
  justify-self: start;
  border-top-left-radius: 4px;
  background: #fff;
  color: #22262d;
}

.pet-message--user {
  justify-self: end;
  border-top-right-radius: 4px;
  background: #d9fdd3;
  color: #132018;
}

.pet-assistant__form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid rgba(17, 24, 39, 0.08);
  background: #f7f8fa;
}

.pet-assistant__form input {
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid #d7dde5;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 0.92rem;
}

.pet-assistant__form button {
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  cursor: pointer;
}

.pet-assistant__form button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pet-assistant__questions,
.pet-assistant__links,
.pet-assistant__answer {
  display: none;
}

html[data-theme="dark"] .pet-assistant__bubble {
  background: #111419;
}

html[data-theme="dark"] .pet-assistant__messages {
  background: #121620;
}

html[data-theme="dark"] .pet-message--bot,
html[data-theme="dark"] .pet-assistant__form input {
  background: #202630;
  color: #f4f6f8;
  border-color: #3a414d;
}

html[data-theme="dark"] .pet-message--user {
  background: #25452f;
  color: #f2fff4;
}

html[data-theme="dark"] .pet-assistant__form {
  background: #171b22;
  border-top-color: #303641;
}

@media (max-width: 660px) {
  .pet-assistant__bubble {
    width: min(350px, calc(100vw - 18px));
  }

  .pet-assistant__messages {
    max-height: 250px;
  }
}


/* Functional mascot chat polish */
.pet-assistant__bubble {
  border: 1px solid rgba(17, 24, 39, 0.16);
  box-shadow: 0 22px 60px rgba(17, 24, 39, 0.24);
}

.pet-assistant__top {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 9px;
  min-height: 56px;
  background: linear-gradient(135deg, #111216, #272b33);
}

.pet-assistant__top div {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.pet-assistant__top small {
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.72rem;
  font-weight: 650;
}

.pet-assistant__avatar {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: #fff;
}

.pet-assistant__avatar img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.pet-assistant__top .pet-assistant__close {
  width: 30px;
  height: 30px;
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.pet-assistant__messages {
  min-height: 220px;
  max-height: min(390px, calc(100dvh - 250px));
}

.pet-message {
  display: grid;
  gap: 8px;
}

.pet-message p {
  margin: 0;
}

.pet-message__links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pet-message__links a {
  display: inline-flex;
  align-items: center;
  min-height: 31px;
  padding: 0 10px;
  border: 1px solid rgba(227, 6, 19, 0.24);
  border-radius: 999px;
  background: var(--soft-red);
  color: var(--red-dark);
  font-size: 0.82rem;
  font-weight: 850;
  text-decoration: none;
}

.pet-message__links a:hover,
.pet-message__links a:focus-visible {
  border-color: var(--red);
  background: #fff;
}

.pet-assistant__chips {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 9px 10px 0;
  background: #f7f8fa;
}

.pet-assistant__chips button {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid #d7dde5;
  border-radius: 999px;
  background: #fff;
  color: #252a31;
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
}

.pet-assistant__chips button:hover {
  border-color: rgba(227, 6, 19, 0.32);
  color: var(--red-dark);
}

.pet-message--typing {
  display: flex;
  width: auto;
  min-width: 52px;
  align-items: center;
  gap: 4px;
  padding: 11px 13px;
}

.pet-message--typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #9aa3af;
  animation: petTyping 0.9s infinite ease-in-out;
}

.pet-message--typing span:nth-child(2) {
  animation-delay: 0.14s;
}

.pet-message--typing span:nth-child(3) {
  animation-delay: 0.28s;
}

@keyframes petTyping {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.45; }
  40% { transform: translateY(-3px); opacity: 1; }
}

.pet-assistant__form button:disabled,
.pet-assistant__form input:disabled {
  opacity: 0.68;
  cursor: wait;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html[data-theme="dark"] .pet-assistant__chips {
  background: #171b22;
}

html[data-theme="dark"] .pet-assistant__chips button {
  border-color: #3a414d;
  background: #202630;
  color: #f4f6f8;
}

html[data-theme="dark"] .pet-message__links a {
  border-color: rgba(255, 133, 139, 0.28);
  background: rgba(215, 25, 32, 0.14);
  color: #ffb4b8;
}


/* tag-based project filters */
.project-meta {
  flex-wrap: wrap;
  justify-content: flex-start;
}

.project-meta .tag {
  margin-bottom: 0;
}

.project-card[hidden] {
  display: none;
}

.tag-filters {
  align-items: flex-start;
}

.project-state {
  display: none;
}


/* workshop icons */
.workshop-icon {
  display: grid;
  width: 150px;
  height: 104px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
}

.workshop-icon svg {
  width: 68px;
  height: 68px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.workshop-icon--linux {
  background: #111216;
  color: #fff;
}

.workshop-icon--shell {
  background: #f0fdf4;
  color: #126c3b;
}

.workshop-icon--git {
  background: #fff1f2;
  color: var(--red-dark);
}

@media (max-width: 760px) {
  .workshop-icon {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }
}


.poster-layout {
  align-items: start;
}

.poster-preview {
  position: sticky;
  top: 96px;
}

.poster-preview > canvas {
  width: 100%;
  max-height: min(78vh, 980px);
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  object-fit: contain;
}

.poster-format-picker {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.poster-format-picker legend {
  grid-column: 1 / -1;
  margin-bottom: 2px;
  color: var(--ink);
  font-weight: 850;
}

.poster-format-picker label {
  display: grid;
  min-width: 0;
  justify-items: center;
  gap: 5px;
  padding: 9px 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.poster-format-picker label:hover {
  border-color: rgba(227, 6, 19, 0.42);
  transform: translateY(-1px);
}

.poster-format-picker input:checked + label {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(227, 6, 19, 0.12);
}

.poster-format-picker input:focus-visible + label {
  outline: 3px solid rgba(227, 6, 19, 0.32);
  outline-offset: 3px;
}

.poster-format-picker strong,
.poster-format-picker small {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.poster-format-picker strong {
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 850;
}

.poster-format-picker small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 750;
}

.format-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
}

.format-icon::before {
  content: "";
  display: block;
  border: 2px solid var(--ink);
  border-top: 5px solid var(--red);
  border-radius: 3px;
  background: linear-gradient(#fff 0 0) padding-box;
}

.format-icon--feed::before { width: 24px; height: 30px; }
.format-icon--story::before { width: 18px; height: 34px; }
.format-icon--square::before { width: 28px; height: 28px; }
.format-icon--landscape::before { width: 34px; height: 19px; }
.format-icon--a4::before { width: 22px; height: 32px; border-radius: 2px; }

.poster-mini-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.poster-mini-card {
  display: grid;
  min-width: 0;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.poster-mini-card:hover {
  border-color: rgba(227, 6, 19, 0.42);
  transform: translateY(-1px);
}

.poster-mini-card.is-active {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(227, 6, 19, 0.12);
}

.poster-mini-card canvas {
  width: 100%;
  height: auto;
  aspect-ratio: 15 / 19;
  border: 1px solid rgba(17, 18, 22, 0.08);
  border-radius: 6px;
  background: #fff;
}

.poster-mini-card span {
  overflow: hidden;
  font-size: 0.72rem;
  font-weight: 850;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.poster-form {
  display: grid;
  gap: 14px;
}

.poster-form label {
  display: grid;
  gap: 7px;
  font-weight: 800;
  color: var(--ink);
}

.poster-form input,
.poster-form select {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 650;
}

.poster-form input[type="file"] {
  min-width: 0;
  padding: 8px;
  font-size: 0.92rem;
}

.poster-form input[type="file"]::file-selector-button {
  margin-right: 10px;
  border: 0;
  border-radius: 7px;
  padding: 8px 10px;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.poster-credit-grid {
  align-items: end;
}

.poster-form .check-field {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.poster-form .check-field input {
  width: 18px;
  min-height: 18px;
  height: 18px;
  padding: 0;
  accent-color: var(--red);
}

.poster-actions {
  margin-top: 4px;
}

@media (max-width: 900px) {
  .poster-preview {
    position: static;
  }

  .poster-preview > canvas {
    max-height: none;
  }
}

@media (max-width: 640px) {
  .poster-format-picker {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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


/* static content manager */
.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}

.admin-panel {
  display: grid;
  gap: 14px;
}

.admin-panel label,
.admin-code-label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-weight: 800;
}

.admin-panel input,
.admin-panel textarea,
.admin-panel select,
.admin-code-label textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 650;
}

.admin-panel textarea,
.admin-code-label textarea {
  resize: vertical;
}

.admin-output {
  display: grid;
  gap: 18px;
}

.admin-lists {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.admin-lists h3 {
  margin-top: 0;
}

.admin-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.admin-row + .admin-row {
  margin-top: 10px;
}

.admin-row strong,
.admin-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-row span {
  grid-column: 1;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.admin-row button {
  grid-row: 1 / span 2;
  grid-column: 2;
  width: auto;
}

html[data-theme="dark"] .admin-panel input,
html[data-theme="dark"] .admin-panel textarea,
html[data-theme="dark"] .admin-panel select,
html[data-theme="dark"] .admin-code-label textarea,
html[data-theme="dark"] .admin-row {
  border-color: var(--line);
  background: var(--paper);
  color: var(--ink);
}

@media (max-width: 900px) {
  .admin-grid,
  .admin-lists {
    grid-template-columns: 1fr;
  }
}

.admin-grid.admin-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 1180px) {
  .admin-grid.admin-grid--three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .admin-grid.admin-grid--three {
    grid-template-columns: 1fr;
  }
}

/* sponsors */
.sponsors-section {
  padding-top: 8px;
}

.sponsor-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.sponsor-card {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 18px;
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.sponsor-logo {
  display: grid;
  min-height: 96px;
  place-items: center;
  border: 1px solid rgba(17, 18, 22, 0.1);
  border-radius: 8px;
  background: linear-gradient(135deg, #fff, #f4f6f8);
  color: var(--ink);
  font-size: clamp(1.5rem, 4vw, 2.8rem);
  font-weight: 900;
  letter-spacing: 0;
}

.sponsor-logo img {
  max-width: min(220px, 82%);
  max-height: 72px;
  object-fit: contain;
}

.sponsor-logo--imq {
  border-top: 5px solid var(--red);
}

.sponsor-logo--yumi {
  border-top: 5px solid #111216;
}

.sponsor-logo--swarming {
  border-top: 5px solid var(--red-dark);
}

.sponsor-card h3 {
  margin: 10px 0 8px;
  font-size: 1.18rem;
  line-height: 1.2;
}

.sponsor-card p {
  margin: 0;
  color: var(--muted);
}

html[data-theme="dark"] .sponsor-card {
  border-color: var(--line);
  background: var(--paper);
}

html[data-theme="dark"] .sponsor-logo {
  border-color: #3a414d;
  background: linear-gradient(135deg, #151922, #10131a);
  color: #f4f6f8;
}

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

  .sponsor-card {
    grid-template-columns: 130px minmax(0, 1fr);
    grid-template-rows: auto;
    align-items: center;
  }

  .sponsor-logo {
    min-height: 104px;
  }
}

@media (max-width: 560px) {
  .sponsor-card {
    grid-template-columns: 1fr;
  }
}

/* status pages */
.status-page {
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(227, 6, 19, 0.08), rgba(17, 18, 22, 0.04)),
    var(--soft);
}

.status-shell {
  display: grid;
  width: min(760px, calc(100% - 32px));
  min-height: 100vh;
  align-content: center;
  gap: 22px;
  margin: 0 auto;
  padding: 36px 0;
}

.status-brand img {
  width: 190px;
  height: auto;
}

.status-panel {
  padding: clamp(28px, 6vw, 54px);
  border: 1px solid var(--line);
  border-top: 5px solid var(--red);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow);
}

.status-panel h1 {
  margin: 0;
  font-size: clamp(2.4rem, 8vw, 5.4rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.status-panel p:not(.eyebrow) {
  max-width: 600px;
  color: var(--muted);
  font-size: 1.08rem;
}

.status-footer {
  color: var(--muted);
  font-weight: 750;
}


/* keep workshop PNG icons proportional */
.workshop-item {
  grid-template-columns: 112px 150px minmax(0, 1fr);
}

.workshop-item > img {
  width: 112px;
  height: 112px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  object-fit: contain;
}

@media (max-width: 760px) {
  .workshop-item > img {
    width: 100%;
    height: auto;
    max-height: 180px;
    aspect-ratio: 1 / 1;
    object-fit: contain;
  }
}

/* final mobile audit overrides */
@media (max-width: 760px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .container {
    width: calc(100% - 32px);
    max-width: var(--container);
    margin-inline: auto;
  }

  .site-header {
    min-width: 0;
  }

  .nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    min-height: 58px;
    gap: 8px;
  }

  .brand {
    min-width: 0;
    max-width: 100%;
    gap: 8px;
  }

  .brand img {
    width: 52px;
    min-width: 52px;
    height: auto;
    max-height: 32px;
    object-fit: contain;
    border-radius: 6px;
  }

  .brand span {
    max-width: 150px;
    padding-left: 0;
    overflow: hidden;
    font-size: 0.78rem;
    line-height: 1.1;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .brand small,
  .language-switch {
    display: none;
  }

  .theme-switch {
    min-height: 32px;
    padding: 4px;
    gap: 4px;
  }

  .theme-switch__icon {
    width: 14px;
    height: 14px;
  }

  .theme-switch__icon svg {
    width: 13px;
    height: 13px;
  }

  .theme-switch__track {
    width: 32px;
    height: 18px;
  }

  .theme-switch__thumb {
    top: 3px;
    left: 3px;
    width: 12px;
    height: 12px;
  }

  .theme-switch input:checked + .theme-switch__track .theme-switch__thumb {
    transform: translateX(14px);
  }

  .nav-toggle {
    width: 36px;
    height: 36px;
  }

  .nav-menu {
    top: 62px;
    right: 16px;
    left: 16px;
    max-height: calc(100dvh - 76px);
    overflow-y: auto;
    border-radius: 8px;
  }

  .nav-menu a,
  .nav-menu .nav-cta {
    min-height: 42px;
    padding: 10px 12px;
    white-space: normal;
  }

  .hero,
  .page-hero,
  .workshop-hero {
    padding-top: 32px;
    padding-bottom: 40px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .hero h1,
  .page-hero h1,
  .workshop-hero h1 {
    width: 100%;
    max-width: none;
    margin-inline: 0;
    font-size: clamp(2.05rem, 10.5vw, 2.8rem);
    line-height: 1.06;
    overflow-wrap: normal;
    text-wrap: balance;
  }

  .hero-lead,
  .page-hero p,
  .workshop-hero p {
    max-width: none;
    font-size: 0.98rem;
    line-height: 1.55;
  }

  .eyebrow {
    font-size: 0.72rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }

  .section {
    padding-block: 44px;
  }

  .section-title,
  .section-title.split,
  .two-col,
  .hero-actions,
  .button-row {
    grid-template-columns: 1fr;
  }

  .section-title h2,
  .cta-band h2 {
    font-size: clamp(1.75rem, 8vw, 2.35rem);
    line-height: 1.12;
  }

  .hero-actions,
  .button-row {
    width: 100%;
    gap: 10px;
  }

  .button {
    width: 100%;
    min-height: 44px;
    justify-content: center;
    padding-inline: 14px;
    text-align: center;
  }

  .hero-media,
  .panel,
  .card,
  .project-card,
  .workshop-item,
  .sponsor-card,
  .contact-card,
  .admin-panel,
  .status-panel {
    width: 100%;
    max-width: 100%;
    border-radius: 8px;
  }

  .hero-media img,
  .project-card > img,
  .workshop-item > img {
    width: 100%;
    max-height: 230px;
    object-fit: cover;
  }

  .project-card > img,
  .workshop-item > img {
    aspect-ratio: 16 / 10;
  }

  .project-body,
  .card,
  .panel,
  .contact-card,
  .sponsor-card {
    padding: 18px;
  }

  .project-grid,
  .cards,
  .sponsor-grid,
  .contact-grid,
  .admin-grid,
  .admin-grid.admin-grid--three,
  .admin-lists,
  .poster-layout,
  .poster-form-grid,
  .poster-custom-image,
  .timeline,
  .workshop-detail-grid,
  .linktree-grid {
    grid-template-columns: 1fr;
  }

  .trust-bar,
  .filters {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .filters {
    padding: 10px;
  }

  .filter-button {
    min-height: 40px;
    padding: 8px 10px;
    font-size: 0.82rem;
    line-height: 1.15;
    white-space: normal;
  }

  .project-meta,
  .project-links,
  .workshop-meta,
  .tag-list,
  .tags {
    gap: 6px;
  }

  .tag,
  .project-meta span,
  .workshop-meta span {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .workshop-item {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 16px;
  }

  .workshop-item > img {
    height: auto;
    max-height: 210px;
    padding: 12px;
    object-fit: contain;
  }

  .workshop-date {
    display: inline-flex;
    width: fit-content;
    min-width: 0;
  }

  .poster-shell,
  .poster-output,
  .poster-preview-panel {
    min-width: 0;
  }

  .poster-format-picker,
  .poster-mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .poster-format-option,
  .poster-mini-card {
    min-width: 0;
  }

  .poster-preview-wrap {
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .poster-canvas,
  canvas {
    max-width: 100%;
  }

  .pet-assistant {
    right: 12px;
    bottom: 12px;
    transform: scale(0.9);
    transform-origin: right bottom;
  }

  .pet-assistant__hint {
    display: none;
  }
}

@media (max-width: 420px) {
  .container {
    width: calc(100% - 24px);
  }

  .brand img {
    width: 46px;
    min-width: 46px;
    max-height: 30px;
  }

  .brand span {
    max-width: 118px;
    font-size: 0.73rem;
  }

  .theme-switch__icon:first-child {
    display: none;
  }

  .hero h1,
  .page-hero h1,
  .workshop-hero h1 {
    font-size: clamp(1.9rem, 10vw, 2.45rem);
  }

  .trust-bar,
  .filters,
  .poster-format-picker,
  .poster-mini-grid {
    grid-template-columns: 1fr;
  }

  .hero-media-footer {
    grid-template-columns: 1fr;
  }
}

/* final mobile tightening after device audit */
@media (max-width: 760px) {
  .theme-switch input,
  .language-switch input {
    width: 1px;
    height: 1px;
    margin: 0;
  }

  .page-hero,
  .workshop-hero {
    padding-top: 28px;
    padding-bottom: 34px;
  }

  .page-hero h1,
  .workshop-hero h1 {
    font-size: clamp(1.85rem, 8.2vw, 2.25rem);
    line-height: 1.08;
  }

  .hero h1 {
    font-size: clamp(2rem, 9.6vw, 2.55rem);
  }

  .about-hero,
  .workshop-hero {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .about-hero img,
  .workshop-hero img {
    max-height: 205px;
    padding: 0;
    object-fit: cover;
  }

  .workshop-hero img {
    padding: 14px;
    object-fit: contain;
  }

  .about-values {
    grid-template-columns: 1fr;
    margin-bottom: 40px;
  }

  .local-preview__frame img {
    max-height: 260px;
    object-fit: cover;
  }

  .footer-inner,
  .footer-links {
    grid-template-columns: 1fr;
  }

  .footer-links {
    gap: 8px;
  }
}

@media (max-width: 420px) {
  .page-hero h1,
  .workshop-hero h1 {
    font-size: clamp(1.75rem, 8.8vw, 2.08rem);
  }

  .hero h1 {
    font-size: clamp(1.9rem, 9.4vw, 2.35rem);
  }
}

/* hackathon countdown page */
.hackathon-page {
  min-height: 100vh;
  background: #0f1014;
  color: #fff;
}

.hackathon-shell {
  position: relative;
  isolation: isolate;
  display: grid;
  width: min(1180px, calc(100% - 32px));
  min-height: 100vh;
  gap: 28px;
  margin: 0 auto;
  padding: 24px 0 36px;
}

.hackathon-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background: url("img/header.jpg") center / cover no-repeat;
  opacity: 0.28;
}

.hackathon-shell::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(15, 16, 20, 0.94), rgba(15, 16, 20, 0.78) 48%, rgba(227, 6, 19, 0.22)),
    radial-gradient(circle at 78% 18%, rgba(227, 6, 19, 0.38), transparent 30%),
    linear-gradient(transparent 23px, rgba(255, 255, 255, 0.05) 24px),
    linear-gradient(90deg, transparent 23px, rgba(255, 255, 255, 0.05) 24px);
  background-size: auto, auto, 24px 24px, 24px 24px;
}

.hackathon-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.hackathon-brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.hackathon-brand img {
  width: 136px;
  height: auto;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
}

.hackathon-nav-link,
.hackathon-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-weight: 850;
  text-decoration: none;
}

.hackathon-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.74fr);
  gap: clamp(24px, 6vw, 72px);
  align-items: end;
  min-height: min(680px, calc(100vh - 210px));
  padding: clamp(42px, 9vw, 108px) 0 18px;
}

.hackathon-kicker {
  margin: 0 0 14px;
  color: #ffb8bd;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hackathon-copy h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(3.6rem, 10vw, 8.8rem);
  line-height: 0.88;
  letter-spacing: 0;
}

.hackathon-lead {
  max-width: 690px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(1.02rem, 2vw, 1.22rem);
}

.hackathon-countdown {
  display: grid;
  gap: 18px;
  padding: clamp(18px, 4vw, 28px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-top: 5px solid var(--red);
  border-radius: 8px;
  background: rgba(15, 16, 20, 0.78);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(14px);
}

.hackathon-countdown__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
  font-weight: 850;
  text-transform: uppercase;
}

.hackathon-countdown__top strong {
  color: #fff;
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.countdown-grid div {
  display: grid;
  min-width: 0;
  gap: 4px;
  padding: 14px 8px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  text-align: center;
}

.countdown-grid strong {
  font-size: clamp(1.8rem, 4vw, 3.3rem);
  line-height: 1;
}

.countdown-grid span,
.hackathon-date {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hackathon-date {
  margin: 0;
}

.hackathon-track {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
}

.hackathon-track article {
  min-width: 0;
  padding: 22px;
  background: rgba(15, 16, 20, 0.72);
}

.hackathon-track span {
  color: var(--red);
  font-weight: 950;
}

.hackathon-track h2 {
  margin: 10px 0 8px;
  font-size: 1.25rem;
}

.hackathon-track p,
.hackathon-lab p {
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
}

.hackathon-lab {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
}

.hackathon-lab img {
  width: 100%;
  height: 100%;
  max-height: 340px;
  border-radius: 8px;
  object-fit: cover;
}

.hackathon-lab h2 {
  max-width: 680px;
  margin: 0 0 14px;
  font-size: clamp(2rem, 5vw, 3.8rem);
  line-height: 1;
}

.hackathon-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hackathon-actions a:first-child {
  background: #fff;
  color: var(--ink);
}

.hackathon-actions a:last-child {
  background: var(--red);
  border-color: var(--red);
}

@media (max-width: 820px) {
  .hackathon-shell {
    width: calc(100% - 28px);
    gap: 20px;
    padding-top: 16px;
  }

  .hackathon-brand img {
    width: 112px;
  }

  .hackathon-hero,
  .hackathon-lab,
  .hackathon-track {
    grid-template-columns: 1fr;
  }

  .hackathon-hero {
    min-height: auto;
    padding: 42px 0 8px;
  }

  .hackathon-copy h1 {
    font-size: clamp(3rem, 18vw, 4.8rem);
  }

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

  .hackathon-lab {
    padding: 14px;
  }

  .hackathon-lab img {
    max-height: 220px;
  }

  .hackathon-actions {
    display: grid;
  }
}

/* final content polish */
html[data-theme="dark"] .site-footer .brand img {
  filter: brightness(0) invert(1);
}

.detail-gallery {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.detail-gallery img:first-child {
  grid-column: 1 / -1;
}

.detail-gallery img:nth-child(n + 2) {
  aspect-ratio: 1 / 1;
}

.workshop-hero {
  gap: clamp(22px, 5vw, 48px);
  padding-top: 46px;
  padding-bottom: 22px;
}

.workshop-hero img {
  max-width: 320px;
  margin-inline: auto;
  padding: clamp(16px, 4vw, 34px);
  box-shadow: 0 12px 34px rgba(21, 22, 26, 0.08);
}

.workshop-meta {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  overflow: visible;
  margin-bottom: 34px;
  border: 0;
  background: transparent;
}

.workshop-meta div {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.workshop-meta span {
  font-size: 0.95rem;
  line-height: 1.25;
}

.workshop-detail,
.workshop-materials {
  align-items: start;
  padding-block: 34px;
}

.workshop-detail .section-title h2,
.workshop-materials .section-title h2 {
  font-size: clamp(1.7rem, 4vw, 2.7rem);
  line-height: 1.12;
}

.workshop-detail .panel,
.workshop-materials .panel {
  padding: 18px;
  overflow: visible;
}

.workshop-detail .check-list,
.workshop-materials .check-list {
  gap: 10px;
}

.workshop-detail .check-list li,
.workshop-materials .check-list li {
  padding: 14px 16px 14px 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  font-weight: 600;
}

.workshop-detail .check-list li + li,
.workshop-materials .check-list li + li {
  border-top: 1px solid var(--line);
}

.workshop-detail .check-list li::before,
.workshop-materials .check-list li::before {
  left: 16px;
  top: 17px;
  width: 12px;
  height: 12px;
}

html[data-theme="dark"] .workshop-detail .check-list li,
html[data-theme="dark"] .workshop-materials .check-list li,
html[data-theme="dark"] .workshop-meta div {
  background: rgba(255, 255, 255, 0.035);
}

@media (max-width: 900px) {
  .workshop-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 560px) {
  .workshop-meta,
  .detail-gallery {
    grid-template-columns: 1fr;
  }

  .workshop-hero img {
    max-width: 220px;
  }
}

/* project cards final polish */
.project-grid {
  align-items: stretch;
}

.project-card {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border-radius: 8px;
  border-color: rgba(17, 18, 22, 0.1);
  background: #fff;
  box-shadow: 0 16px 42px rgba(21, 22, 26, 0.08);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.project-card:hover {
  transform: translateY(-3px);
  border-color: rgba(227, 6, 19, 0.34);
  box-shadow: 0 22px 54px rgba(21, 22, 26, 0.13);
}

.project-card > img {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #f2f3f5;
  object-fit: cover;
  filter: saturate(1.04) contrast(1.02);
}

.project-body {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 12px;
  padding: 18px;
}

.project-body h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.22rem;
  line-height: 1.16;
}

.project-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.48;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-meta .tag,
.project-card .tag {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 4px 9px;
  border: 1px solid rgba(227, 6, 19, 0.2);
  border-radius: 999px;
  background: rgba(227, 6, 19, 0.08);
  color: var(--red-dark);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.project-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid rgba(227, 6, 19, 0.24);
  border-radius: 8px;
  background: #fff;
  color: var(--red-dark);
  font-size: 0.86rem;
  font-weight: 900;
  text-decoration: none;
}

.project-links a:first-child {
  background: var(--red);
  color: #fff;
}

.project-links a:hover {
  border-color: var(--red);
  background: var(--red-dark);
  color: #fff;
}

html[data-theme="dark"] .project-card {
  border-color: rgba(255, 255, 255, 0.11);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.028)), #12151d;
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.34);
}

html[data-theme="dark"] .project-card:hover {
  border-color: rgba(227, 6, 19, 0.58);
  box-shadow: 0 24px 66px rgba(0, 0, 0, 0.46);
}

html[data-theme="dark"] .project-card > img {
  background: #0b0d12;
  filter: saturate(0.98) contrast(1.05) brightness(0.86);
}

html[data-theme="dark"] .project-body h3 {
  color: #fff;
}

html[data-theme="dark"] .project-body p {
  color: #c1c8d2;
}

html[data-theme="dark"] .project-meta .tag,
html[data-theme="dark"] .project-card .tag {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(227, 6, 19, 0.18);
  color: #ffd6d9;
}

html[data-theme="dark"] .project-links a {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #f3f5f7;
}

html[data-theme="dark"] .project-links a:first-child {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
}

html[data-theme="dark"] .project-links a:hover {
  border-color: #ff5a63;
  background: #ff2f3b;
  color: #fff;
}

@media (max-width: 760px) {
  .project-card {
    box-shadow: 0 12px 30px rgba(21, 22, 26, 0.08);
  }

  .project-body {
    gap: 10px;
    padding: 16px;
  }

  .project-links a {
    flex: 1 1 130px;
  }
}

/* simplified hackathon teaser */
.hackathon-page--teaser .hackathon-shell {
  min-height: 100vh;
}

.hackathon-teaser {
  align-content: space-between;
}

.hackathon-teaser__hero {
  display: grid;
  max-width: 860px;
  gap: 20px;
  padding: clamp(72px, 12vw, 150px) 0 clamp(52px, 8vw, 96px);
}

.hackathon-teaser__hero h1 {
  margin: 0;
  font-size: clamp(3rem, 10vw, 8rem);
  line-height: 0.92;
  letter-spacing: 0;
}

.hackathon-teaser__hero p:not(.hackathon-kicker) {
  max-width: 620px;
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.hackathon-teaser__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.hackathon-teaser__links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-weight: 900;
  text-decoration: none;
}

.hackathon-teaser__links a:first-child {
  background: var(--red);
  border-color: var(--red);
}

/* lighter workshop detail pages */
body:has(.workshop-hero) .section {
  padding-block: 26px;
}

.workshop-hero {
  min-height: 0;
  padding-top: 36px;
  padding-bottom: 18px;
}

.workshop-hero h1 {
  max-width: 720px;
  font-size: clamp(2.2rem, 6vw, 4.1rem);
}

.workshop-hero p {
  max-width: 680px;
}

.workshop-hero .button-row {
  margin-top: 18px;
}

.workshop-meta {
  max-width: 980px;
  margin-inline: auto;
  margin-bottom: 20px;
}

.workshop-detail,
.workshop-materials {
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1fr);
  max-width: 980px;
  margin-inline: auto;
  gap: 22px;
}

.workshop-detail .section-title,
.workshop-materials .section-title {
  max-width: none;
  margin: 0;
}

.workshop-detail .section-title h2,
.workshop-materials .section-title h2 {
  font-size: clamp(1.45rem, 3.4vw, 2.2rem);
}

.workshop-detail .section-title p:not(.eyebrow),
.workshop-materials .section-title p:not(.eyebrow) {
  font-size: 0.98rem;
}

.workshop-detail .panel,
.workshop-materials .panel {
  padding: 14px;
  box-shadow: 0 8px 24px rgba(21, 22, 26, 0.05);
}

.workshop-detail .check-list li,
.workshop-materials .check-list li {
  padding-block: 12px;
  font-size: 0.95rem;
}

@media (max-width: 760px) {
  .hackathon-teaser__links {
    display: grid;
  }

  .workshop-detail,
  .workshop-materials {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .workshop-hero h1 {
    font-size: clamp(1.95rem, 9vw, 2.75rem);
  }
}

/* extra compact workshop mobile pass */
@media (max-width: 760px) {
  body:has(.workshop-hero) .page-hero,
  body:has(.workshop-hero) .workshop-hero {
    padding-top: 22px;
    padding-bottom: 16px;
  }

  .workshop-hero {
    gap: 12px;
  }

  .workshop-hero h1 {
    font-size: clamp(1.8rem, 8vw, 2.35rem);
  }

  .workshop-hero p {
    font-size: 0.95rem;
  }

  .workshop-hero img {
    max-width: 148px;
    max-height: 148px;
    padding: 12px;
  }

  .workshop-hero .button-row {
    margin-top: 12px;
  }

  .workshop-meta {
    gap: 8px;
    margin-bottom: 12px;
  }

  .workshop-meta div {
    padding: 11px;
  }

  .workshop-meta strong {
    font-size: 0.66rem;
  }

  .workshop-meta span {
    font-size: 0.86rem;
  }

  body:has(.workshop-hero) .section {
    padding-block: 18px;
  }

  .workshop-detail .panel,
  .workshop-materials .panel {
    padding: 10px;
  }

  .workshop-detail .check-list li,
  .workshop-materials .check-list li {
    padding: 11px 12px 11px 38px;
    font-size: 0.9rem;
  }

  .workshop-detail .check-list li::before,
  .workshop-materials .check-list li::before {
    left: 13px;
    top: 15px;
  }
}

/* workshop pages visual redesign */
body:has(.workshop-hero) {
  background:
    linear-gradient(180deg, rgba(227, 6, 19, 0.055), transparent 360px),
    var(--soft);
}

body:has(.workshop-hero) main.container {
  width: min(1040px, calc(100% - 32px));
}

.workshop-hero {
  position: relative;
  grid-template-columns: minmax(0, 1fr) 220px;
  align-items: center;
  margin-top: 28px;
  padding: clamp(28px, 5vw, 54px);
  border: 1px solid rgba(227, 6, 19, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 241, 242, 0.86)),
    #fff;
  box-shadow: 0 18px 54px rgba(21, 22, 26, 0.08);
}

.workshop-hero::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  border-radius: 8px 0 0 8px;
  background: var(--red);
}

.workshop-hero .eyebrow {
  color: var(--red-dark);
}

.workshop-hero h1 {
  max-width: 660px;
  font-size: clamp(2.4rem, 5.8vw, 4.6rem);
  line-height: 0.98;
}

.workshop-hero p:not(.eyebrow) {
  max-width: 620px;
  margin-top: 16px;
  color: #4d5664;
  font-size: 1.04rem;
}

.workshop-hero img {
  width: 180px;
  height: 180px;
  max-width: none;
  max-height: none;
  padding: 24px;
  border: 1px solid rgba(227, 6, 19, 0.16);
  border-radius: 8px;
  background: #fff;
  object-fit: contain;
  box-shadow: 0 14px 36px rgba(227, 6, 19, 0.12);
}

.workshop-hero .button-row {
  display: flex;
  flex-wrap: wrap;
  width: auto;
  margin-top: 24px;
}

.workshop-hero .button {
  width: auto;
}

.workshop-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  max-width: none;
  gap: 10px;
  margin: 18px 0 28px;
}

.workshop-meta div {
  flex: 1 1 190px;
  max-width: 245px;
  padding: 12px 14px;
  border: 1px solid rgba(17, 18, 22, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: none;
}

.workshop-meta strong {
  color: var(--red-dark);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}

.workshop-meta span {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 820;
}

.workshop-detail,
.workshop-materials {
  grid-template-columns: minmax(240px, 0.72fr) minmax(0, 1fr);
  max-width: none;
  gap: 28px;
  padding-block: 30px;
  border-top: 1px solid rgba(17, 18, 22, 0.08);
}

.workshop-detail .section-title h2,
.workshop-materials .section-title h2 {
  max-width: 440px;
  color: var(--ink);
  font-size: clamp(1.55rem, 3.2vw, 2.25rem);
  line-height: 1.08;
}

.workshop-detail .section-title p:not(.eyebrow),
.workshop-materials .section-title p:not(.eyebrow) {
  max-width: 460px;
  color: var(--muted);
}

.workshop-detail .panel,
.workshop-materials .panel {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.workshop-detail .check-list,
.workshop-materials .check-list {
  gap: 0;
  border: 1px solid rgba(17, 18, 22, 0.08);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.workshop-detail .check-list li,
.workshop-materials .check-list li {
  display: grid;
  min-height: 58px;
  align-items: center;
  padding: 14px 18px 14px 52px;
  border: 0;
  border-radius: 0;
  background: #fff;
  color: #394150;
  font-weight: 650;
}

.workshop-detail .check-list li + li,
.workshop-materials .check-list li + li {
  border-top: 1px solid rgba(17, 18, 22, 0.08);
}

.workshop-detail .check-list li::before,
.workshop-materials .check-list li::before {
  left: 18px;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 6px;
  background: var(--red);
  box-shadow: inset 0 0 0 5px #fff, 0 0 0 1px rgba(227, 6, 19, 0.26);
}

html[data-theme="dark"] body:has(.workshop-hero) {
  background:
    linear-gradient(180deg, rgba(227, 6, 19, 0.12), transparent 360px),
    #0f1218;
}

html[data-theme="dark"] .workshop-hero {
  border-color: rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.065), rgba(227, 6, 19, 0.08)),
    #151922;
  box-shadow: 0 20px 58px rgba(0, 0, 0, 0.34);
}

html[data-theme="dark"] .workshop-hero p:not(.eyebrow),
html[data-theme="dark"] .workshop-detail .section-title p:not(.eyebrow),
html[data-theme="dark"] .workshop-materials .section-title p:not(.eyebrow) {
  color: #b8c0cc;
}

html[data-theme="dark"] .workshop-hero img {
  border-color: rgba(255, 255, 255, 0.12);
  background: #fff;
}

html[data-theme="dark"] .workshop-meta div {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.045);
}

html[data-theme="dark"] .workshop-meta span,
html[data-theme="dark"] .workshop-detail .section-title h2,
html[data-theme="dark"] .workshop-materials .section-title h2 {
  color: #fff;
}

html[data-theme="dark"] .workshop-meta strong {
  color: #ff9aa1;
}

html[data-theme="dark"] .workshop-detail,
html[data-theme="dark"] .workshop-materials {
  border-top-color: rgba(255, 255, 255, 0.1);
}

html[data-theme="dark"] .workshop-detail .check-list,
html[data-theme="dark"] .workshop-materials .check-list {
  border-color: rgba(255, 255, 255, 0.1);
  background: #151922;
}

html[data-theme="dark"] .workshop-detail .check-list li,
html[data-theme="dark"] .workshop-materials .check-list li {
  background: #151922;
  color: #d5dae2;
}

html[data-theme="dark"] .workshop-detail .check-list li + li,
html[data-theme="dark"] .workshop-materials .check-list li + li {
  border-top-color: rgba(255, 255, 255, 0.1);
}

@media (max-width: 760px) {
  .workshop-hero {
    grid-template-columns: 1fr;
    margin-top: 14px;
    padding: 22px;
  }

  .workshop-hero img {
    width: 132px;
    height: 132px;
    padding: 16px;
  }

  .workshop-hero .button-row,
  .workshop-hero .button {
    width: 100%;
  }

  .workshop-meta {
    justify-content: stretch;
    margin-bottom: 18px;
  }

  .workshop-meta div {
    flex-basis: calc(50% - 6px);
    max-width: none;
  }

  .workshop-detail,
  .workshop-materials {
    grid-template-columns: 1fr;
    gap: 14px;
    padding-block: 22px;
  }
}

/* unified workshop brief */
.workshop-brief {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  max-width: 980px;
  margin-inline: auto;
  padding-block: 28px;
}

.workshop-brief-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(17, 18, 22, 0.08);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(21, 22, 26, 0.055);
}

.workshop-brief-card .eyebrow {
  margin-bottom: 12px;
  color: var(--red-dark);
}

.workshop-brief-card .check-list {
  gap: 8px;
  border: 0;
  background: transparent;
}

.workshop-brief-card .check-list li {
  min-height: auto;
  padding: 10px 0 10px 28px;
  border: 0;
  background: transparent;
  color: #394150;
  font-size: 0.95rem;
  font-weight: 650;
}

.workshop-brief-card .check-list li + li {
  border-top: 1px solid rgba(17, 18, 22, 0.08);
}

.workshop-brief-card .check-list li::before {
  left: 0;
  top: 15px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--red);
  box-shadow: none;
  transform: none;
}

html[data-theme="dark"] .workshop-brief-card {
  border-color: rgba(255, 255, 255, 0.1);
  background: #151922;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.3);
}

html[data-theme="dark"] .workshop-brief-card .eyebrow {
  color: #ff9aa1;
}

html[data-theme="dark"] .workshop-brief-card .check-list li {
  background: transparent;
  color: #d5dae2;
}

html[data-theme="dark"] .workshop-brief-card .check-list li + li {
  border-top-color: rgba(255, 255, 255, 0.1);
}

@media (max-width: 760px) {
  .workshop-brief {
    grid-template-columns: 1fr;
    gap: 12px;
    padding-block: 18px;
  }

  .workshop-brief-card {
    padding: 15px;
  }
}

/* workshop meta with date and place */
.workshop-meta div {
  flex: 1 1 150px;
  max-width: 220px;
}

.workshop-meta div:has(strong + span) span {
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  .workshop-meta div {
    flex-basis: calc(50% - 6px);
  }
}

@media (max-width: 420px) {
  .workshop-meta div {
    flex-basis: 100%;
  }
}

/* final dark mode fixes: project cards and footer logo */
html[data-theme="dark"] .site-footer .brand img {
  padding: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  filter: brightness(0) invert(1) !important;
}

html[data-theme="dark"] .project-grid {
  gap: 20px;
}

html[data-theme="dark"] .project-card {
  border: 1px solid #303642 !important;
  background: #181c25 !important;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.38) !important;
}

html[data-theme="dark"] .project-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  z-index: 1;
  height: 4px;
  background: var(--red);
}

html[data-theme="dark"] .project-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 95, 104, 0.65) !important;
  background: #1c212c !important;
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.5) !important;
}

html[data-theme="dark"] .project-card > img {
  background: #0e1117 !important;
  filter: saturate(0.96) contrast(1.03) brightness(0.92) !important;
}

html[data-theme="dark"] .project-body {
  background: transparent !important;
}

html[data-theme="dark"] .project-body h3,
html[data-theme="dark"] .project-card h3 {
  color: #ffffff !important;
}

html[data-theme="dark"] .project-body p,
html[data-theme="dark"] .project-card p {
  color: #c9d0da !important;
}

html[data-theme="dark"] .project-meta .tag,
html[data-theme="dark"] .project-card .tag {
  border-color: rgba(255, 255, 255, 0.14) !important;
  background: rgba(255, 255, 255, 0.075) !important;
  color: #f3f5f7 !important;
}

html[data-theme="dark"] .project-meta .tag:first-child,
html[data-theme="dark"] .project-card .tag:first-child {
  border-color: rgba(255, 95, 104, 0.34) !important;
  background: rgba(227, 6, 19, 0.22) !important;
  color: #ffdadd !important;
}

html[data-theme="dark"] .project-links a {
  border-color: #3a4150 !important;
  background: #11151d !important;
  color: #f4f6f8 !important;
}

html[data-theme="dark"] .project-links a:first-child {
  border-color: var(--red) !important;
  background: var(--red) !important;
  color: #fff !important;
}

html[data-theme="dark"] .project-links a:hover {
  border-color: #ff5a63 !important;
  background: #ff3540 !important;
  color: #fff !important;
}

html[data-theme="dark"] .project-card > img:focus-visible,
html[data-theme="dark"] .detail-gallery img:focus-visible {
  outline-color: #ff6870;
}

/* home hero and summary cards */
.hero-media {
  border-radius: 8px;
}

.hero-media img {
  aspect-ratio: 4 / 3.15;
}

.trust-bar {
  gap: 14px;
  overflow: visible;
  margin-top: -28px;
  margin-bottom: 70px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.trust-bar div {
  position: relative;
  min-height: 158px;
  padding: 22px 20px 20px;
  border: 1px solid rgba(17, 18, 22, 0.09);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(21, 22, 26, 0.07);
}

.trust-bar div::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  border-radius: 8px 8px 0 0;
  background: var(--red);
}

.trust-bar div::after {
  position: absolute;
  right: 18px;
  bottom: 12px;
  color: rgba(227, 6, 19, 0.12);
  font-size: 3.3rem;
  font-weight: 950;
  line-height: 1;
}

.trust-bar div:nth-child(1)::after { content: "01"; }
.trust-bar div:nth-child(2)::after { content: "02"; }
.trust-bar div:nth-child(3)::after { content: "03"; }
.trust-bar div:nth-child(4)::after { content: "04"; }

.trust-bar strong {
  position: relative;
  z-index: 1;
  max-width: 180px;
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 1.04rem;
  line-height: 1.15;
}

.trust-bar span {
  position: relative;
  z-index: 1;
  display: block;
  max-width: 230px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

html[data-theme="dark"] .trust-bar {
  background: transparent;
  box-shadow: none;
}

html[data-theme="dark"] .trust-bar div {
  border-color: rgba(255, 255, 255, 0.1);
  background: #151922;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
}

html[data-theme="dark"] .trust-bar strong {
  color: #fff;
}

html[data-theme="dark"] .trust-bar span {
  color: #c0c7d2;
}

html[data-theme="dark"] .trust-bar div::after {
  color: rgba(255, 255, 255, 0.07);
}

@media (max-width: 980px) {
  .trust-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 0;
  }
}

@media (max-width: 560px) {
  .trust-bar {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 46px;
  }

  .trust-bar div {
    min-height: 128px;
  }
}

/* featured projects carousel on home */
.featured-carousel {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.featured-carousel__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 33%);
  gap: 18px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: inline mandatory;
  scrollbar-width: none;
  padding: 4px 2px 18px;
}

.featured-carousel__track::-webkit-scrollbar {
  display: none;
}

.featured-carousel__card {
  scroll-snap-align: start;
  min-width: 0;
}

.featured-carousel__button {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(17, 18, 22, 0.12);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 1.65rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(21, 22, 26, 0.07);
}

.featured-carousel__button:hover {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
}

html[data-theme="dark"] .featured-carousel__button {
  border-color: rgba(255, 255, 255, 0.14);
  background: #181c25;
  color: #fff;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
}

html[data-theme="dark"] .featured-carousel__button:hover {
  border-color: var(--red);
  background: var(--red);
}

@media (max-width: 900px) {
  .featured-carousel {
    grid-template-columns: 1fr;
  }

  .featured-carousel__button {
    display: none;
  }

  .featured-carousel__track {
    grid-auto-columns: minmax(260px, 82%);
    padding-inline: 1px;
  }
}

/* infinite featured carousel focus */
.featured-carousel {
  overflow: visible;
}

.featured-carousel__track {
  scroll-padding-inline: 18px;
  padding-block: 18px 28px;
}

.featured-carousel__card {
  transform: scale(0.94);
  opacity: 0.72;
  transform-origin: center;
  transition: transform 220ms ease, opacity 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.featured-carousel__card.is-active {
  z-index: 2;
  transform: scale(1.04);
  opacity: 1;
  border-color: rgba(227, 6, 19, 0.45);
  box-shadow: 0 24px 58px rgba(21, 22, 26, 0.14);
}

html[data-theme="dark"] .featured-carousel__card.is-active {
  border-color: rgba(255, 95, 104, 0.78) !important;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.58) !important;
}

@media (max-width: 900px) {
  .featured-carousel__track {
    scroll-padding-inline: 28px;
  }

  .featured-carousel__card {
    transform: scale(0.96);
  }

  .featured-carousel__card.is-active {
    transform: scale(1.01);
  }
}

/* about summary cards match home summary style */
.about-values {
  gap: 14px;
  overflow: visible;
  margin: -8px 0 58px;
  border: 0;
  background: transparent;
}

.about-values div {
  position: relative;
  min-height: 150px;
  padding: 22px 20px 20px;
  border: 1px solid rgba(17, 18, 22, 0.09);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(21, 22, 26, 0.07);
}

.about-values div::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  border-radius: 8px 8px 0 0;
  background: var(--red);
}

.about-values div::after {
  position: absolute;
  right: 18px;
  bottom: 12px;
  color: rgba(227, 6, 19, 0.12);
  font-size: 3.3rem;
  font-weight: 950;
  line-height: 1;
}

.about-values div:nth-child(1)::after { content: "01"; }
.about-values div:nth-child(2)::after { content: "02"; }
.about-values div:nth-child(3)::after { content: "03"; }

.about-values strong {
  position: relative;
  z-index: 1;
  max-width: 180px;
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 1.04rem;
  line-height: 1.15;
}

.about-values span {
  position: relative;
  z-index: 1;
  display: block;
  max-width: 230px;
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

html[data-theme="dark"] .about-values {
  background: transparent;
}

html[data-theme="dark"] .about-values div {
  border-color: rgba(255, 255, 255, 0.1);
  background: #151922;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
}

html[data-theme="dark"] .about-values strong {
  color: #fff;
}

html[data-theme="dark"] .about-values span {
  color: #c0c7d2;
}

html[data-theme="dark"] .about-values div::after {
  color: rgba(255, 255, 255, 0.07);
}

@media (max-width: 820px) {
  .about-values {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 42px;
  }

  .about-values div {
    min-height: 128px;
  }
}

/* project detail dark mode fix */
html[data-theme="dark"] .project-detail {
  border-color: #303642 !important;
  background: #151922 !important;
  box-shadow: 0 22px 64px rgba(0, 0, 0, 0.48) !important;
}

html[data-theme="dark"] .project-detail.is-archived {
  background: #151922 !important;
}

html[data-theme="dark"] .detail-copy h2,
html[data-theme="dark"] .detail-columns h3 {
  color: #ffffff !important;
}

html[data-theme="dark"] .detail-copy > p,
html[data-theme="dark"] .detail-columns p,
html[data-theme="dark"] .detail-columns ul,
html[data-theme="dark"] .detail-columns li {
  color: #c9d0da !important;
}

html[data-theme="dark"] .detail-columns {
  gap: 14px;
}

html[data-theme="dark"] .detail-columns > div {
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

html[data-theme="dark"] .detail-gallery img {
  border-color: #303642 !important;
  background: #0e1117 !important;
  filter: saturate(0.98) contrast(1.04) brightness(0.9);
}

html[data-theme="dark"] .detail-actions .button.secondary {
  border-color: #3a4150 !important;
  background: #0f131b !important;
  color: #ffffff !important;
}

html[data-theme="dark"] .detail-actions .button.secondary:hover {
  border-color: var(--red) !important;
  background: var(--red) !important;
  color: #ffffff !important;
}

html[data-theme="dark"] .project-detail .eyebrow {
  color: #ff9aa1 !important;
}

@media (max-width: 660px) {
  html[data-theme="dark"] .detail-columns > div {
    padding: 14px;
  }
}

/* workshop image backgrounds */
.workshop-item > img,
.workshop-hero img {
  background: transparent !important;
  box-shadow: none !important;
}

.workshop-item > img {
  border-color: rgba(17, 18, 22, 0.1) !important;
}

.workshop-hero img {
  border-color: rgba(227, 6, 19, 0.18) !important;
}

html[data-theme="dark"] .workshop-item > img,
html[data-theme="dark"] .workshop-hero img {
  border: 1px solid rgba(255, 255, 255, 0.72) !important;
  background: transparent !important;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35), 0 16px 38px rgba(0, 0, 0, 0.28) !important;
}

html[data-theme="dark"] .workshop-item > img {
  padding: 10px;
}

html[data-theme="dark"] .workshop-hero img {
  padding: 20px;
}

@media (max-width: 760px) {
  html[data-theme="dark"] .workshop-hero img {
    padding: 14px;
  }
}

/* collaboration cards match about summary cards */
.collaboration-values {
  gap: 14px;
}

.collaboration-values .card {
  position: relative;
  min-height: 150px;
  padding: 22px 20px 20px;
  overflow: hidden;
  border: 1px solid rgba(17, 18, 22, 0.09);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(21, 22, 26, 0.07);
}

.collaboration-values .card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  border-radius: 8px 8px 0 0;
  background: var(--red);
}

.collaboration-values .number {
  position: absolute;
  right: 18px;
  bottom: 12px;
  color: rgba(227, 6, 19, 0.12);
  font-size: 3.3rem;
  font-weight: 950;
  line-height: 1;
}

.collaboration-values h3,
.collaboration-values p {
  position: relative;
  z-index: 1;
}

.collaboration-values h3 {
  max-width: 190px;
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 1.04rem;
  line-height: 1.15;
}

.collaboration-values p {
  max-width: 260px;
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

html[data-theme="dark"] .collaboration-values .card {
  border-color: rgba(255, 255, 255, 0.1);
  background: #151922;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
}

html[data-theme="dark"] .collaboration-values h3 {
  color: #fff;
}

html[data-theme="dark"] .collaboration-values p {
  color: #c0c7d2;
}

html[data-theme="dark"] .collaboration-values .number {
  color: rgba(255, 255, 255, 0.07);
}

@media (max-width: 820px) {
  .collaboration-values {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .collaboration-values .card {
    min-height: 128px;
  }
}

/* maximize workshop icons */
.workshop-item {
  grid-template-columns: 180px 150px minmax(0, 1fr) !important;
  align-items: center;
}

.workshop-item > img {
  width: 180px !important;
  height: 180px !important;
  max-height: none !important;
  padding: 4px !important;
  object-fit: contain !important;
  background: transparent !important;
}

.workshop-hero img {
  width: min(300px, 100%) !important;
  height: auto !important;
  max-width: 300px !important;
  max-height: 300px !important;
  aspect-ratio: 1 / 1 !important;
  padding: 6px !important;
  object-fit: contain !important;
  background: transparent !important;
}

html[data-theme="dark"] .workshop-item > img,
html[data-theme="dark"] .workshop-hero img {
  border: 1px solid rgba(255, 255, 255, 0.78) !important;
  background: transparent !important;
}

@media (max-width: 900px) {
  .workshop-item {
    grid-template-columns: 150px minmax(0, 1fr) !important;
  }

  .workshop-item > img {
    width: 150px !important;
    height: 150px !important;
  }
}

@media (max-width: 760px) {
  .workshop-item {
    grid-template-columns: 1fr !important;
  }

  .workshop-item > img {
    width: min(260px, 100%) !important;
    height: auto !important;
    max-height: 260px !important;
    justify-self: center;
  }

  .workshop-hero img {
    width: min(230px, 70vw) !important;
    max-width: 230px !important;
    max-height: 230px !important;
    padding: 4px !important;
  }
}

/* normalized workshop icons after image crop */
.workshop-item {
  grid-template-columns: 128px 150px minmax(0, 1fr) !important;
}

.workshop-item > img {
  width: 128px !important;
  height: 128px !important;
  max-height: none !important;
  padding: 0 !important;
  border-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
  object-fit: contain !important;
}

.workshop-hero img {
  width: 220px !important;
  height: 220px !important;
  max-width: 220px !important;
  max-height: 220px !important;
  padding: 0 !important;
  border-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
  object-fit: contain !important;
}

html[data-theme="dark"] .workshop-item > img,
html[data-theme="dark"] .workshop-hero img {
  border: 1px solid rgba(255, 255, 255, 0.72) !important;
  border-radius: 8px;
  background: transparent !important;
  box-shadow: none !important;
}

@media (max-width: 900px) {
  .workshop-item {
    grid-template-columns: 128px minmax(0, 1fr) !important;
  }
}

@media (max-width: 760px) {
  .workshop-item {
    grid-template-columns: 1fr !important;
  }

  .workshop-item > img {
    width: 150px !important;
    height: 150px !important;
    justify-self: center;
  }

  .workshop-hero img {
    width: 170px !important;
    height: 170px !important;
    max-width: 170px !important;
    max-height: 170px !important;
  }
}

/* remove workshop icon border in dark mode */
html[data-theme="dark"] .workshop-item > img,
html[data-theme="dark"] .workshop-hero img {
  border-color: transparent !important;
  border-width: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}


/* mobile gallery and coffee final fixes */
@media (max-width: 640px) {
  .project-detail {
    gap: 18px;
    padding: 14px;
    border-radius: 8px;
  }

  .detail-gallery {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(72px, 1fr)) !important;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    margin-inline: -14px;
    padding: 0 14px 8px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .detail-gallery::-webkit-scrollbar {
    height: 0;
  }

  .detail-gallery img {
    width: 100%;
    min-width: 72px;
    height: auto;
    aspect-ratio: 1 / 1 !important;
    border-radius: 7px;
    scroll-snap-align: start;
  }

  .detail-gallery img:first-child {
    grid-column: 1 / -1 !important;
    min-width: calc(100vw - 56px);
    aspect-ratio: 4 / 3 !important;
  }

  .image-carousel {
    grid-template-columns: 48px 1fr 48px;
    grid-template-rows: 1fr auto;
    gap: 8px;
    padding: 14px;
  }

  .image-carousel__stage {
    grid-column: 1 / -1;
  }

  .image-carousel__caption {
    grid-column: 1 / -1;
    font-size: 0.82rem;
    line-height: 1.3;
  }

  .image-carousel__prev,
  .image-carousel__next {
    position: fixed;
    top: 50%;
    z-index: 2;
    grid-column: auto;
    grid-row: auto;
    transform: translateY(-50%);
  }

  .image-carousel__prev { left: 12px; }
  .image-carousel__next { right: 12px; }

  .image-carousel__button {
    width: 42px;
    height: 42px;
  }

  .image-carousel__image {
    max-width: 100%;
    max-height: calc(100dvh - 116px);
  }
}

.coffee-fab .coffee-fab__cup,
.coffee-fab .coffee-fab__cup svg {
  display: inline-grid !important;
  color: var(--red-dark) !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.coffee-fab .coffee-fab__cup svg {
  display: block !important;
  stroke: currentColor !important;
}

html[data-theme=dark] .coffee-fab .coffee-fab__cup {
  background: rgba(227, 6, 19, 0.18) !important;
  color: #ff6f78 !important;
}

.coffee-modal__pet {
  background: transparent !important;
}

@media (max-width: 760px) {
  .coffee-fab .coffee-fab__cup {
    display: inline-grid !important;
    width: 34px !important;
    height: 34px !important;
  }

  .coffee-fab .coffee-fab__cup svg {
    width: 22px !important;
    height: 22px !important;
  }
}


/* final mobile mascot position */
@media (max-width: 760px) {
  .pet-assistant {
    right: 12px !important;
    bottom: 88px !important;
    transform: scale(0.9) !important;
    transform-origin: right bottom !important;
    gap: 7px !important;
  }

  .pet-assistant__hint {
    display: block !important;
    margin-right: 4px !important;
    padding: 6px 9px !important;
    border-radius: 999px !important;
    font-size: 0.78rem !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }
}

@media (max-width: 420px) {
  .pet-assistant {
    bottom: 84px !important;
  }
}


/* final mobile workshop pages */
@media (max-width: 760px) {
  body:has(.workshop-hero) main.container {
    width: calc(100% - 24px) !important;
  }

  .workshop-hero {
    gap: 18px !important;
    padding: 28px 0 12px !important;
    text-align: left !important;
  }

  .workshop-hero h1 {
    max-width: 11ch;
    font-size: clamp(2.05rem, 12vw, 3rem) !important;
    line-height: 0.98 !important;
  }

  .workshop-hero p:not(.eyebrow) {
    max-width: 100% !important;
    font-size: 0.98rem !important;
    line-height: 1.55 !important;
  }

  .workshop-hero .button-row {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 9px !important;
  }

  .workshop-hero .button {
    width: 100% !important;
  }

  .workshop-meta {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 9px !important;
    width: 100% !important;
    margin: 12px 0 22px !important;
    padding: 0 !important;
  }

  .workshop-meta div {
    min-width: 0 !important;
    min-height: 92px !important;
    padding: 13px 13px 12px !important;
    border-radius: 8px !important;
  }

  .workshop-meta div:nth-child(2),
  .workshop-meta div:nth-child(6) {
    grid-column: 1 / -1 !important;
    min-height: 82px !important;
  }

  .workshop-meta strong {
    margin-bottom: 7px !important;
    font-size: 0.67rem !important;
    line-height: 1 !important;
    letter-spacing: 0.05em !important;
  }

  .workshop-meta span {
    font-size: 0.94rem !important;
    line-height: 1.25 !important;
    overflow-wrap: anywhere !important;
  }

  .workshop-brief {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    padding-block: 18px 32px !important;
  }

  .workshop-brief-card {
    padding: 16px !important;
  }

  .workshop-brief-card .check-list li {
    padding: 12px 12px 12px 34px !important;
    font-size: 0.94rem !important;
    line-height: 1.42 !important;
  }

  .workshop-brief-card .check-list li::before {
    left: 13px !important;
    top: 17px !important;
  }
}

@media (max-width: 380px) {
  .workshop-meta {
    grid-template-columns: 1fr !important;
  }

  .workshop-meta div,
  .workshop-meta div:nth-child(2),
  .workshop-meta div:nth-child(6) {
    grid-column: auto !important;
    min-height: 78px !important;
  }
}


/* mascot hint behavior */
.pet-assistant.is-open .pet-assistant__hint {
  display: none !important;
}

@media (max-width: 760px) {
  .pet-assistant {
    bottom: 72px !important;
  }
}

@media (max-width: 420px) {
  .pet-assistant {
    bottom: 70px !important;
  }
}


/* workshop mobile layout cleanup */
@media (max-width: 760px) {
  body:has(.workshop-hero) .pet-assistant,
  body:has(.workshop-hero) .coffee-fab {
    display: none !important;
  }

  body:has(.workshop-hero) main.container {
    width: calc(100% - 20px) !important;
  }

  .workshop-hero {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    padding: 24px 0 10px !important;
  }

  .workshop-hero img {
    order: 2 !important;
    width: min(240px, 76vw) !important;
    height: min(240px, 76vw) !important;
    max-width: 240px !important;
    max-height: 240px !important;
    justify-self: center !important;
    margin-top: 6px !important;
  }

  .workshop-meta {
    display: block !important;
    width: 100% !important;
    margin: 14px 0 24px !important;
    padding: 4px 0 !important;
    border: 1px solid var(--line) !important;
    border-radius: 8px !important;
    background: var(--paper) !important;
    overflow: hidden !important;
  }

  .workshop-meta div,
  .workshop-meta div:nth-child(2),
  .workshop-meta div:nth-child(6) {
    display: grid !important;
    grid-template-columns: minmax(84px, 0.42fr) minmax(0, 1fr) !important;
    align-items: start !important;
    gap: 12px !important;
    min-height: 0 !important;
    padding: 14px 14px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .workshop-meta div + div {
    border-top: 1px solid var(--line) !important;
  }

  .workshop-meta strong {
    margin: 2px 0 0 !important;
    font-size: 0.68rem !important;
    line-height: 1.1 !important;
    letter-spacing: 0.055em !important;
  }

  .workshop-meta span {
    margin: 0 !important;
    font-size: 0.95rem !important;
    line-height: 1.28 !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
  }

  .workshop-brief {
    padding-top: 8px !important;
  }
}

@media (max-width: 380px) {
  .workshop-meta div,
  .workshop-meta div:nth-child(2),
  .workshop-meta div:nth-child(6) {
    grid-template-columns: 1fr !important;
    gap: 5px !important;
  }
}

html[data-theme=dark] .workshop-meta {
  background: #151922 !important;
  border-color: #303642 !important;
}

html[data-theme=dark] .workshop-meta div + div {
  border-top-color: #303642 !important;
}


/* workshop mobile hero header fix */
@media (max-width: 760px) {
  body:has(.workshop-hero) .workshop-hero {
    box-sizing: border-box !important;
    width: 100% !important;
    overflow: hidden !important;
    padding: 22px 16px 16px !important;
    border-left-width: 4px !important;
  }

  body:has(.workshop-hero) .workshop-hero > div {
    min-width: 0 !important;
  }

  body:has(.workshop-hero) .workshop-hero .eyebrow {
    margin-bottom: 12px !important;
    font-size: 0.76rem !important;
    line-height: 1.15 !important;
    letter-spacing: 0.06em !important;
  }

  body:has(.workshop-hero) .workshop-hero h1 {
    max-width: 100% !important;
    margin: 0 0 12px !important;
    font-size: clamp(2rem, 9.5vw, 2.55rem) !important;
    line-height: 1.02 !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
  }

  body:has(.workshop-hero) .workshop-hero p:not(.eyebrow) {
    margin-bottom: 18px !important;
  }

  body:has(.workshop-hero) .workshop-hero .button-row {
    margin-top: 0 !important;
  }
}

@media (max-width: 380px) {
  body:has(.workshop-hero) .workshop-hero h1 {
    font-size: clamp(1.85rem, 9vw, 2.25rem) !important;
  }
}


/* mobile language selector in menu */
.language-switch__label {
  display: none;
}

.language-switch--menu {
  display: none;
}

@media (max-width: 1120px) {
  .nav-menu .language-switch--menu {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    margin: 6px 0 2px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--soft);
    color: var(--ink);
  }

  .nav-menu .language-switch__label {
    display: block;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 850;
  }

  .nav-menu .language-select {
    min-width: 118px;
    min-height: 30px;
    padding: 0 28px 0 8px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--paper);
    color: var(--ink);
    font-size: 0.82rem;
  }

  html[data-theme="dark"] .nav-menu .language-switch--menu {
    border-color: #303642;
    background: rgba(255, 255, 255, 0.035);
    color: #f4f6f8;
  }

  html[data-theme="dark"] .nav-menu .language-select {
    border-color: #303642;
    background: #151922;
    color: #f4f6f8;
  }
}

@media (max-width: 420px) {
  .language-switch--header {
    display: none !important;
  }

  .nav-menu .language-switch--menu {
    display: grid !important;
  }
}


/* final status pages */
.status-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 18%, rgba(227, 6, 19, 0.26), transparent 28%),
    radial-gradient(circle at 88% 78%, rgba(255, 255, 255, 0.08), transparent 30%),
    #0e1117 !important;
  color: #f7f8fa;
}

.status-shell {
  width: min(1040px, calc(100% - 32px));
  min-height: 100vh;
  align-content: center;
  gap: 18px;
  padding: 28px 0;
}

.status-brand {
  display: inline-flex;
  width: fit-content;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.status-brand img {
  width: 170px;
  filter: brightness(0) invert(1);
}

.status-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(260px, 0.72fr);
  gap: clamp(22px, 5vw, 52px);
  align-items: center;
  overflow: hidden;
  padding: clamp(24px, 5vw, 54px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-left: 6px solid var(--red);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(227, 6, 19, 0.16), rgba(227, 6, 19, 0) 42%),
    rgba(21, 25, 34, 0.94);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
}

.status-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.2), transparent 76%);
}

.status-copy,
.status-visual {
  position: relative;
  z-index: 1;
}

.status-panel .eyebrow {
  color: #ff858b;
}

.status-panel h1 {
  max-width: 780px;
  margin: 0;
  color: #fff;
  font-size: clamp(2.2rem, 6.5vw, 5.2rem);
  line-height: 0.98;
}

.status-panel p:not(.eyebrow) {
  max-width: 620px;
  color: #c9d0da;
  font-size: clamp(1rem, 2.2vw, 1.15rem);
  line-height: 1.62;
}

.status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.status-visual {
  display: grid;
  justify-items: center;
  gap: 14px;
  min-width: 0;
}

.status-visual img {
  width: min(270px, 72vw);
  max-height: 330px;
  object-fit: contain;
  filter: drop-shadow(0 20px 22px rgba(0, 0, 0, 0.28));
}

.status-visual figcaption {
  display: grid;
  gap: 4px;
  width: min(100%, 290px);
  padding: 13px 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(8, 10, 14, 0.64);
  color: #fff;
  font-family: Inter, system-ui, sans-serif;
}

.status-visual figcaption span {
  color: #ff858b;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.status-visual figcaption strong {
  font-size: 1rem;
}

.status-visual figcaption small {
  color: #aeb7c4;
  font-weight: 700;
}

.status-footer {
  margin: 0;
  color: #aeb7c4;
  font-weight: 750;
}

@media (max-width: 760px) {
  .status-shell {
    width: calc(100% - 24px);
    justify-content: stretch;
    padding: 18px 0;
  }

  .status-brand img {
    width: 132px;
  }

  .status-panel {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 22px 18px;
    border-left-width: 4px;
  }

  .status-panel h1 {
    font-size: clamp(2rem, 10.5vw, 3.4rem);
    line-height: 1.02;
  }

  .status-actions,
  .status-actions .button {
    width: 100%;
  }

  .status-visual img {
    width: min(220px, 68vw);
    max-height: 250px;
  }

  .status-footer {
    font-size: 0.88rem;
    line-height: 1.45;
  }
}


/* SCARA image framing fix */
.project-card > img[src$="scara_5_fixed.jpg"],
.detail-gallery img[src$="scara_5_fixed.jpg"] {
  object-fit: contain !important;
  object-position: center center !important;
  background: #f3f4f6 !important;
}

html[data-theme="dark"] .project-card > img[src$="scara_5_fixed.jpg"],
html[data-theme="dark"] .detail-gallery img[src$="scara_5_fixed.jpg"] {
  background: #0e1117 !important;
  filter: saturate(1.02) contrast(1.02) brightness(1) !important;
}


/* about 3D printing spotlight */
.fabrication-spotlight {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(320px, 1.08fr);
  gap: clamp(22px, 5vw, 46px);
  align-items: center;
  padding: clamp(22px, 5vw, 42px);
  border: 1px solid var(--line);
  border-left: 5px solid var(--red);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(227, 6, 19, 0.08), rgba(227, 6, 19, 0) 48%), var(--paper);
  box-shadow: var(--shadow);
}

.fabrication-spotlight__copy h2 {
  margin: 0 0 14px;
  color: var(--ink);
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.02;
}

.fabrication-spotlight__copy p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.62;
}

.fabrication-spotlight__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.fabrication-spotlight__stats span {
  display: grid;
  gap: 4px;
  min-height: 78px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 750;
}

.fabrication-spotlight__stats strong {
  color: var(--red);
  font-size: 1.08rem;
  line-height: 1;
}

.fabrication-spotlight__media { margin: 0; }

.fabrication-spotlight__media img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 18px 46px rgba(21, 22, 26, 0.12);
}

.fabrication-spotlight__media figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

html[data-theme="dark"] .fabrication-spotlight {
  border-color: #303642;
  border-left-color: var(--red);
  background: linear-gradient(135deg, rgba(227, 6, 19, 0.12), rgba(227, 6, 19, 0) 48%), #151922;
}

html[data-theme="dark"] .fabrication-spotlight__copy h2 { color: #fff; }
html[data-theme="dark"] .fabrication-spotlight__copy p:not(.eyebrow),
html[data-theme="dark"] .fabrication-spotlight__media figcaption { color: #c0c7d2; }
html[data-theme="dark"] .fabrication-spotlight__stats span {
  border-color: #303642;
  background: rgba(255, 255, 255, 0.035);
  color: #c0c7d2;
}
html[data-theme="dark"] .fabrication-spotlight__media img {
  border-color: #303642;
  filter: brightness(0.92) contrast(1.04);
}

@media (max-width: 860px) {
  .fabrication-spotlight { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .fabrication-spotlight {
    padding: 18px 14px;
    border-left-width: 4px;
  }
  .fabrication-spotlight__stats { grid-template-columns: 1fr; }
  .fabrication-spotlight__stats span { min-height: 0; }
}


/* dynamic linktree and manager */
.qr-page {
  background:
    linear-gradient(180deg, rgba(16, 17, 20, 0.2), rgba(16, 17, 20, 0.78)),
    var(--qr-bg-image, url("img/local/local_1.jpeg")) center / cover fixed !important;
}

.qr-link__icon img {
  width: 100%;
  height: 100%;
  border-radius: 6px;
  object-fit: cover;
}

.qr-main-link,
.qr-link--discord,
.qr-feature-strip a::after {
  --red: var(--qr-accent, #e30613);
}

.linktree-admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.88fr);
  gap: 22px;
  align-items: start;
}

.linktree-admin-forms {
  display: grid;
  gap: 18px;
}

.linktree-admin-preview {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 14px;
}

.linktree-phone {
  max-height: 760px;
  overflow: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101216;
  box-shadow: var(--shadow);
}

.linktree-phone .qr-shell {
  width: min(360px, 100%);
  min-height: auto;
  padding: 0;
}

.linktree-phone .qr-profile,
.linktree-phone .qr-main-link,
.linktree-phone .qr-link,
.linktree-phone .qr-feature-strip a,
.linktree-phone .qr-footer {
  box-shadow: none;
}

.linktree-admin-lists,
.admin-list-group {
  display: grid;
  gap: 10px;
}

.admin-list-group {
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.admin-list-group:first-child {
  padding-top: 0;
  border-top: 0;
}

.admin-list-group h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
}

.checkbox-line {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 8px;
  font-weight: 800;
}

.checkbox-line input {
  width: auto;
}

html[data-theme="dark"] .linktree-phone {
  border-color: #303642;
  background: #0e1117;
}

html[data-theme="dark"] .admin-list-group h3 {
  color: #fff;
}

@media (max-width: 980px) {
  .linktree-admin-grid {
    grid-template-columns: 1fr;
  }

  .linktree-admin-preview {
    position: static;
  }
}

@media (max-width: 560px) {
  .linktree-phone {
    padding: 10px;
  }
}


/* linktree icon rail and local image controls */
.qr-icon-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 13px;
  margin: -2px 0 14px;
}

.qr-icon-row a {
  display: inline-grid;
  width: 31px;
  height: 31px;
  place-items: center;
  color: #fff;
  text-decoration: none;
  transition: transform 160ms ease, color 160ms ease;
}

.qr-icon-row a:hover {
  color: var(--qr-accent, var(--red));
  transform: translateY(-2px);
}

.qr-icon-row svg {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.local-image-button {
  width: fit-content;
  min-height: 32px;
  margin-top: 6px;
  padding: 6px 10px;
  font-size: 0.78rem;
}

.local-image-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.linktree-phone .qr-icon-row {
  gap: 8px;
}

.linktree-phone .qr-icon-row a {
  width: 28px;
  height: 28px;
}

@media (max-width: 380px) {
  .qr-icon-row {
    gap: 9px;
  }

  .qr-icon-row a {
    width: 28px;
    height: 28px;
  }
}


/* draggable admin rows */
.admin-row--draggable {
  cursor: grab;
}

.admin-row--draggable.is-dragging {
  opacity: 0.55;
  cursor: grabbing;
}

.admin-row--draggable.is-drop-target {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

.drag-handle {
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-weight: 900;
  line-height: 1;
}

html[data-theme="dark"] .drag-handle {
  border-color: #303642;
  color: #c0c7d2;
}


/* per-link accent colors */
.qr-link[style*="--item-accent"] {
  border-color: color-mix(in srgb, var(--item-accent) 58%, rgba(255, 255, 255, 0.18));
  box-shadow: 0 16px 34px color-mix(in srgb, var(--item-accent) 22%, transparent);
}

.qr-link[style*="--item-accent"] .qr-link__icon {
  border-color: color-mix(in srgb, var(--item-accent) 55%, transparent);
  background: color-mix(in srgb, var(--item-accent) 18%, rgba(255, 255, 255, 0.1));
  color: var(--item-accent);
}

.qr-icon-row a[style*="--item-accent"] {
  color: var(--item-accent);
}

.qr-quick-grid a[style*="--item-accent"],
.qr-feature-strip a[style*="--item-accent"] {
  border-color: color-mix(in srgb, var(--item-accent) 52%, rgba(255, 255, 255, 0.16));
}

.qr-feature-strip a[style*="--item-accent"]::after {
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--item-accent) 88%, #000));
}

.field-grid .checkbox-line {
  align-self: end;
  min-height: 42px;
}

/* single-image project detail galleries */
.detail-gallery--single {
  display: block;
}

.detail-gallery--single img,
.detail-gallery--single img:first-child {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
}

@media (max-width: 760px) {
  .detail-gallery--single img,
  .detail-gallery--single img:first-child {
    min-height: 260px;
  }
}

/* PDF-cover project images */
.project-card > img[src$="futbolin_cover.jpg"],
.detail-gallery img[src$="futbolin_cover.jpg"] {
  object-fit: contain !important;
  background: #fff;
}

.detail-gallery--single img[src$="futbolin_cover.jpg"] {
  padding: 10px;
}

.detail-gallery--credited {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.detail-gallery--credited img,
.detail-gallery--credited img:first-child {
  height: auto;
  min-height: 360px;
  flex: 1 1 auto;
}

.image-credit {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

html[data-theme="dark"] .image-credit {
  color: #aeb7c6;
}

@media (max-width: 760px) {
  .detail-gallery--credited img,
  .detail-gallery--credited img:first-child {
    min-height: 240px;
  }
}

.detail-gallery.detail-gallery--credited:not(.detail-gallery--single) {
  display: grid;
}

.detail-gallery.detail-gallery--credited:not(.detail-gallery--single) .image-credit {
  grid-column: 1 / -1;
}

/* credited multi-image galleries keep the standard project gallery layout */
.detail-gallery.detail-gallery--credited:not(.detail-gallery--single) {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.detail-gallery.detail-gallery--credited:not(.detail-gallery--single) img {
  min-height: 0;
  height: 100%;
  flex: initial;
}

.detail-gallery.detail-gallery--credited:not(.detail-gallery--single) img:first-child {
  grid-column: 1 / -1;
  width: 100%;
  aspect-ratio: 16 / 10;
  min-height: 0;
  height: auto;
  object-fit: cover;
}

.detail-gallery.detail-gallery--credited:not(.detail-gallery--single) img:nth-child(n + 2) {
  grid-column: auto;
  width: 100%;
  aspect-ratio: 1 / 1;
  min-height: 0;
  height: auto;
  object-fit: cover;
}

.detail-gallery.detail-gallery--credited:not(.detail-gallery--single) .image-credit {
  grid-column: 1 / -1;
}

@media (max-width: 760px) {
  .detail-gallery.detail-gallery--credited:not(.detail-gallery--single) {
    display: flex;
  }

  .detail-gallery.detail-gallery--credited:not(.detail-gallery--single) img,
  .detail-gallery.detail-gallery--credited:not(.detail-gallery--single) img:first-child,
  .detail-gallery.detail-gallery--credited:not(.detail-gallery--single) img:nth-child(n + 2) {
    width: min(78vw, 320px);
    height: auto;
    min-height: 0;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    flex: 0 0 auto;
  }

  .detail-gallery.detail-gallery--credited:not(.detail-gallery--single) .image-credit {
    min-width: min(78vw, 320px);
    flex: 0 0 min(78vw, 320px);
  }
}
