:root {
  color-scheme: light;
  --page-bg: #f6f6f4;
  --panel-bg: #ffffff;
  --ink: var(--3jprintnl-gray);
  --muted: #4b5563;
  --line: #e5e7eb;
  --accent: var(--3jprintnl-orange);
  --soft: #f3f4f6;
  --3jprintnl-orange: #ff9a01;
  --3jprintnl-gray: #333333;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Roboto", Arial, sans-serif;
  line-height: 1.6;
  color: var(--ink);
  background: var(--page-bg);
}

img {
  max-width: 100%;
}

.container {
  width: min(960px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  border-bottom: 3px solid var(--accent);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 2px 14px rgba(51, 51, 51, 0.04);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  /* reduce excess vertical spacing around the header content */
  min-height: 0;
  padding: 10px 0;
  flex-wrap: nowrap;
}

.brand {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.01em;
}

/* Banner sizing: keep the image compact and inline with the nav */
.site-brand-image {
  display: block;
  height: 80px; /* updated per user request */
  width: auto;
}

/* Keep the banner reasonable on small screens */
@media (max-width: 640px) {
  .site-brand-image {
    height: 48px;
  }
  .header-row {
    padding: 0.25rem 0;
    flex-wrap: wrap;
    align-items: center;
  }
}

/* Additional responsive sizing for medium-width viewports */
@media (min-width: 641px) and (max-width: 1024px) {
  .site-brand-image {
    height: 120px;
  }
  .header-row {
    padding: 0.25rem 0;
  }
}

.site-navigation {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
  flex-wrap: wrap;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid var(--accent);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  font: inherit;
  font-weight: 600;
}

.nav-toggle::before {
  content: "☰";
  font-size: 0.95rem;
  line-height: 1;
}

.main-nav,
.language-switcher {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.main-nav a,
.language-switcher a {
  text-decoration: none;
  color: var(--ink);
}

.main-nav a {
  font-weight: 500;
  padding: 0.35rem 0.2rem;
}

.main-nav a[aria-current="page"] {
  font-weight: 700;
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.22em;
}

.language-switcher a {
  display: inline-block;
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
  font-weight: 500;
}

.language-switcher a[aria-current="page"] {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

main {
  padding: 1.5rem 0 2.25rem;
}

main > .container {
  background: transparent;
}

h1,
h2,
h3 {
  line-height: 1.2;
  margin-top: 0;
  color: var(--ink);
}

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

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

.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 80px;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-brand {
  font-weight: 700;
}

.footer-year {
  font-weight: 400;
}

.footer-links a,
.page-link {
  color: var(--accent);
  text-decoration: none;
}

.footer-links a:hover,
.page-link:hover {
  text-decoration: underline;
}

.policy-page {
  padding-top: 2rem;
}

.policy-content {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 2rem;
  max-width: 760px;
  margin: 0 auto;
}

.policy-content h1 {
  font-size: clamp(2rem, 5vw, 2.6rem);
  margin-bottom: 0.5rem;
}

.policy-content h2 {
  font-size: 1.2rem;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

.policy-content h3 {
  font-size: 1.05rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.policy-content p,
.policy-content li {
  color: var(--muted);
}

.policy-content code {
  background: var(--soft);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.article-page table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.article-page th,
.article-page td {
  padding: 0.8rem 0.9rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.article-page thead th {
  background: var(--soft);
  text-align: left;
}

.article-page th:nth-child(2),
.article-page td:nth-child(2) {
  text-align: center;
}

.article-page td:nth-child(1) {
  text-align: left;
}

.contact-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.5rem;
  max-width: 760px;
  margin: 0 auto;
}

.contact-card form {
  display: grid;
  gap: 1rem;
  margin-top: 1.25rem;
}

.contact-card label {
  display: inline-block;
  font-weight: 500;
  margin-bottom: 0.35rem;
}

.contact-card input,
.contact-card textarea {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
  font: inherit;
  background: #fff;
  color: var(--ink);
}

.contact-card textarea {
  min-height: 160px;
  resize: vertical;
}

#form-status {
  min-height: 1.5rem;
  margin: 0;
  color: var(--muted);
}

.cookie-banner {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%) translateY(1rem);
  width: min(700px, calc(100% - 1rem));
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 16px 32px rgba(17, 17, 17, 0.08);
  padding: 1rem 1.25rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 20;
}

.cookie-banner.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.cookie-banner-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.cookie-banner p {
  margin: 0;
  color: var(--muted);
}

.cookie-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

button,
.button-link {
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  padding: 0.55rem 0.9rem;
  cursor: pointer;
  font: inherit;
  text-decoration: none;
}

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

button:hover,
.button-link:hover,
.nav-toggle:hover,
.language-switcher a:hover,
.main-nav a:hover {
  filter: brightness(0.97);
}

@media (max-width: 640px) {
  .header-row,
  .footer-row,
  .cookie-banner-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-navigation {
    width: 100%;
    margin-left: 0;
    flex-direction: column;
    align-items: stretch;
  }

  .nav-toggle {
    width: 100%;
    justify-content: center;
  }

  .main-nav {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
  }

  .site-navigation.is-open .main-nav {
    display: flex;
  }

  .policy-content,
  .contact-card {
    padding: 1.25rem;
  }
}

@media (min-width: 641px) {
  .nav-toggle {
    display: none;
  }

  .main-nav {
    display: flex;
  }
}
