/* ==========================================================================
   Paper Company Chinatsu Systems Corp. - Shared Stylesheet
   Coding convention: comments and identifiers in English only.
   Design tokens follow BSC-CCS-001 (Basic Design Document) Article 4-5.
   ========================================================================== */

/* ---- Design tokens ---- */
:root {
  /* Colors (BSC-CCS-001 Article 4.1) */
  --color-bg: #FFFFFF;
  --color-surface: #E3E3E3;      /* header / footer / left menu background */
  --color-text: #1A1A1A;
  --color-accent: #E32C20;
  --color-accent-hover: #B32219;
  --color-border: #CCCCCC;
  --color-muted: #666666;
  --color-on-accent: #FFFFFF;

  /* Typography (BSC-CCS-001 Article 5) */
  --font-family-base: "Noto Sans JP", sans-serif;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-bold: 700;

  /* Layout */
  --content-width: 1200px;
  --side-menu-width: 240px;
  --header-height: 72px;

  /* Breakpoints (reference values, used inside media queries below) */
  /* wide:   >= 1700px (content 1200px + 2 x 240px side menu + buffer) */
  /*         -> side menu shown in the outer margin */
  /* tablet/narrow desktop: < 1700px -> side menu collapses into hamburger menu */
  /* mobile: < 768px    -> compact hamburger layout */
}

/* ---- Reset ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-family-base);
  font-weight: var(--weight-regular);
  line-height: 1.8;
}

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

a {
  color: var(--color-accent);
  text-decoration: underline;
}

a:hover {
  color: var(--color-accent-hover);
}

/* Visible focus ring for keyboard navigation (accessibility requirement) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

/* Skip link for screen reader / keyboard users */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-accent);
  color: var(--color-on-accent);
  padding: 0.5em 1em;
  z-index: 1000;
}

.skip-link:focus {
  left: 0;
}

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background-color: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.site-header__inner {
  max-width: var(--content-width);
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

.logo-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--color-text);
}

.logo-lockup__mark {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background-color: var(--color-accent);
  flex-shrink: 0;
  /* Placeholder mark until the generated logo asset is available */
}

.logo-lockup__text {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.logo-lockup__name {
  font-weight: var(--weight-bold);
  font-size: 1.0625rem;
}

.logo-lockup__slogan {
  font-size: 0.75rem;
  font-weight: var(--weight-medium);
  color: var(--color-muted);
  white-space: nowrap;
}

.global-nav {
  display: flex;
  gap: 24px;
}

.global-nav a {
  color: var(--color-text);
  text-decoration: none;
  font-weight: var(--weight-medium);
  font-size: 0.9375rem;
}

.global-nav a:hover,
.global-nav a[aria-current="page"] {
  color: var(--color-accent);
}

.lang-switch {
  display: flex;
  gap: 8px;
  font-size: 0.875rem;
}

.lang-switch a {
  text-decoration: none;
  color: var(--color-muted);
}

.lang-switch a[aria-current="true"] {
  color: var(--color-accent);
  font-weight: var(--weight-bold);
}

.hamburger-button {
  display: none;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 8px;
}

.hamburger-button__bar {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-text);
  margin: 5px 0;
}

/* ---- Page frame (content + side menu) ---- */
.page-frame {
  position: relative;
  max-width: var(--content-width);
  margin: 0 auto;
}

.side-menu {
  position: fixed;
  top: var(--header-height);
  width: var(--side-menu-width);
  height: calc(100vh - var(--header-height));
  overflow-y: auto;
  background-color: var(--color-surface);
  padding: 24px 16px;
  /* Placed in the outer margin created by the fixed-width content */
  right: calc(50% + (var(--content-width) / 2));
}

.side-menu__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.side-menu__list a {
  display: block;
  padding: 8px 4px;
  color: var(--color-text);
  text-decoration: none;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--color-border);
}

.side-menu__list a:hover,
.side-menu__list a[aria-current="page"] {
  color: var(--color-accent);
}

main {
  min-height: 60vh;
  padding: 40px 24px;
}

/* ---- Footer ---- */
.site-footer {
  background-color: var(--color-surface);
  border-top: 1px solid var(--color-border);
}

.site-footer__inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 40px 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.site-footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.875rem;
}

.site-footer__links a {
  color: var(--color-text);
  text-decoration: none;
}

.site-footer__company {
  font-size: 0.8125rem;
  color: var(--color-muted);
  line-height: 1.9;
}

.site-footer__copyright {
  text-align: center;
  font-size: 0.75rem;
  color: var(--color-muted);
  padding: 16px 0;
  border-top: 1px solid var(--color-border);
}

/* ---- Buttons ---- */
.button {
  display: inline-block;
  padding: 12px 32px;
  background-color: var(--color-accent);
  color: var(--color-on-accent);
  text-decoration: none;
  font-weight: var(--weight-bold);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  font-family: inherit;
}

.button:hover {
  background-color: var(--color-accent-hover);
  color: var(--color-on-accent);
}

.button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.button--secondary {
  background-color: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.button--secondary:hover {
  background-color: var(--color-surface);
  color: var(--color-text);
}

/* ---- Hero section ---- */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 32px 0;
  min-height: 260px;
}

.hero__eyebrow {
  margin: 0 0 8px;
  font-size: 0.75rem;
  font-weight: var(--weight-bold);
  letter-spacing: 0.1em;
  color: var(--color-accent);
}

.hero__catch {
  margin: 0;
  font-size: 2rem;
  font-weight: var(--weight-bold);
  line-height: 1.5;
}

.hero__illustration {
  position: relative;
  width: 220px;
  height: 220px;
  flex-shrink: 0;
}

/* Placeholder geometric shapes standing in for the generated illustration */
.hero__shape {
  position: absolute;
  border-radius: 8px;
}

.hero__shape--circle {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background-color: var(--color-surface);
  top: 0;
  right: 40px;
}

.hero__shape--square {
  width: 100px;
  height: 100px;
  background-color: var(--color-accent);
  bottom: 0;
  right: 0;
}

/* ---- Generic page section ---- */
.company-excerpt,
.business-notice,
.news-preview {
  padding: 40px 0;
  border-top: 1px solid var(--color-border);
}

.company-excerpt h2,
.business-notice h2,
.news-preview h2 {
  font-size: 1.25rem;
  margin: 0 0 16px;
}

.link-more {
  display: inline-block;
  margin-top: 8px;
  font-weight: var(--weight-medium);
}

.business-notice__text {
  color: var(--color-muted);
  font-weight: var(--weight-medium);
}

/* ---- News list ---- */
.news-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.news-list__item {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
}

.news-list__date {
  color: var(--color-muted);
  font-size: 0.875rem;
  flex-shrink: 0;
}

.news-list__tag {
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: var(--weight-bold);
  color: var(--color-accent);
  border: 1px solid var(--color-accent);
  border-radius: 999px;
  padding: 2px 10px;
}

.news-list__title {
  color: var(--color-text);
  text-decoration: none;
}

.news-list__empty {
  color: var(--color-muted);
  padding: 12px 0;
}

/* ---- Business page (dedicated page, placeholder notice) ---- */
.business-placeholder {
  min-height: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 20px;
}

.business-placeholder__title {
  font-size: 1.75rem;
  margin: 0;
}

.business-placeholder__text {
  font-size: 1.125rem;
  color: var(--color-muted);
  margin: 0;
}

/* ---- Page title (used on inner pages) ---- */
.page-title {
  font-size: 1.75rem;
  margin: 0 0 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
}

/* ---- Representative message ---- */
.rep-message {
  padding: 40px 0;
  border-top: 1px solid var(--color-border);
}

.rep-message h2 {
  font-size: 1.25rem;
  margin: 0 0 24px;
}

.rep-message__body {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

.rep-message__portrait {
  flex-shrink: 0;
  width: 200px;
}

.rep-message__portrait-placeholder {
  width: 200px;
  height: 240px;
  border-radius: 8px;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  /* Placeholder box until the AI-generated portrait asset is ready */
}

.rep-message__text p {
  margin: 0 0 16px;
}

.rep-message__text p:last-child {
  margin-bottom: 0;
}

/* ---- Company overview table ---- */
.company-table {
  padding: 40px 0;
  border-top: 1px solid var(--color-border);
}

.company-table h2 {
  font-size: 1.25rem;
  margin: 0 0 24px;
}

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

.overview-table th,
.overview-table td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}

.overview-table th {
  width: 200px;
  font-weight: var(--weight-bold);
  background-color: var(--color-surface);
}

/* ---- Corporate history timeline ---- */
.company-history {
  padding: 40px 0;
  border-top: 1px solid var(--color-border);
}

.company-history h2 {
  font-size: 1.25rem;
  margin: 0 0 24px;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 24px;
  border-left: 2px solid var(--color-accent);
}

.timeline__item {
  position: relative;
  padding: 0 0 28px 24px;
}

.timeline__item:last-child {
  padding-bottom: 0;
}

.timeline__item::before {
  content: "";
  position: absolute;
  left: -31px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--color-accent);
}

.timeline__year {
  display: block;
  font-weight: var(--weight-bold);
  color: var(--color-accent);
  font-size: 0.9375rem;
  margin-bottom: 4px;
}

.timeline__text {
  display: block;
}

/* ---- Company page responsive ---- */
@media (max-width: 767px) {
  .rep-message__body {
    flex-direction: column;
  }

  .rep-message__portrait,
  .rep-message__portrait-placeholder {
    width: 140px;
    height: 168px;
  }

  .overview-table th {
    width: 120px;
    font-size: 0.875rem;
  }

  .overview-table th,
  .overview-table td {
    padding: 10px 12px;
    font-size: 0.875rem;
  }
}

/* ---- Recruit list page ---- */
.recruit-intro {
  margin: 0 0 32px;
  color: var(--color-muted);
}

.recruit-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.recruit-card {
  border: 1px solid var(--color-border);
  border-radius: 4px;
  transition: border-color 0.15s ease;
}

.recruit-card:hover {
  border-color: var(--color-accent);
}

.recruit-card__link {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
  text-decoration: none;
  color: var(--color-text);
}

.recruit-card__name {
  font-size: 1.0625rem;
  font-weight: var(--weight-bold);
}

.recruit-card__type {
  font-size: 0.875rem;
  color: var(--color-muted);
}

/* ---- Recruit detail page ---- */
.recruit-detail-table {
  width: 100%;
  border-collapse: collapse;
}

.recruit-detail-table th,
.recruit-detail-table td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}

.recruit-detail-table th {
  width: 160px;
  font-weight: var(--weight-bold);
  background-color: var(--color-surface);
}

.back-link {
  display: inline-block;
  margin-bottom: 24px;
}

.recruit-apply-note {
  margin-top: 24px;
  color: var(--color-muted);
}

/* ---- Recruit pages responsive ---- */
@media (max-width: 767px) {
  .recruit-detail-table th {
    width: 110px;
    font-size: 0.875rem;
  }

  .recruit-detail-table th,
  .recruit-detail-table td {
    padding: 10px 12px;
    font-size: 0.875rem;
  }
}

/* ---- Contact page ---- */
.contact-section {
  max-width: 640px;
}

.form-field {
  margin-bottom: 24px;
}

.form-field label {
  display: block;
  font-weight: var(--weight-bold);
  margin-bottom: 8px;
}

.required-mark {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  font-size: 0.6875rem;
  font-weight: var(--weight-bold);
  color: var(--color-on-accent);
  background-color: var(--color-accent);
  border-radius: 999px;
  vertical-align: middle;
}

.form-field input[type="text"],
.form-field input[type="email"],
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 12px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background-color: #FFFFFF;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 1px;
}

.form-field textarea {
  resize: vertical;
}

.field-error {
  min-height: 1.2em;
  margin: 6px 0 0;
  font-size: 0.875rem;
  color: var(--color-accent);
}

.form-actions {
  margin-top: 32px;
}

.form-actions--split {
  display: flex;
  gap: 16px;
}

/* ---- Confirmation table ---- */
.confirm-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
}

.confirm-table th,
.confirm-table td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}

.confirm-table th {
  width: 160px;
  font-weight: var(--weight-bold);
  background-color: var(--color-surface);
}

.confirm-table__message {
  white-space: pre-wrap;
}

.turnstile-wrapper {
  margin-bottom: 24px;
}

/* ---- Contact page responsive ---- */
@media (max-width: 767px) {
  .confirm-table th {
    width: 100px;
    font-size: 0.875rem;
  }

  .confirm-table th,
  .confirm-table td {
    padding: 10px 12px;
    font-size: 0.875rem;
  }

  .form-actions--split {
    flex-direction: column;
  }
}
/* ---- News list page ---- */
.news-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.news-filter__button {
  padding: 8px 20px;
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--color-text);
  background-color: #FFFFFF;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  cursor: pointer;
}

.news-filter__button.is-active {
  color: var(--color-on-accent);
  background-color: var(--color-accent);
  border-color: var(--color-accent);
}

.news-status {
  min-height: 1.2em;
  color: var(--color-muted);
}

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

.news-item {
  border-bottom: 1px solid var(--color-border);
}

.news-item__link {
  display: block;
  padding: 20px 4px;
  text-decoration: none;
  color: inherit;
}

.news-item__link:hover .news-item__title {
  color: var(--color-accent);
}

.news-item__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 8px;
  font-size: 0.875rem;
  color: var(--color-muted);
}

.news-tag {
  display: inline-block;
  padding: 2px 10px;
  font-size: 0.75rem;
  font-weight: var(--weight-bold);
  color: var(--color-accent);
  border: 1px solid var(--color-accent);
  border-radius: 999px;
}

.news-item__title {
  margin: 0 0 6px;
  font-weight: var(--weight-bold);
}

.news-item__preview {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.9375rem;
}

.news-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 32px;
}

.news-pagination__indicator {
  font-size: 0.875rem;
  color: var(--color-muted);
}

/* ---- News article page ---- */
.news-article__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 8px;
  color: var(--color-muted);
}

.news-article__body {
  line-height: 1.9;
}

.news-article__body img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

/* ---- News pages responsive ---- */
@media (max-width: 767px) {
  .news-filter__button {
    font-size: 0.8125rem;
    padding: 6px 16px;
  }
}
/* ---- Privacy policy / terms of use (two-column layout with sticky TOC) ---- */
.policy-layout {
  display: flex;
  gap: 48px;
  align-items: flex-start;
}

.policy-toc {
  flex-shrink: 0;
  width: 220px;
  position: sticky;
  top: calc(var(--header-height) + 24px);
  border-left: 2px solid var(--color-border);
  padding-left: 20px;
}

.policy-toc__heading {
  margin: 0 0 12px;
  font-weight: var(--weight-bold);
  font-size: 0.875rem;
  color: var(--color-muted);
}

.policy-toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.policy-toc li {
  margin-bottom: 10px;
}

.policy-toc a {
  font-size: 0.875rem;
  line-height: 1.5;
}

.policy-body {
  flex: 1;
  min-width: 0;
}

.policy-body h2 {
  font-size: 1.125rem;
  margin: 40px 0 16px;
  padding-top: 8px;
}

.policy-body h2:first-of-type {
  margin-top: 24px;
}

.policy-body p {
  margin: 0 0 16px;
}

.policy-body ol {
  margin: 0 0 16px;
  padding-left: 24px;
}

.policy-body ol li {
  margin-bottom: 8px;
}

/* ---- Sitemap page ---- */
.sitemap-tree,
.sitemap-tree ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sitemap-tree > li {
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
}

.sitemap-tree > li > a {
  font-weight: var(--weight-bold);
}

.sitemap-tree ul {
  margin-top: 12px;
  padding-left: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ---- 404 error page ---- */
.error-page {
  min-height: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
}

.error-page__visual {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.error-page__digit {
  font-size: 4rem;
  font-weight: var(--weight-bold);
  color: var(--color-surface);
  background-color: var(--color-text);
  width: 88px;
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.error-page__digit--accent {
  color: #FFFFFF;
  background-color: var(--color-accent);
}

.error-page__text {
  font-size: 1.125rem;
  font-weight: var(--weight-bold);
  margin: 0;
}

.error-page__subtext {
  color: var(--color-muted);
  margin: 0 0 16px;
}

/* ---- Privacy/terms/sitemap/404 responsive ---- */
@media (max-width: 1023px) {
  .policy-layout {
    flex-direction: column;
  }

  .policy-toc {
    position: static;
    width: 100%;
    border-left: none;
    border-bottom: 1px solid var(--color-border);
    padding-left: 0;
    padding-bottom: 20px;
  }
}

@media (max-width: 767px) {
  .error-page__digit {
    width: 64px;
    height: 64px;
    font-size: 3rem;
  }
}
/* ---- Admin page (login + dashboard) ---- */
.admin-body {
  background-color: var(--color-surface);
}

.admin-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}

.admin-login {
  width: 100%;
  max-width: 360px;
  background-color: #FFFFFF;
  border-radius: 8px;
  padding: 32px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.admin-login__logo {
  width: 40px;
  height: 40px;
  margin: 0 auto 16px;
  background-color: var(--color-accent);
  border-radius: 4px;
}

.admin-login__heading {
  font-size: 1.125rem;
  margin: 0 0 24px;
}

.admin-login .form-field {
  text-align: left;
}

.admin-dashboard {
  width: 100%;
  max-width: 1000px;
  background-color: #FFFFFF;
  border-radius: 8px;
  padding: 32px;
}

.admin-export-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--color-border);
}

.admin-export-form__field label {
  display: block;
  font-size: 0.875rem;
  font-weight: var(--weight-bold);
  margin-bottom: 6px;
}

.admin-export-form__field input {
  padding: 10px;
  font-family: inherit;
  border: 1px solid var(--color-border);
  border-radius: 4px;
}

.admin-table-wrapper {
  overflow-x: auto;
}

.admin-visits-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.8125rem;
  white-space: nowrap;
}

.admin-visits-table th,
.admin-visits-table td {
  border: 1px solid var(--color-border);
  padding: 8px 10px;
  text-align: right;
}

.admin-visits-table th:first-child,
.admin-visits-table td:first-child {
  text-align: left;
  position: sticky;
  left: 0;
  background-color: #FFFFFF;
}

.admin-visits-table thead th {
  background-color: var(--color-surface);
  position: sticky;
  top: 0;
}
/* ---- Cookie consent banner ---- */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 500;
  background-color: #FFFFFF;
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08);
  padding: 20px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.cookie-banner__text {
  margin: 0;
  max-width: 640px;
  font-size: 0.875rem;
  color: var(--color-text);
}

.cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---- Cookie settings modal ---- */
.cookie-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 600;
  background-color: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.cookie-modal {
  width: 100%;
  max-width: 560px;
  max-height: 85vh;
  overflow-y: auto;
  background-color: #FFFFFF;
  border-radius: 8px;
  padding: 32px;
}

.cookie-modal__heading {
  margin: 0 0 12px;
  font-size: 1.25rem;
}

.cookie-modal__intro {
  margin: 0 0 24px;
  color: var(--color-muted);
  font-size: 0.875rem;
}

.cookie-modal__list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 24px;
}

.cookie-category {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
}

.cookie-category:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.cookie-category__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.cookie-category__name {
  font-weight: var(--weight-bold);
  font-size: 0.9375rem;
}

.cookie-category__locked {
  font-size: 0.75rem;
  color: var(--color-muted);
  flex-shrink: 0;
}

.cookie-category__desc {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--color-muted);
}

.cookie-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Toggle switch (checkbox styled as a switch) */
.cookie-toggle {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}

.cookie-toggle input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

.cookie-toggle__track {
  position: absolute;
  inset: 0;
  background-color: var(--color-border);
  border-radius: 999px;
  transition: background-color 0.15s ease;
}

.cookie-toggle__track::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background-color: #FFFFFF;
  border-radius: 50%;
  transition: transform 0.15s ease;
}

.cookie-toggle input:checked + .cookie-toggle__track {
  background-color: var(--color-accent);
}

.cookie-toggle input:checked + .cookie-toggle__track::before {
  transform: translateX(18px);
}

.cookie-toggle input:focus-visible + .cookie-toggle__track {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* ---- Cookie banner/modal responsive ---- */
@media (max-width: 767px) {
  .cookie-banner {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .cookie-banner__actions {
    justify-content: center;
  }

  .cookie-modal {
    padding: 24px;
  }
}

/* ==========================================================================
   Responsive breakpoints (shared, all pages)
   ========================================================================== */

/* Wide desktop: side menu fits in the outer margin */
@media (min-width: 1440px) {
  .page-frame {
    /* content already centered by max-width + margin auto */
  }
}

/* Tablet and narrow desktop: not enough margin for the side menu */
@media (max-width: 1439px) {
  .side-menu {
    position: fixed;
    right: auto;
    left: 0;
    top: 0;
    height: 100vh;
    width: 280px;
    max-width: 80vw;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    z-index: 200;
    padding-top: calc(var(--header-height) + 16px);
  }

  .side-menu.is-open {
    transform: translateX(0);
  }

  .hamburger-button {
    display: block;
  }
}

/* Tablet: keep the full nav visible */
@media (max-width: 1023px) {
  .site-footer__inner {
    grid-template-columns: 1fr 1fr;
  }

  .recruit-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile */
@media (max-width: 767px) {
  .global-nav {
    display: none;
  }

  .hero {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }

  .hero__illustration {
    width: 160px;
    height: 160px;
  }

  .logo-lockup {
    align-items: flex-start;
  }

  .logo-lockup__text {
    /* Space is constrained on mobile, so fall back to the stacked lockup
       (logo above slogan) instead of the horizontal version. */
    flex-direction: column;
  }

  .site-footer__inner {
    grid-template-columns: 1fr;
  }

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