/* Approved A direction: quiet workspace. Loaded after the original theme.
   Focus/skip/reduced-motion patterns adapted from safe-site-studio components. */
:root {
  color-scheme: light;
  --primary-color: #2459d3;
  --secondary-color: #166b54;
  --accent-color: #6450b5;
  --neutral-color: #59677d;
  --background-color: #f5f7fb;
  --card-background: #fff;
  --text-primary: #18283f;
  --text-secondary: #526178;
  --border-color: #dce3ed;
  --priority-high-color: #b62939;
  --priority-medium-color: #805000;
  --priority-low-color: #166b54;
  --shadow-light: 0 2px 6px #18283f05;
  --shadow-medium: 0 6px 24px #18283f08;
  --shadow-large: 0 12px 32px #18283f10;
  --font-primary: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, system-ui, sans-serif;
  --font-japanese: var(--font-primary);
  --ui-focus: #2459d3;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid var(--ui-focus);
  outline-offset: 4px;
}

.skip {
  position: absolute;
  top: -6rem;
  left: 1rem;
  z-index: 1100;
  padding: .8rem 1rem;
  background: #fff;
  color: var(--primary-color);
}

.skip:focus {
  top: 1rem;
}

body {
  overflow-wrap: anywhere;
}

button, input {
  font: inherit;
}

img {
  max-width: 100%;
}

a {
  text-underline-offset: 4px;
}

.container {
  width: min(1180px, calc(100% - 64px));
  padding: 0;
}

.site-main {
  padding: 30px 0 20px;
}

.home-content {
  max-width: none;
  padding: 0;
}

h1, h2, h3 {
  text-wrap: pretty;
}

.workspace-title {
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin: 0 0 12px;
}

.section-title {
  font-size: clamp(1.35rem, 2.5vw, 1.8rem);
  line-height: 1.5;
  margin-bottom: 22px;
}

.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border-color);
  box-shadow: none;
}

.header .nav-container {
  width: min(1180px, calc(100% - 64px));
  min-height: 76px;
  padding: 12px 0;
  gap: 16px;
  flex-wrap: wrap;
}

.header .logo {
  color: var(--text-primary);
  font-size: 1.2rem;
  max-width: 100%;
}

.header .logo:hover {
  transform: none;
  color: var(--primary-color);
}

.nav-menu {
  gap: 4px;
  flex-wrap: wrap;
}

.nav-link {
  font-size: .875rem;
  min-height: 44px;
  padding: .6rem .8rem;
}

.nav-link::after {
  display: none;
}

.nav-link.active, .nav-link:hover {
  background: #edf2ff;
  color: var(--primary-color);
}

.header .actions {
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
}

.search-toggle, .language-btn, .mobile-menu-btn {
  background: #fff;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  box-shadow: none;
  border-radius: 9px;
  min-height: 44px;
}

.search-toggle, .language-btn {
  font-size: .8rem;
  padding: .6rem .8rem;
}

.search-toggle:hover, .language-btn:hover, .mobile-menu-btn:hover {
  transform: none;
}

.mobile-menu-btn {
  min-width: 44px;
  align-items: center;
  justify-content: center;
}

.current-date {
  display: inline-flex;
  padding: 8px 12px;
  border-left: 1px solid var(--border-color);
  font-size: .75rem;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  white-space: normal;
}

.language-dropdown, .mobile-menu {
  background: #fff;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-large);
  color: var(--text-primary);
}

.language-option {
  display: block;
  min-height: 44px;
  text-decoration: none;
}

.site-header .mobile-menu {
  position: absolute;
  top: 100%;
  max-height: 65dvh;
  overflow-y: auto;
  padding: 20px;
}

.mobile-menu-link, button.mobile-menu-link, .mobile-dropdown .language-option {
  background: #f5f7fb;
  color: var(--text-primary);
  border-color: var(--border-color);
}

.mobile-menu-link:hover, .mobile-menu-link:focus-visible, .mobile-menu-link.active,
.mobile-dropdown .language-option:hover, .mobile-dropdown .language-option.is-active {
  background: #edf2ff;
  color: var(--primary-color);
  transform: none;
}

.no-script-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding: 12px 20px;
  background: #fff;
}

.no-script-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.button--primary {
  background: var(--primary-color);
  border-radius: 9px;
  min-height: 44px;
  box-shadow: none;
}

.button--primary:hover {
  background: #1948b6;
  transform: none;
  box-shadow: none;
}

.button--ghost {
  background: #fff;
  border-radius: 9px;
  min-height: 44px;
}

.projects-list {
  padding: 0;
}

.board-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 0 0 28px;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
}

.board-summary > div {
  min-width: 0;
  margin: 18px 0;
  padding: 0 20px;
  border-right: 1px solid var(--border-color);
}

.board-summary > div:last-child {
  border-right: 0;
}

.board-summary dt {
  font-size: .8rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.board-summary dd {
  margin: 0;
  font-size: 1.8rem;
  line-height: 1.3;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.board-summary small {
  font-size: .75rem;
  color: var(--text-secondary);
}

.board-summary dd small {
  font-size: 1rem;
  margin-left: 3px;
}

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

.projects-list .card {
  min-width: 0;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: var(--shadow-light);
  transition: border-color 180ms ease;
}

.projects-list .card::before {
  display: none;
}

.projects-list .card:hover {
  transform: none;
  border-color: #a8bee4;
  box-shadow: var(--shadow-medium);
}

.projects-list .card-body {
  padding: 24px;
  gap: 16px;
  height: 100%;
}

.projects-list .card-header {
  flex-direction: column-reverse;
  align-items: flex-start;
  gap: 14px;
}

.projects-list .card-header h3 {
  font-size: 1.15rem;
  line-height: 1.6;
}

.projects-list .card-status {
  font-size: .75rem;
  font-weight: 600;
  padding: 4px 10px;
  letter-spacing: 0;
}

.card-status--completed {
  color: #166b54;
  background: #eaf5ef;
}

.card-status--in-progress {
  color: #2459d3;
  background: #edf2ff;
}

.card-status--not-started {
  color: #59677d;
  background: #eef1f6;
}

.projects-list .card-summary {
  margin: 0;
  font-size: .9rem;
  line-height: 1.85;
}

.projects-list .project-dates {
  margin: 0;
  font-size: .8rem;
  color: var(--text-secondary);
  font-weight: 400;
}

.projects-list .card-insights {
  margin-top: auto;
  gap: 8px;
}

.card-task-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  font-size: .8rem;
  color: var(--text-secondary);
}

.card-task-summary strong {
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.card-remaining {
  color: var(--text-secondary);
  font-size: .75rem;
}

.board-progress {
  display: block;
  width: 100%;
  height: 6px;
  appearance: none;
  border: 0;
  border-radius: 6px;
  overflow: hidden;
  background: #e8edf4;
  color: var(--primary-color);
}

.board-progress::-webkit-progress-bar {
  background: #e8edf4;
  border-radius: 6px;
}

.board-progress::-webkit-progress-value {
  background: var(--primary-color);
  border-radius: 6px;
}

.board-progress::-moz-progress-bar {
  background: var(--primary-color);
  border-radius: 6px;
}

.card--completed .board-progress {
  color: #166b54;
}

.card--completed .board-progress::-webkit-progress-value {
  background: #166b54;
}

.card--completed .board-progress::-moz-progress-bar {
  background: #166b54;
}

.board-project-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 44px;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
  font-size: .85rem;
  font-weight: 600;
  text-decoration: none;
}

.board-project-link:hover {
  text-decoration: underline;
}

/* Preserve the existing project cards, seven-column table and Gantt behaviour. */
.projects-list-container, .project-single-container {
  max-width: none;
  margin: 0 0 28px;
  padding: 28px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: none;
}

.projects-list-container h1, .project-single-container .project-title {
  text-align: left;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.5;
}

.project-single-container .project-header {
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 24px;
}

.project-single-container .project-description {
  font-size: 1rem;
  line-height: 1.85;
  max-width: 48em;
}

.project-meta {
  justify-content: flex-start;
  gap: 10px;
}

.project-cards {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 20px;
}

.project-card {
  box-shadow: none;
  border: 1px solid var(--border-color);
}

.project-card:hover {
  transform: none;
  box-shadow: var(--shadow-light);
}

.project-details dl {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 20px;
}

.project-details dl > div {
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
  min-width: 0;
}

.project-details dt {
  font-size: .8rem;
  font-weight: 500;
}

.project-details dd {
  font-size: .95rem;
  line-height: 1.8;
}

.project-body {
  font-size: 1rem;
  line-height: 1.95;
  max-width: 48em;
}

.project-visuals {
  padding: 0;
  margin: 24px 0;
}

.project-visuals section + section {
  margin-top: 36px;
}

.project-visuals section {
  min-width: 0;
}

.project-visuals section:first-child {
  overflow-x: auto;
}

.projects-list-footer, .back-link {
  margin-block: 20px;
}

.task-table th {
  background: #edf2ff;
  letter-spacing: 0;
}

.task-table tbody tr:nth-child(even) {
  background: #f5f7fb;
}

.task-table tbody tr:hover {
  transform: none;
  box-shadow: none;
  background: #edf2ff;
}

.status, .priority {
  line-height: 1.5;
  letter-spacing: 0;
}

.status-completed {
  background: #eaf5ef;
  color: #166b54;
}

.status-in-progress {
  background: #edf2ff;
  color: #2459d3;
}

.status-not-started {
  background: #eef1f6;
  color: #59677d;
}

.priority-high {
  background: #fff0f1;
  color: #b62939;
}

.priority-medium {
  background: #fff4df;
  color: #805000;
}

.priority-low {
  background: #eaf5ef;
  color: #166b54;
}

/* Journal: existing vertical order, metadata and article body. */
.blog-list {
  padding: 16px 0;
}

.blog-list > .section-title {
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border-color);
}

.blog-items {
  max-width: 900px;
  gap: 20px;
  align-items: stretch;
}

.blog-items .journal-card {
  padding: 28px;
  max-width: none;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: var(--shadow-light);
}

.journal-card::before {
  display: none;
}

.blog-items .journal-card:hover {
  transform: none;
  box-shadow: var(--shadow-medium);
}

.journal-card h2 {
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  line-height: 1.65;
  margin: 12px 0;
}

.journal-card h2 a {
  color: var(--text-primary);
  text-decoration: none;
}

.journal-card h2 a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

.blog-items .date {
  font-size: .8rem;
  font-variant-numeric: tabular-nums;
}

.blog-items .desc {
  line-height: 1.9;
  font-size: .95rem;
  margin-bottom: 20px;
}

.journal-card__footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
}

.journal-card__footer .author {
  margin: 0;
}

.journal-read-more {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: .85rem;
  font-weight: 600;
}

.blog-post {
  max-width: 900px;
  padding: clamp(20px, 4vw, 48px);
  margin: 0 auto;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: none;
}

.blog-post .post-header {
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 32px;
  padding-bottom: 24px;
}

.blog-post .post-header h1 {
  font-size: clamp(1.6rem, 3.2vw, 2.5rem);
  line-height: 1.5;
  margin-bottom: 20px;
}

.blog-post .post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  font-size: .8rem;
}

.blog-post .post-hero img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.blog-post .rich-content {
  max-width: 46em;
  margin-inline: auto;
  line-height: 1.95;
}

.blog-post .rich-content h2 {
  background: none;
  border: 0;
  border-bottom: 1px solid var(--border-color);
  padding: 0 0 12px;
  font-size: 1.4rem;
}

.blog-post .rich-content h3 {
  border: 0;
  font-size: 1.15rem;
}

.journal-post-footer {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

.journal-post-footer .share {
  justify-content: flex-start;
}

.journal-post-footer .share li a {
  box-shadow: none;
}

/* About and members retain the supplied wording and photos. */
.workspace-about {
  padding: 16px 0;
  line-height: 1.9;
}

.workspace-about > p {
  max-width: 48em;
}

.workspace-about .profile-wrapper {
  justify-content: flex-start;
  margin: 20px 0;
}

.workspace-about .profile-photo {
  width: 104px;
  height: 104px;
  object-fit: cover;
  border-radius: 24px;
  border: 1px solid var(--border-color);
  box-shadow: none;
}

.workspace-about .profile-author {
  text-align: left;
  font-size: 1.5rem;
}

.workspace-about .features-list {
  display: block;
  margin: 24px 0 36px;
}

.workspace-about .features-list h3 {
  margin: 24px 0 10px;
  font-size: 1.1rem;
}

.workspace-about .feature-item {
  padding: 20px 24px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: none;
  background: #fff;
}

.workspace-about .feature-item:hover {
  transform: none;
}

.members-list {
  padding: 16px 0;
}

.member-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 20px;
}

.member-item {
  min-width: 0;
  max-width: none;
  margin-bottom: 0;
  align-items: stretch;
  padding: 24px;
  text-align: left;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: none;
}

.member-item:hover {
  transform: none;
  box-shadow: var(--shadow-light);
}

.member-item .member-link {
  display: block;
  text-decoration: none;
  color: var(--text-primary);
}

.member-item .member-photo-wrapper {
  margin: 0 0 16px;
  justify-content: flex-start;
}

.member-item .member-link:hover {
  transform: none;
}

.member-item .member-photo {
  width: 76px;
  height: 76px;
  border-radius: 20px;
  object-fit: cover;
  border: 1px solid var(--border-color);
}

.member-item h3 {
  font-size: 1.2rem;
  margin-bottom: 16px;
}

.member-bio {
  line-height: 1.9;
  font-size: .95rem;
}

.member-detail {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px;
  text-align: left;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: #fff;
  box-shadow: none;
}

.member-detail .member-photo-wrapper {
  text-align: left;
  justify-content: flex-start;
  margin: 0 0 24px;
}

.member-detail .member-photo {
  width: 120px;
  height: 120px;
  border-radius: 28px;
  object-fit: cover;
  border: 1px solid var(--border-color);
}

.member-detail .member-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 24px;
  text-align: left;
}

.member-detail .member-bio {
  max-width: 46em;
}

.site-footer {
  background: #fff;
  color: var(--text-primary);
  border-top: 1px solid var(--border-color);
  box-shadow: none;
  margin-top: 48px;
  text-align: left;
}

.footer-inner {
  padding: 28px 0;
}

.footer-logo {
  display: inline-block;
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-copy {
  font-size: .8rem;
  color: var(--text-secondary);
  line-height: 1.85;
}

.footer-return {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: 12px;
  font-size: .85rem;
}

@media (max-width: 1024px) {
  .projects-list .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .board-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .board-summary > div {
    border-right: 0;
  }
}

@media (max-width: 700px) {
  .container, .header .nav-container {
    width: calc(100% - 32px);
  }
  .header .nav-container {
    gap: 10px;
    min-height: 66px;
  }
  .header .logo {
    flex: 1;
    font-size: 1.05rem;
  }
  .header .actions {
    flex: 1 0 100%;
    justify-content: flex-start;
  }
  .current-date {
    font-size: .75rem;
    padding: 6px 0 6px 10px;
  }
  .site-main {
    padding-top: 20px;
  }
  .projects-list .card-grid {
    grid-template-columns: 1fr;
  }
  .board-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .board-summary > div {
    margin: 12px 0;
    padding: 0 16px;
  }
  .board-summary dd {
    font-size: 1.5rem;
  }
  .projects-list .card-body, .projects-list-container, .project-single-container {
    padding: 20px;
  }
  .project-details dl {
    grid-template-columns: 1fr;
  }
  .blog-items .journal-card, .blog-post, .member-detail {
    padding: 22px 20px;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
  .back-to-top {
    right: 16px;
    bottom: 16px;
  }
}

@media (max-width: 480px) {
  .site-header {
    position: relative;
  }
}

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

/* Approved additions: missing data, hierarchy, deadlines, and printed copies. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.priority-unset, .status-unset {
  color: #526178;
  background: #eef1f6;
}

.breadcrumbs {
  margin: 0 0 24px;
  font-size: .85rem;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.breadcrumbs li {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}

.breadcrumbs li + li::before {
  content: '/';
  color: var(--text-secondary);
}

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

.breadcrumbs [aria-current] {
  color: var(--text-secondary);
  overflow-wrap: anywhere;
}

.deadline-badge {
  display: inline-block;
  margin: 4px 0;
  padding: 4px 9px;
  border-radius: 6px;
  font-size: .75rem;
  font-weight: 650;
  line-height: 1.5;
  border: 1px solid currentColor;
}

.deadline-badge--soon {
  color: #805000;
  background: #fff4df;
}

.deadline-badge--overdue {
  color: #b62939;
  background: #fff0f1;
}

.task-table .deadline-badge {
  display: table;
}

.deadline-note {
  color: var(--text-secondary);
  font-size: .85rem;
  margin-top: 12px;
}

@media print {
  @page {
    margin: 14mm;
  }
  html, body {
    background: #fff !important;
    color: #000 !important;
    font-size: 10pt;
  }
  *, *::before, *::after {
    box-shadow: none !important;
    text-shadow: none !important;
    animation: none !important;
    transition: none !important;
  }
  .site-header, .site-footer, .skip, .back-to-top, .share-box, .share, .projects-list-footer, .back-link, .detail-return, .breadcrumbs, .no-script-nav {
    display: none !important;
  }
  .container, .site-main, .home-content, .project-single-container, .projects-list-container, .project-body, .blog-post, .member-detail {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
  }
  .project-header, .project-details, .project-body {
    margin-bottom: 12pt;
  }
  h1, h2, h3, dt {
    break-after: avoid;
    color: #000 !important;
  }
  p, li {
    orphans: 3;
    widows: 3;
  }
  a, .status, .priority, .deadline-badge {
    color: #000 !important;
  }
  .status, .priority, .deadline-badge {
    background: #fff !important;
    border: 1px solid #555 !important;
  }
  .task-table {
    display: table !important;
    width: 100% !important;
    table-layout: fixed;
    overflow: visible !important;
    border-collapse: collapse;
    font-size: 9pt;
  }
  .task-table caption {
    position: static;
    clip-path: none;
    width: auto;
    height: auto;
    margin: 0 0 8pt;
    text-align: left;
    font-weight: 700;
  }
  .task-table thead {
    display: table-header-group !important;
  }
  .task-table tbody {
    display: table-row-group !important;
  }
  .task-table tr {
    display: table-row !important;
    break-inside: avoid;
    background: #fff !important;
  }
  .task-table th, .task-table td {
    display: table-cell !important;
    width: auto !important;
    padding: 5pt !important;
    border: 1px solid #777 !important;
    color: #000 !important;
    background: #fff !important;
    font-size: 9pt;
    overflow-wrap: anywhere;
  }
  .task-table td::before {
    display: none !important;
  }
  .task-table th:first-child {
    width: 22% !important;
  }
  .project-details dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .project-details dl > div {
    break-inside: avoid;
  }
  .project-visuals {
    margin: 12pt 0;
  }
  .projects-list .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .card, .member-item {
    break-inside: avoid;
  }
}

/* Date guidance and long task navigation. */
.schedule-warning, .schedule-note, .gantt-note {
  margin-block: 8px;
  color: #805000;
  font-size: .85rem;
  line-height: 1.8;
}

.schedule-warning {
  padding: 10px 14px;
  border-left: 3px solid currentColor;
  background: #fff4df;
}

.gantt-fallback {
  padding: 16px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #fff;
  line-height: 1.85;
}

.gantt-chart {
  overflow-x: auto;
}

.task-toc {
  margin: 24px 0 32px;
  padding: 20px 24px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: #f5f7fb;
}

.task-toc h2 {
  font-size: 1.1rem;
  margin-bottom: 12px;
}

.task-toc ul {
  list-style: disc;
  padding-left: 1.5em;
}

.task-toc a {
  display: inline-block;
  padding-block: 8px;
  line-height: 1.75;
}

.project-body :is(h2,h3,h4) {
  scroll-margin-top: 180px;
}

@media (max-width: 480px) {
  .project-body :is(h2,h3,h4) {
    scroll-margin-top: 16px;
  }
}

@media print {
  .task-toc {
    display: none !important;
  }
  .gantt-chart {
    display: none !important;
  }
  .gantt-fallback {
    display: block !important;
    border: 0;
    padding: 0;
  }
  .schedule-warning, .schedule-note, .gantt-note {
    color: #000 !important;
    background: #fff !important;
  }
}

/* Shared explanation for task states and date indicators. */
.task-legend {
  margin: 16px 0 24px;
  padding: 14px 18px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #f5f7fb;
  color: var(--text-secondary);
  font-size: .85rem;
  line-height: 1.85;
}

.task-legend p + p {
  margin-top: 6px;
}

.task-legend strong {
  color: var(--text-primary);
}

.task-legend-zone {
  display: inline-block;
}

@media print {
  .task-legend {
    color: #000;
    background: #fff;
    padding: 8pt;
    font-size: 9pt;
    break-inside: avoid;
  }
  .task-legend strong {
    color: #000;
  }
}
