/* ============================================
   Creer Technical Notes
   Existing corporate styles are inherited from style.css.
   ============================================ */

.technical-notes-hero .page-hero-desc {
  max-width: 720px;
}

.technical-notes-list-section {
  background: var(--off-white);
}

.technical-notes-intro {
  max-width: 780px;
  margin: 0 auto 48px;
  padding: 24px 28px;
  background: var(--white);
  border-left: 3px solid var(--teal-light);
  box-shadow: var(--shadow-sm);
}

.technical-notes-intro p {
  color: var(--text-sub);
  font-size: 15px;
  line-height: 2;
}

.technical-notes-section {
  padding: 0;
}

.technical-notes-section + .technical-notes-section {
  margin-top: 76px;
}

.technical-notes-section__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 30px;
}

.technical-notes-section__header .section-title {
  margin-bottom: 0;
  font-size: 28px;
}

.technical-notes-section__header > p {
  max-width: 520px;
  color: var(--text-sub);
  font-size: 14px;
  line-height: 1.85;
}

.technical-notes-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.technical-note-card {
  min-width: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}

.technical-note-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: rgba(36, 144, 181, 0.3);
}

.technical-note-card__link {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  padding: 30px;
}

.technical-note-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: 18px;
}

.technical-note-card__meta time {
  color: var(--text-light);
  font-family: var(--font-en);
  font-size: 13px;
  letter-spacing: 0.04em;
}

.technical-note-category {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 5px 11px;
  border-radius: 2px;
  background: var(--teal-pale);
  color: var(--teal);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
}

.technical-note-card h2,
.technical-note-card h3 {
  margin-bottom: 13px;
  color: var(--text-main);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.65;
  letter-spacing: 0.01em;
}

.technical-note-card p {
  margin-bottom: 20px;
  color: var(--text-sub);
  font-size: 14px;
  line-height: 1.9;
}

.technical-note-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 12px;
}

.technical-note-tags li {
  color: var(--text-light);
  font-size: 12px;
  line-height: 1.6;
}

.technical-note-card__more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 24px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 500;
}

.technical-note-card__more span {
  transition: transform var(--transition);
}

.technical-note-card:hover .technical-note-card__more span {
  transform: translateX(4px);
}

.technical-note-card--compact h2 {
  font-size: 17px;
}

.technical-note-card--compact h3 {
  font-size: 17px;
}

.technical-note-card--compact .technical-note-tags li:nth-child(n + 4) {
  display: none;
}

.technical-note-card--latest .technical-note-card__link {
  padding: 22px 24px;
}

.technical-note-card--latest .technical-note-card__meta {
  margin-bottom: 12px;
}

.technical-note-card--latest h2,
.technical-note-card--latest h3 {
  margin-bottom: 0;
  font-size: 17px;
  line-height: 1.6;
}

.technical-note-card--latest .technical-note-card__more {
  padding-top: 14px;
}

.technical-note-card__link:focus-visible,
.technical-note-theme-link:focus-visible,
.technical-notes-page-nav__link:focus-visible,
.technical-notes-page-nav__number:focus-visible {
  outline: 3px solid rgba(36, 144, 181, 0.55);
  outline-offset: 3px;
}

.technical-note-themes--tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.technical-note-theme-link {
  position: relative;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--text-main);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.technical-note-themes--tiles .technical-note-theme-link {
  display: flex;
  min-height: 152px;
  flex-direction: column;
  padding: 23px 22px;
}

.technical-note-theme-link:hover,
.technical-note-theme-link.is-current {
  border-color: rgba(36, 144, 181, 0.45);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.technical-note-theme-link__name {
  color: var(--navy);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.55;
}

.technical-note-theme-link__description {
  margin-top: 8px;
  color: var(--text-sub);
  font-size: 12px;
  line-height: 1.75;
}

.technical-note-theme-link__count {
  margin-top: auto;
  padding-top: 12px;
  color: var(--teal);
  font-family: var(--font-en);
  font-size: 12px;
  font-weight: 600;
}

.technical-note-themes--pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 42px;
}

.technical-note-themes--pills .technical-note-theme-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 9px;
  padding: 9px 14px;
}

.technical-note-themes--pills .technical-note-theme-link__name {
  font-size: 13px;
}

.technical-note-themes--pills .technical-note-theme-link__count {
  margin: 0;
  padding: 0;
}

.technical-note-themes--pills .technical-note-theme-link.is-current {
  background: var(--navy);
}

.technical-note-themes--pills .technical-note-theme-link.is-current .technical-note-theme-link__name,
.technical-note-themes--pills .technical-note-theme-link.is-current .technical-note-theme-link__count {
  color: var(--white);
}

.technical-notes-all-link {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}

.technical-notes-directory {
  background: var(--off-white);
}

.technical-notes-directory__header {
  max-width: 760px;
  margin-bottom: 34px;
}

.technical-notes-directory__header h1 {
  margin: 8px 0 14px;
  color: var(--navy);
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.45;
}

.technical-notes-directory__header p {
  color: var(--text-sub);
  font-size: 15px;
  line-height: 1.9;
}

.technical-notes-page-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}

.technical-notes-page-nav--top {
  margin: 0 0 30px;
}

.technical-notes-page-nav--bottom {
  margin-top: 44px;
}

.technical-notes-page-nav__side {
  display: flex;
}

.technical-notes-page-nav__side--next {
  justify-content: flex-end;
}

.technical-notes-page-nav__center {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.technical-notes-page-nav__summary {
  margin: 0;
  color: var(--text-sub);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.technical-notes-page-nav__link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 10px 17px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--navy);
  font-size: 13px;
  font-weight: 600;
}

.technical-notes-page-nav__link:hover {
  border-color: rgba(36, 144, 181, 0.45);
  box-shadow: var(--shadow-sm);
}

.technical-notes-page-nav__pages {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.technical-notes-page-nav__number {
  display: inline-flex;
  width: 46px;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  box-shadow: 0 2px 8px rgba(16, 42, 76, 0.06);
  color: var(--navy);
  font-family: var(--font-en);
  font-size: 14px;
  font-weight: 700;
}

a.technical-notes-page-nav__number:hover {
  border-color: rgba(36, 144, 181, 0.45);
  box-shadow: var(--shadow-sm);
}

.technical-notes-page-nav__number.is-current {
  border-color: var(--navy);
  background: var(--navy);
  box-shadow: 0 5px 14px rgba(16, 42, 76, 0.2);
  color: var(--white);
}

.technical-notes-page-nav__ellipsis {
  display: inline-flex;
  min-width: 20px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
}

.technical-notes-empty {
  padding: 40px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text-sub);
  text-align: center;
}

.technical-note-breadcrumb {
  padding-top: 86px;
}

.technical-note-breadcrumb .breadcrumb-inner {
  min-width: 0;
}

.technical-note-breadcrumb .breadcrumb-inner a,
.technical-note-breadcrumb .breadcrumb-inner .sep {
  flex-shrink: 0;
}

.technical-note-breadcrumb .breadcrumb-inner span:last-child {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.technical-note-article {
  background: var(--white);
}

.technical-note-header {
  padding: 72px 0 54px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--off-white) 0%, var(--white) 100%);
}

.technical-note-header h1 {
  margin: 22px 0 18px;
  color: var(--text-main);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.01em;
}

.technical-note-lead {
  max-width: 740px;
  color: var(--text-sub);
  font-size: 17px;
  line-height: 2;
}

.technical-note-dates {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 24px 0 14px;
  color: var(--text-light);
  font-size: 13px;
}

.technical-note-body {
  padding: 72px 0 28px;
  color: var(--text-main);
  font-size: 16px;
  line-height: 2.05;
}

.technical-note-body > :first-child {
  margin-top: 0;
}

.technical-note-body h2 {
  margin: 64px 0 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--navy);
  color: var(--navy);
  font-size: 25px;
  font-weight: 700;
  line-height: 1.55;
}

/* The closing separator already divides the article from its related links. */
.technical-note-body hr + h2 {
  padding-bottom: 0;
  border-bottom: 0;
}

.technical-note-body h3 {
  margin: 44px 0 18px;
  padding-left: 14px;
  border-left: 3px solid var(--teal-light);
  color: var(--text-main);
  font-size: 20px;
  line-height: 1.6;
}

.technical-note-body p,
.technical-note-body ul,
.technical-note-body ol,
.technical-note-body blockquote,
.technical-note-body pre,
.technical-note-body table {
  margin: 0 0 26px;
}

.technical-note-body ul,
.technical-note-body ol {
  padding-left: 1.6em;
}

.technical-note-body ul {
  list-style: disc;
}

.technical-note-body ol {
  list-style: decimal;
}

.technical-note-body li {
  margin-bottom: 7px;
  padding-left: 0.25em;
}

.technical-note-body blockquote {
  padding: 18px 22px;
  border-left: 3px solid #93a6b4;
  background: #f5f7f9;
  color: var(--text-main);
  font-weight: 400;
}

.technical-note-body strong {
  color: inherit;
  font-weight: 700;
}

.technical-note-body blockquote p:last-child {
  margin-bottom: 0;
}

.technical-note-body code {
  padding: 0.15em 0.4em;
  border-radius: 3px;
  background: var(--gray-50);
  font-family: Consolas, 'Courier New', monospace;
  font-size: 0.92em;
}

.technical-note-body pre {
  overflow-x: auto;
  padding: 22px;
  border-top: 3px solid var(--teal-light);
  border-radius: var(--radius-sm);
  background: #162235;
  box-shadow: 0 12px 28px rgba(17, 34, 53, 0.16);
  color: #f4f7fb;
  line-height: 1.75;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.technical-note-body pre code {
  padding: 0;
  background: transparent;
}

/* Explanatory text and relationship diagrams are not terminal output.
   Override Shiki's inline dark theme only for plain-text blocks. */
.technical-note-body pre[data-language='text'],
.technical-note-body pre[data-language='plaintext'] {
  max-width: 100%;
  border: 1px solid #dbe3e9;
  border-radius: var(--radius-sm);
  background: #f5f7f9 !important;
  color: #263747 !important;
  box-shadow: none;
  white-space: pre;
  overflow-wrap: normal;
}

.technical-note-body pre[data-language='text'] span,
.technical-note-body pre[data-language='plaintext'] span {
  color: inherit !important;
}

.technical-note-flow {
  margin: 32px 0;
  padding: clamp(18px, 4vw, 28px);
  border: 1px solid #dbe3e9;
  border-radius: var(--radius-sm);
  background: #f5f7f9;
}

.technical-note-flow figcaption {
  margin-bottom: 18px;
  color: var(--text-main);
  font-weight: 700;
}

.technical-note-body .technical-note-flow ol {
  margin: 0;
  padding-left: 1.6em;
}

.technical-note-body .technical-note-flow li {
  margin: 0 0 18px;
}

.technical-note-body .technical-note-flow li:last-child {
  margin-bottom: 0;
}

.technical-note-flow li strong,
.technical-note-flow li span {
  display: block;
}

.technical-note-flow li span {
  margin-top: 4px;
  font-size: 0.92em;
}

.technical-note-body table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
}

.technical-note-body th,
.technical-note-body td {
  min-width: 140px;
  padding: 13px 16px;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.technical-note-body th {
  background: var(--off-white);
  font-weight: 700;
}

.technical-note-table-scroll {
  width: 100%;
  margin: 32px 0;
  overflow-x: auto;
  border: 1px solid var(--border);
  -webkit-overflow-scrolling: touch;
}

.technical-note-body .technical-note-comparison-table {
  display: table;
  min-width: 700px;
  margin: 0;
  table-layout: fixed;
  border: 0;
}

.technical-note-comparison-table__condition {
  width: 36%;
}

.technical-note-comparison-table__result {
  width: 16%;
}

.technical-note-body .technical-note-comparison-table th,
.technical-note-body .technical-note-comparison-table td {
  min-width: 0;
  border-top: 0;
  border-left: 0;
  text-align: center;
  vertical-align: middle;
}

.technical-note-body .technical-note-comparison-table th:last-child,
.technical-note-body .technical-note-comparison-table td:last-child {
  border-right: 0;
}

.technical-note-body .technical-note-comparison-table tr:last-child td {
  border-bottom: 0;
}

.technical-note-body .technical-note-comparison-table th:first-child,
.technical-note-body .technical-note-comparison-table td:first-child {
  text-align: left;
}

.technical-note-body .technical-note-comparison-table th {
  white-space: nowrap;
}

.technical-note-body .technical-note-data-table {
  display: table;
  min-width: 700px;
  margin: 0;
  table-layout: fixed;
  border: 0;
}

.technical-note-body .technical-note-data-table th,
.technical-note-body .technical-note-data-table td {
  min-width: 0;
  border-top: 0;
  border-left: 0;
  text-align: center;
  vertical-align: middle;
}

.technical-note-body .technical-note-data-table th:first-child,
.technical-note-body .technical-note-data-table td:first-child {
  text-align: left;
}

.technical-note-body .technical-note-data-table th:last-child,
.technical-note-body .technical-note-data-table td:last-child {
  border-right: 0;
}

.technical-note-body .technical-note-data-table tr:last-child td {
  border-bottom: 0;
}

.technical-note-data-table--metrics .technical-note-data-table__label {
  width: 56%;
}

.technical-note-data-table--metrics .technical-note-data-table__value {
  width: 22%;
}

.technical-note-data-table--evaluation .technical-note-data-table__check {
  width: 30%;
}

.technical-note-data-table--evaluation .technical-note-data-table__gpt {
  width: 30%;
}

.technical-note-data-table--evaluation .technical-note-data-table__notta {
  width: 23%;
}

.technical-note-data-table--evaluation .technical-note-data-table__human {
  width: 17%;
}

.technical-note-body a {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.technical-note-figure {
  margin: 2.5rem 0 2rem;
}

.technical-note-figure__image-link {
  display: block;
  overflow: hidden;
  border: 1px solid #d9e2e8;
  border-radius: 8px;
  background: #fff;
  cursor: zoom-in;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.technical-note-body .technical-note-figure__image-link {
  text-decoration: none;
}

.technical-note-figure__image-link:hover,
.technical-note-figure__image-link:focus-visible {
  border-color: rgba(36, 144, 181, 0.65);
  box-shadow: 0 10px 28px rgba(17, 34, 53, 0.14);
}

.technical-note-figure__image-link img {
  display: block;
  width: 100%;
  height: auto;
}

.technical-note-figure__actions {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}

.technical-note-body .technical-note-figure__expand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid var(--teal);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--teal);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  text-decoration: none;
  transition: background-color var(--transition), color var(--transition), transform var(--transition);
}

.technical-note-body .technical-note-figure__expand:hover,
.technical-note-body .technical-note-figure__expand:focus-visible {
  background: var(--teal);
  color: #fff;
  transform: translateY(-1px);
}

.technical-note-figure figcaption {
  margin-top: 0.8rem;
  color: #5f6b76;
  font-size: 0.9rem;
  line-height: 1.8;
  text-align: center;
}

.technical-note-back {
  padding: 28px 0 80px;
  border-top: 1px solid var(--border);
}

.technical-note-pagination {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  padding: 32px 0 28px;
  border-top: 1px solid var(--border);
}

.technical-note-pagination__heading {
  grid-column: 1 / -1;
  margin: 0 0 -4px;
  color: var(--navy);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.technical-note-pagination__link,
.technical-note-pagination__status {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 8px;
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--off-white);
}

.technical-note-pagination__link {
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.technical-note-pagination__link:hover {
  border-color: rgba(36, 144, 181, 0.4);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.technical-note-pagination__link--previous,
.technical-note-pagination__status--previous {
  grid-column: 2;
  align-items: flex-end;
  text-align: right;
}

.technical-note-pagination__link--next {
  border-color: rgba(36, 144, 181, 0.34);
  background: linear-gradient(135deg, rgba(36, 144, 181, 0.1), var(--off-white));
}

.technical-note-pagination__status {
  border-style: dashed;
  background: #fff;
}

.technical-note-pagination__status strong {
  color: var(--text-main);
  font-size: 15px;
  line-height: 1.7;
}

.technical-note-pagination__status > span:last-child:not(.technical-note-pagination__label) {
  color: var(--text-light);
  font-size: 12px;
  line-height: 1.6;
}

.technical-note-pagination__label {
  color: var(--teal);
  font-size: 13px;
  font-weight: 600;
}

.technical-note-pagination__link strong {
  color: var(--text-main);
  font-size: 15px;
  line-height: 1.7;
}

.technical-note-pagination__link time {
  color: var(--text-light);
  font-family: var(--font-en);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.technical-note-related .section-header {
  margin-bottom: 36px;
}

@media (max-width: 760px) {
  .technical-notes-intro {
    margin-bottom: 40px;
    padding: 21px 22px;
  }

  .technical-notes-section + .technical-notes-section {
    margin-top: 58px;
  }

  .technical-notes-section__header {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
  }

  .technical-notes-section__header .section-title {
    font-size: 24px;
  }

  .technical-notes-grid {
    grid-template-columns: 1fr;
  }

  .technical-note-card__link {
    padding: 24px;
  }

  .technical-note-card:not(.technical-note-card--compact) p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  .technical-note-themes--tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .technical-note-themes--tiles .technical-note-theme-link {
    min-height: 94px;
    padding: 17px 15px;
  }

  .technical-note-theme-link__name {
    font-size: 14px;
  }

  .technical-note-themes--tiles .technical-note-theme-link__description {
    display: none;
  }

  .technical-note-themes--pills {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .technical-note-themes--pills .technical-note-theme-link {
    justify-content: space-between;
  }

  .technical-notes-page-nav {
    grid-template-areas:
      "pages pages"
      "previous next";
    grid-template-columns: 1fr 1fr;
    gap: 12px 8px;
  }

  .technical-notes-page-nav__side {
    grid-area: previous;
  }

  .technical-notes-page-nav__side--next {
    grid-area: next;
  }

  .technical-notes-page-nav__center {
    grid-area: pages;
  }

  .technical-notes-page-nav__link {
    padding: 9px 11px;
    font-size: 12px;
  }

  .technical-notes-page-nav__side--next .technical-notes-page-nav__link {
    margin-left: auto;
  }

  .technical-note-breadcrumb {
    padding-top: 82px;
  }

  .technical-note-header {
    padding: 52px 0 42px;
  }

  .technical-note-header h1 {
    font-size: 28px;
  }

  .technical-note-lead {
    font-size: 15px;
  }

  .technical-note-body {
    padding-top: 52px;
    font-size: 15px;
    line-height: 2;
  }

  .technical-note-body h2 {
    margin-top: 50px;
    font-size: 22px;
  }

  .technical-note-body h3 {
    font-size: 18px;
  }

  .technical-note-body .technical-note-data-table--metrics {
    width: 100%;
    min-width: 0;
    font-size: 13px;
  }

  .technical-note-data-table--metrics .technical-note-data-table__label {
    width: 48%;
  }

  .technical-note-data-table--metrics .technical-note-data-table__value {
    width: 26%;
  }

  .technical-note-body .technical-note-data-table--metrics th,
  .technical-note-body .technical-note-data-table--metrics td {
    padding: 10px 7px;
    overflow-wrap: anywhere;
  }

  .technical-note-body .technical-note-data-table--metrics th {
    white-space: normal;
  }

  .technical-note-pagination {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .technical-note-pagination__link--previous,
  .technical-note-pagination__status--previous {
    grid-column: 1;
  }

  .technical-note-pagination__link,
  .technical-note-pagination__status {
    padding: 20px;
  }
}
