/* Shared public legal pages and privacy controls. Kept separate from editor styles. */
.privacy-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
  padding: 12px 0;
  font-size: 14px;
  text-transform: none !important;
  letter-spacing: normal;
}
.privacy-links a,
.privacy-links button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 4px;
  overflow-wrap: anywhere;
}
.privacy-links button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
}
.cookie-panel {
  position: fixed;
  z-index: 95;
  inset: auto 20px 20px;
  max-width: 1100px;
  margin-inline: auto;
  background: #f6f2e8;
  color: #222322;
  border: 2px solid #222322;
  border-radius: 8px;
  padding: 20px 24px;
  box-shadow: 0 8px 40px #0004;
  font:
    16px/1.5 'Source Sans 3',
    Arial,
    sans-serif;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  max-height: 70svh;
  overflow: auto;
}
.cookie-panel > div:first-child {
  flex: 1 1 420px;
}
.cookie-panel h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 5px;
}
.cookie-panel p {
  margin: 0;
}
.cookie-panel a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex: 1 1 280px;
}
.cookie-actions button {
  flex: 1 1 135px;
  min-height: 48px;
  border: 1px solid #222322;
  border-radius: 4px;
  background: #222322;
  color: #fff;
  padding: 10px 14px;
  cursor: pointer;
  font:
    600 15px/1.3 'Source Sans 3',
    Arial,
    sans-serif;
}
.cookie-actions button:hover {
  background: #414340;
}
.cookie-actions .cookie-close {
  flex-basis: 100%;
  background: transparent;
  color: #222322;
}
.cookie-panel :focus-visible,
.privacy-links :focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 4px;
}
.legal-content {
  max-width: 900px;
  padding-block: 54px 80px;
}
.legal-back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: underline !important;
  text-underline-offset: 4px;
}
.legal-content h1 {
  font-size: clamp(36px, 7vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 24px 0;
  overflow-wrap: anywhere;
}
.legal-intro {
  font-size: clamp(18px, 3vw, 23px);
  line-height: 1.5;
}
.legal-date {
  font-size: 14px;
  color: var(--muted);
  margin-top: 18px;
}
.legal-content section {
  margin-top: 36px;
}
.legal-content h2 {
  font-size: 24px;
  line-height: 1.25;
  margin-bottom: 12px;
}
.legal-content p {
  line-height: 1.75;
}
.legal-content a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 4px;
  overflow-wrap: anywhere;
}
.legal-page .header-inner {
  justify-content: space-between;
}
.stats-table-wrap {
  overflow-x: auto;
}
.stats-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 15px;
}
.stats-table caption {
  text-align: left;
  font-weight: 600;
  margin-block: 16px;
}
.stats-table th,
.stats-table td {
  text-align: left;
  padding: 12px 8px;
  border-bottom: 1px solid #7775;
}
.stats-table td:first-child {
  overflow-wrap: anywhere;
}
.stats-table td:last-child {
  font-variant-numeric: tabular-nums;
}
/* The selected palette stays intact; foregrounds adapt to readable contrast. */
.studio {
  --muted: var(--studio-ink);
}
.studio .studio-cta {
  color: var(--studio-highlight-text);
}
.studio .studio-title,
.studio-hero-top {
  color: var(--studio-hero-text);
  text-shadow: 0 2px 8px #000c;
}
.studio-outline .studio-title > span:last-child {
  -webkit-text-stroke: 1.5px var(--studio-hero-text);
}
.studio .studio-title > span,
.studio-hero-top p {
  background: #181b1dcf;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  width: fit-content;
  padding-inline: 0.08em;
}
.studio .studio-title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.studio-hero-center .studio-title {
  align-items: center;
}
.portfolio .language-switch button {
  min-height: 44px;
  min-width: 44px;
}
.portfolio :focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 4px;
}
.contact-privacy-note {
  font-size: 14px;
}
.contact-privacy-note a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
@media (max-width: 600px) {
  .cookie-panel {
    inset: auto 8px 8px;
    padding: 16px;
    gap: 12px;
    font-size: 15px;
  }
  .cookie-panel > div:first-child {
    flex-basis: 100%;
  }
  .cookie-actions {
    flex-basis: 100%;
  }
  .legal-content {
    padding-block: 28px 50px;
  }
  .privacy-links {
    gap: 4px 16px;
  }
  .legal-page .header-inner {
    gap: 12px;
    min-height: 76px;
  }
  .legal-page .brand {
    font-size: 22px;
  }
}
.studio .project-number {
  color: var(--studio-highlight-text);
}
.studio .featured-project {
  color: var(--studio-accent-ink);
}
.studio .section-contact {
  color: var(--studio-accent-ink);
  --muted: var(--studio-accent-ink);
  --text: var(--studio-accent-ink);
}
.portfolio:not(.studio) .accent-text,
.portfolio:not(.studio) .project-actions a {
  color: var(--link-text);
}
.portfolio:not(.studio) .contact-form {
  color: var(--surface-text);
}
/* Keep touch controls usable when navigation labels or text size grow. */
.portfolio-header nav a,
.portfolio .project-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.portfolio-gallery-dialog .gallery-heading h2 {
  min-width: 0;
  overflow-wrap: anywhere;
}
.portfolio-gallery-dialog .gallery-heading button {
  flex-shrink: 0;
}
.portfolio .project-facts dd,
.portfolio .contact-email {
  overflow-wrap: anywhere;
}
@media (max-width: 760px) {
  .portfolio .header-inner > * {
    min-width: 0;
  }
  .portfolio-header nav {
    padding-block: 4px;
    scroll-padding-inline: 6px;
  }
  .portfolio .contact-form input,
  .portfolio .contact-form textarea,
  .portfolio .contact-form select {
    font-size: 16px;
  }
  .portfolio .portfolio-button,
  .studio .studio-cta {
    max-width: 100%;
    white-space: normal;
    text-align: left;
  }
}
