/* Shared styles for all past-exam explanation pages. */
/* Keep explanation_pastexams/css/index.css for the past-exam index only. */

/* Source consolidated from 99.css */

:root {
  --color-green: #4ade80;
  --color-purple: #a78bfa;
  --color-orange: #fb923c;
  --color-gray-50: #f9fafb;
  --color-gray-100: #f3f4f6;
  --color-gray-200: #e5e7eb;
  --color-gray-300: #d1d5db;
  --color-gray-400: #9ca3af;
  --color-gray-600: #4b5563;
  --color-gray-800: #1f2937;
  --color-gray-900: #111827;
  --color-blue-600: #2563eb;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}


html {
  -webkit-text-size-adjust: 100%;
  font-feature-settings: normal;
  font-variation-settings: normal;
}

body {
  background-color: white;
  color: var(--color-gray-900);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.site-body {
  min-height: 100vh;
}

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

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  color: inherit;
}

a {
  text-decoration: none;
  color: inherit;
}

::selection {
  background-color: #dbeafe;
  /* blue-100 */
}

/* Layout */
.app-container {
  margin-top: 10vh;
  min-height: 100vh;
  background-color: #ffffff;
}

.content-wrapper {
  max-width: 1280px;
  /* Increased from 1152px */
  margin: 0 auto;
  padding: 2rem 1rem;
  /* Reduced for mobile */
}

@media (min-width: 768px) {
  .content-wrapper {
    padding: 3rem 1.5rem;
  }
}

.main-header {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  /* gap-8 */
  margin-bottom: 3rem;
  /* mb-12 */
  border-bottom: 1px solid #e5e7eb;
  /* border-gray-200 */
  padding-bottom: 2rem;
  /* pb-8 */
}

@media (min-width: 768px) {
  .main-header {
    flex-direction: row;
  }
}

.header-content {
  flex: 1;
}

.header-title {
  font-size: 1.875rem;
  /* text-3xl for mobile */
  font-weight: 700;
  /* font-bold */
  letter-spacing: -0.025em;
  /* tracking-tight */
  margin-bottom: 1rem;
  /* mb-4 */
  display: flex;
  flex-wrap: wrap;
  /* Allow wrapping on small screens */
  align-items: baseline;
  gap: 0.5rem;
  /* gap-2 */
}

@media (min-width: 768px) {
  .header-title {
    font-size: 3rem;
    /* text-5xl */
    margin-bottom: 1.5rem;
    /* mb-6 */
    gap: 1rem;
    /* gap-4 */
  }
}

.header-meta {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  /* space-y-1 */
  font-size: 0.875rem;
  /* text-sm */
  color: #4b5563;
  /* text-gray-600 */
}

.header-meta a {
  color: #2563eb;
  /* text-blue-600 */
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.25rem;
  word-break: break-all;
  /* Prevent long URLs from overflowing */
}

.header-meta a:hover {
  text-decoration: underline;
}

.sidebar {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  /* space-y-3 */
}

@media (min-width: 768px) {
  .sidebar {
    width: 16rem;
    /* w-64 */
  }
}

.sidebar-button {
  width: 100%;
  padding: 0.75rem 1rem;
  /* py-3 px-4 */
  background-color: #f0f0f0;
  border: 2px solid #000000;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.2s;
}

.sidebar-button:hover {
  background-color: #e5e7eb;
}

/* Main Content Area */
.abbreviation-section {
  margin-top: 2rem;
}

.section-subtitle {
  font-weight: 700;
  color: var(--color-gray-600);
  margin-bottom: 1rem;
  font-size: 1rem;
}

.abbreviation-table {
  width: 100%;
  max-width: 24rem;
  border-collapse: collapse;
  border: 1px solid var(--color-gray-300);
}

.abbreviation-table td {
  border: 1px solid var(--color-gray-300);
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
}

.abbr-code {
  width: 4rem;
  text-align: center;
}

/* Question Section */
.question-section {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.q1-section {
  gap: 1.25rem;
}

.q1-section .answer-badge-wrapper {
  margin: 1.25rem 0 0.625rem;
}

.q1-section .content-box-gray {
  margin: 1.25rem 0;
}

.q1-section .content-title-row {
  margin: 1.25rem 0 0.625rem;
}

.q1-section .content-box-blue {
  margin: 1.25rem 0;
}

.q1-section .explanation-text {
  margin: 0.625rem 0;
}

.q1-section .answer-red-underline {
  margin: 1.25rem 0;
}

.q1-section .accounting-cards-grid {
  margin: 1.25rem 0;
}

.q1-section .question-header {
  margin: 1.25rem 0 0.625rem;
}

.question-main-title {
  border: 2px solid black;
  padding: 1rem;
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.question-header {
  background-color: #a5d8eb;
  border-radius: 9999px;
  padding: 0.375rem 1rem;
  display: inline-block;
  width: fit-content;
  font-weight: 700;
  font-size: 1rem;
}

.answer-badge-wrapper {
  display: flex;
  align-items: center;
  background-color: #f0fdf4;
  border-left: 6px solid #22c55e;
  padding: 0.5rem 1rem;
  width: fit-content;
  border-radius: 0.25rem;
  gap: 0.5rem;
}

.answer-badge-label {
  font-style: italic;
  font-weight: 900;
  color: #16a34a;
  font-size: 1.25rem;
}

.answer-badge-text {
  font-weight: 700;
  font-size: 1.125rem;
}

.content-box-gray {
  background-color: #f2f2f2;
  padding: 1rem;
  border-radius: 0.5rem;
  line-height: 1.625;
  font-size: 15px;
}

.highlight-blue {
  color: #2563eb;
  font-weight: 700;
}

.content-title-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.125rem;
}

.content-box-blue {
  background-color: #eef9fc;
  border-left: 4px solid #a5d8eb;
  padding: 1rem;
  border-radius: 0.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  font-style: italic;
  overflow-x: auto;
}

.quote-text {
  font-style: italic;
  line-height: 1.8;
  color: var(--color-gray-800);
}

.quote-source {
  font-size: 0.875rem;
  color: var(--color-gray-500);
}

.explanation-text {
  line-height: 1.8;
  color: var(--color-gray-800);
  margin: 0.25rem 0;
  font-size: 15px;
  padding-left: 0.5rem;
}

.answer-red-underline {
  color: #dc2626;
  font-size: 1.25rem;
  font-weight: 700;
  border-bottom: 2px solid #dc2626;
  padding-bottom: 0.125rem;
  width: fit-content;
  margin: 0.5rem 0;
}

.text-green-600 {
  color: #16a34a;
}

.question-subheader-blue {
  background-color: #e0f2fe;
  padding: 0.75rem 1rem;
  font-weight: bold;
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.text-link {
  color: #2563eb;
  text-decoration: underline;
}

.content-title-orange {
  background-color: #fff7ed;
  padding: 0.5rem 1rem;
  font-weight: bold;
  font-size: 1.125rem;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.journal-table {
  width: 100%;
  max-width: 800px;
  border-collapse: collapse;
  margin: 1rem 0;
  font-family: var(--font-mono);
}

.journal-table td {
  border: 1px solid var(--color-gray-200);
  padding: 0.5rem 1rem;
  white-space: nowrap;
}

.journal-label {
  width: 25%;
  text-align: left;
  color: var(--color-gray-800);
}

.journal-value {
  width: 25%;
  text-align: right;
  color: var(--color-gray-900);
}

.explanation-box-green {
  background-color: #f0fdf4;
  border-left: 4px solid var(--color-green);
  padding: 1rem;
  margin-top: 1rem;
  line-height: 1.8;
  color: var(--color-gray-800);
}

.underline-black {
  text-decoration: underline;
}

.accounting-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin: 1rem 0;
}

@media (min-width: 768px) {
  .accounting-cards-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.accounting-card {
  background-color: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  padding: 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.text-red-600 {
  color: #dc2626;
}

.font-bold {
  font-weight: 700;
}

.item-badge {
  background-color: #fce7f3;
  color: #be185d;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: bold;
  margin-left: 0.5rem;
  vertical-align: middle;
}

.content-sub-header {
  font-weight: bold;
  font-size: 1.125rem;
  border-bottom: 1px solid var(--color-gray-200);
  padding-bottom: 0.25rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.answer-summary-red {
  color: #dc2626;
  font-size: 1.5rem;
  font-weight: 900;
  border-bottom: 3px solid #dc2626;
  padding-bottom: 0.25rem;
  width: fit-content;
  margin: 2rem 0;
}

.analysis-item-header {
  display: flex;
  align-items: center;
  background-color: #f0fdf4;
  border-left: 6px solid #16a34a;
  padding: 0.5rem 1rem;
  margin: 1.5rem 0 1rem;
  gap: 0.75rem;
  border-radius: 0.25rem;
}

.analysis-item-label {
  font-style: italic;
  font-weight: 900;
  color: #16a34a;
  font-size: 1.25rem;
}

.analysis-item-title {
  font-weight: bold;
  font-size: 1.125rem;
  color: var(--color-gray-900);
}

.formula-box {
  background-color: #eff6ff;
  padding: 1rem;
  border-radius: 0.5rem;
  margin: 1rem 0;
  font-style: italic;
  color: var(--color-gray-800);
}

.answer-red-bold-underline {
  color: #dc2626;
  font-size: 1.25rem;
  font-weight: 700;
  border-bottom: 2px solid #dc2626;
  padding-bottom: 0.125rem;
  width: fit-content;
  margin: 1rem 0;
}

.card-label {
  font-size: 0.65rem;
  color: #6b7280;
  text-transform: uppercase;
  font-weight: 600;
}

.card-title {
  font-weight: bold;
  color: #111827;
}


.glossary-intro {
  margin-top: 2rem;
}

.toc-box {
  margin-top: 1rem;
}

.toc-list {
  columns: 2; column-gap: 2rem; padding-left: 1.25rem;
}

.toc-list li {
  break-inside: avoid; margin: 0.25rem 0;
}

.toc-list .level-2 {
  margin-left: 1rem;
}

.toc-list .level-3 {
  margin-left: 2rem;
  font-size: 0.92em;
}

.glossary-section {
  scroll-margin-top: 110px;
}

.glossary-term {
  margin-top: 1.25rem;
}

.glossary-definition {
  margin-top: 0.5rem;
}

.glossary-point {
  margin-top: 0.5rem;
}

.glossary-list {
  display: block;
  padding-left: 2rem;
  list-style-position: outside;
}

.glossary-list li {
  margin: 0.35rem 0;
}

.code-block pre {
  overflow-x: auto;
  margin: 0;
  white-space: pre;
}

.code-block code {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
}

.table-container {
  overflow-x: auto;
  margin: 1rem 0;
}

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

.table-container th, .table-container td {
  border: 1px solid var(--color-gray-300);
  padding: 0.5rem 0.75rem;
  vertical-align: top;
}

.table-container th {
  background: var(--color-gray-100);
}

@media (max-width: 768px) {
  .toc-list { columns: 1; }
  .toc-list .level-2, .toc-list .level-3 { margin-left: 0.75rem; }
}


/* Source consolidated from Financial-statement-analysis16.css */

/* Base Styles & Resets */
:root {
  --font-sans: "Inter", "Noto Sans JP", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  --color-gray-900: #111827;
  --color-gray-800: #1f2937;
  --color-gray-700: #374151;
  --color-gray-600: #4b5563;
  --color-gray-500: #6b7280;
  --color-gray-400: #9ca3af;
  --color-gray-300: #d1d5db;
  --color-gray-200: #e5e7eb;
  --color-gray-100: #f3f4f6;
  --color-gray-50: #f9fafb;
  --color-slate-50: #f8fafc;
  --color-blue-600: #2563eb;
  --color-red-600: #dc2626;
  --color-accent: #a5d8eb;
  --color-accent-dark: #4a90a4;
  --color-accent-hover: #3d7687;
  
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  font-feature-settings: normal;
  font-variation-settings: normal;
}

body {
  background-color: white;
  color: var(--color-gray-900);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.site-body {
  min-height: 100vh;
}

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

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  color: inherit;
}

a {
  text-decoration: none;
  color: inherit;
}

::selection {
  background-color: #dbeafe; /* blue-100 */
}

/* Layout */
.app-container {
  margin-top: 10vh;
  min-height: 100vh;
  background-color: #ffffff;
}

.content-wrapper {
  max-width: 1280px; /* Increased from 1152px */
  margin: 0 auto;
  padding: 2rem 1rem; /* Reduced for mobile */
}

@media (min-width: 768px) {
  .content-wrapper {
    padding: 3rem 1.5rem;
  }
}

.main-header {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem; /* gap-8 */
  margin-bottom: 3rem; /* mb-12 */
  border-bottom: 1px solid #e5e7eb; /* border-gray-200 */
  padding-bottom: 2rem; /* pb-8 */
}

@media (min-width: 768px) {
  .main-header {
    flex-direction: row;
  }
}

.header-content {
  flex: 1;
}

.header-title {
  font-size: 1.875rem; /* text-3xl for mobile */
  font-weight: 700; /* font-bold */
  letter-spacing: -0.025em; /* tracking-tight */
  margin-bottom: 1rem; /* mb-4 */
  display: flex;
  flex-wrap: wrap; /* Allow wrapping on small screens */
  align-items: baseline;
  gap: 0.5rem; /* gap-2 */
}

@media (min-width: 768px) {
  .header-title {
    font-size: 3rem; /* text-5xl */
    margin-bottom: 1.5rem; /* mb-6 */
    gap: 1rem; /* gap-4 */
  }
}

.header-meta {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.25rem; /* space-y-1 */
  font-size: 0.875rem; /* text-sm */
  color: #4b5563; /* text-gray-600 */
}

.header-meta a {
  color: #2563eb; /* text-blue-600 */
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.25rem;
  word-break: break-all; /* Prevent long URLs from overflowing */
}

.header-meta a:hover {
  text-decoration: underline;
}

.sidebar {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.75rem; /* space-y-3 */
}

@media (min-width: 768px) {
  .sidebar {
    width: 16rem; /* w-64 */
  }
}

.sidebar-button {
  width: 100%;
  padding: 0.75rem 1rem; /* py-3 px-4 */
  background-color: #f0f0f0;
  border: 2px solid #000000;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.2s;
}

.sidebar-button:hover {
  background-color: #e5e7eb;
}

/* Main Content Area */
.main-content {
  max-width: 1024px;
  width: 100%;
}

/* Instruction Section */
.instruction-section {
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-size: 14px;
  color: var(--color-gray-600);
  line-height: 1.7;
}

.table-container {
  overflow-x: auto;
  margin-top: 8px;
  border-radius: 8px;
  border: 1px solid var(--color-gray-200);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: center;
  background-color: white;
}

.table-header-row {
  background-color: var(--color-slate-50);
}

.table-cell {
  border: 1px solid var(--color-gray-200);
  padding: 10px 16px;
}

.table-cell-left {
  text-align: left;
}

.table-cell-header {
  font-weight: 700;
  color: var(--color-gray-700);
  background-color: var(--color-slate-50);
}

.table-cell-label {
  background-color: var(--color-gray-50);
  width: 140px;
  font-weight: 500;
  color: var(--color-gray-700);
}

.instruction-note {
  margin-top: 8px;
  color: var(--color-gray-500);
  font-size: 13px;
}

/* Question Section */
.question-section {
  margin-top: 48px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.question-title-container {
  border: 2px solid var(--color-gray-900);
  padding: 20px;
  width: 100%;
  background-color: white;
}

.question-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-gray-900);
}

.question-disclaimer {
  font-size: 13px;
  line-height: 1.6;
  color: var(--color-gray-500);
  background-color: var(--color-gray-50);
  padding: 12px;
  border-radius: 4px;
  border-left: 4px solid var(--color-gray-300);
}

.subsection {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.subsection-mt-large {
  margin-top: 64px;
}

.question-header {
  border-radius: 9999px;
  padding: 6px 20px;
  display: inline-block;
  width: fit-content;
  background-color: var(--color-accent);
  color: var(--color-gray-800);
  font-weight: 700;
  font-size: 16px;
  box-shadow: var(--shadow-sm);
}

.question-box {
  background-color: #f8f8f8;
  border-radius: 8px;
  padding: 20px;
  font-size: 16px;
  line-height: 1.7;
  border: 1px solid var(--color-gray-100);
}

.formula-box {
  border-radius: 8px;
  padding: 20px;
  font-style: italic;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-x: auto;
  background-color: #f0f9ff;
  border-left: 4px solid var(--color-accent-dark);
}

.formula-title {
  font-weight: 700;
  font-style: normal;
  font-size: 14px;
  color: var(--color-accent-dark);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.formula-text {
  font-size: 16px;
  color: var(--color-gray-800);
}

.explanation-text {
  padding-left: 4px;
  font-size: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  line-height: 1.7;
  color: var(--color-gray-700);
}

.bold {
  font-weight: 700;
}

.underline {
  text-decoration: underline;
}

.underline-accent {
  text-decoration: underline;
  text-decoration-color: var(--color-accent);
  text-decoration-thickness: 3px;
  text-underline-offset: 4px;
}

.step-box {
  padding: 16px;
  border-radius: 8px;
  font-size: 15px;
  margin-top: 12px;
  background-color: var(--color-slate-50);
  border: 1px solid var(--color-gray-200);
}

.step-title {
  font-weight: 700;
  color: var(--color-accent-dark);
  border-bottom: 2px solid var(--color-accent);
  padding-bottom: 6px;
  margin-bottom: 12px;
  display: inline-block;
}

.final-answer-container {
  padding-top: 12px;
}

.final-answer {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-red-600);
  border-bottom: 3px solid var(--color-red-600);
  display: inline-block;
  padding-bottom: 4px;
}

.closing-section {
  padding-top: 64px;
  padding-bottom: 48px;
  text-align: center;
}

.closing-text {
  font-size: 20px;
  font-weight: 500;
  color: var(--color-gray-400);
  font-style: italic;
}

/* Footer */
.site-footer {
  margin-top: 96px;
  padding: 48px 0;
  border-top: 1px solid var(--color-gray-100);
  text-align: center;
  color: var(--color-gray-400);
  font-size: 13px;
  background-color: var(--color-gray-50);
}

.footer-content {
  max-width: 1024px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

.footer-text {
  opacity: 0.8;
}

/* Lucide Icon Fixes */
svg {
  display: inline-block;
  vertical-align: middle;
}

/* Source consolidated from business-calculation-149.css */

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #ffffff;
  color: #333333;
  line-height: 1.5;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
}

::selection {
  background-color: #dbeafe; /* blue-100 */
}

/* Layout */
.app-container {
  margin-top: 10vh;
  min-height: 100vh;
  background-color: #ffffff;
}

.content-wrapper {
  max-width: 1400px; /* Increased from 1152px */
  margin: 0 auto;
  padding: 2rem 1rem; /* Reduced for mobile */
}

@media (min-width: 768px) {
  .content-wrapper {
    padding: 3rem 1.5rem;
  }
}

.main-header {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem; /* gap-8 */
  margin-bottom: 3rem; /* mb-12 */
  border-bottom: 1px solid #e5e7eb; /* border-gray-200 */
  padding-bottom: 2rem; /* pb-8 */
}

@media (min-width: 768px) {
  .main-header {
    flex-direction: row;
  }
}

.header-content {
  flex: 1;
}

.header-title {
  font-size: 1.875rem; /* text-3xl for mobile */
  font-weight: 700; /* font-bold */
  letter-spacing: -0.025em; /* tracking-tight */
  margin-bottom: 1rem; /* mb-4 */
  display: flex;
  flex-wrap: wrap; /* Allow wrapping on small screens */
  align-items: baseline;
  gap: 0.5rem; /* gap-2 */
}

@media (min-width: 768px) {
  .header-title {
    font-size: 3rem; /* text-5xl */
    margin-bottom: 1.5rem; /* mb-6 */
    gap: 1rem; /* gap-4 */
  }
}

.header-meta {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.25rem; /* space-y-1 */
  font-size: 0.875rem; /* text-sm */
  color: #4b5563; /* text-gray-600 */
}

.header-meta a {
  color: #2563eb; /* text-blue-600 */
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.25rem;
  word-break: break-all; /* Prevent long URLs from overflowing */
}

.header-meta a:hover {
  text-decoration: underline;
}

.sidebar {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.75rem; /* space-y-3 */
}

@media (min-width: 768px) {
  .sidebar {
    width: 16rem; /* w-64 */
  }
}

.sidebar-button {
  width: 100%;
  padding: 0.75rem 1rem; /* py-3 px-4 */
  background-color: #f0f0f0;
  border: 2px solid #000000;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.2s;
}

.sidebar-button:hover {
  background-color: #e5e7eb;
}

.main-content {
}

/* Question Styles */
.question-section {
  margin-top: 3rem; /* mt-12 */
  display: flex;
  flex-direction: column;
  gap: 1rem; /* space-y-4 */
}

.question-main-title {
  border: 2px solid black;
  padding: 1rem;
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.question-header {
  background-color: #a5d8eb;
  border-radius: 9999px;
  padding: 0.375rem 1rem; /* py-1.5 px-4 */
  display: inline-block;
  width: fit-content;
}

.question-header span {
  font-weight: 700;
  font-size: 1rem;
}

.question-box {
  background-color: #f2f2f2;
  border-radius: 0.5rem; /* rounded-lg */
  padding: 1rem;
  font-size: 15px;
  line-height: 1.625; /* leading-relaxed */
}

.formula-box {
  background-color: #eef9fc;
  border-left: 4px solid #a5d8eb;
  padding: 1rem;
  font-style: italic;
  display: flex;
  flex-direction: column;
  gap: 0.375rem; /* space-y-1.5 */
  overflow-x: auto; /* Handle long formulas */
}

.formula-box p.title {
  font-weight: 500;
  font-style: normal;
  font-size: 0.875rem;
}

.formula-box p.formula {
  font-size: 1rem;
}

.explanation-text {
  padding-left: 0.5rem; /* pl-2 */
  font-size: 15px;
  display: flex;
  flex-direction: column;
  gap: 0.625rem; /* space-y-2.5 */
  line-height: 1.625;
}

.mono {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.875rem;
}

.final-answer-container {
  padding-top: 0.5rem; /* pt-2 */
}

.final-answer {
  font-size: 1.25rem; /* text-xl */
  font-weight: 700;
  color: #dc2626; /* text-red-600 */
  border-bottom: 2px solid #dc2626;
  display: inline-block;
  padding-bottom: 0.125rem; /* pb-0.5 */
}

/* Table Styles */
.table-container {
  overflow-x: auto;
  margin-top: 1rem; /* mt-4 */
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #d1d5db; /* border-gray-300 */
  font-size: 0.75rem; /* text-xs */
  text-align: center;
  background-color: #ffffff;
}

.data-table th {
  border: 1px solid #d1d5db;
  padding: 0.25rem 0.5rem; /* py-1 px-2 */
  background-color: #f9fafb; /* bg-gray-50 */
  font-weight: 700;
}

.data-table td {
  border: 1px solid #d1d5db;
  padding: 0.25rem 0.5rem;
}

.data-table .text-right {
  text-align: right;
}

.data-table .highlight-row {
  background-color: #fff9f9;
}

.data-table .subtext {
  font-size: 10px;
  opacity: 0.5;
}

/* Step Styles */
.step-title {
  font-weight: 700;
  color: #4a90a4;
  border-bottom: 1px solid #a5d8eb;
  padding-bottom: 0.25rem; /* pb-1 */
  margin-bottom: 0.5rem;
}

.step-box {
  background-color: #fdf5e6;
  padding: 0.5rem;
  border-radius: 0.25rem;
  margin-bottom: 1rem;
}

/* Sections */
.instruction-section {
  margin-bottom: 2rem; /* mb-8 */
  display: flex;
  flex-direction: column;
  gap: 0.5rem; /* space-y-2 */
  font-size: 14px;
  line-height: 1.625;
  color: #4b5563;
}

.closing-section {
  padding-top: 3rem; /* pt-12 */
  padding-bottom: 2rem; /* pb-8 */
  text-align: center;
}

.closing-text {
  font-size: 1.125rem; /* text-lg */
  font-weight: 500;
  color: #4b5563;
  font-style: italic;
}

.footer {
  margin-top: 6rem; /* mt-24 */
  padding-top: 2rem; /* pt-8 */
  border-top: 1px solid #f3f4f6; /* border-gray-100 */
  text-align: center;
  color: #9ca3af; /* text-gray-400 */
  font-size: 0.75rem; /* text-xs */
}

/* Reveal Animations */
.reveal {
  opacity: 0;
  transform: translateX(-20px);
  transition: all 0.8s ease-out;
}

.reveal.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-delay {
  opacity: 0;
  transform: scale(0.9);
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.reveal-delay.active {
  opacity: 1;
  transform: scale(1);
}

.video-aside {
  position: sticky;
  top: 90px;
  margin-left: 30px;
  align-self: start;
  height: fit-content;
}
.video-aside-sp {
  display: none;
}

@media (max-width: 768px) {
  .video-aside {
    display: none;
  }
  .video-aside-sp {
    display: block;
    position: sticky;
    top: 80px;
    z-index: 100;
    background-color: #fff;
    width: 100%;
    align-self: start;
    justify-content: center;

  }
}


.video-sec {
  display: flex;
  justify-content: center;
  justify-content: vertical;
  align-items: center;
  width: 100%;
}

.page {
  display: grid;
  grid-template-columns: 70% 1fr;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .page{
    display: flex;
    flex-direction: column;
  }
}

.video-box {
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  width: 100%;
}

@media (max-width: 768px) {
  .video-box {
    margin-bottom: 30px;
    width: auto;
    height: 20vh;
  }
}


/* Utilities */
.bold { font-weight: 700; }
.italic { font-style: italic; }
.underline-accent { text-decoration: underline; text-decoration-color: #a5d8eb; text-decoration-thickness: 2px; text-underline-offset: 2px; }


/* Source consolidated from information processing.css */

:root {
  --color-green: #4ade80;
  --color-purple: #a78bfa;
  --color-orange: #fb923c;
  --color-gray-50: #f9fafb;
  --color-gray-100: #f3f4f6;
  --color-gray-200: #e5e7eb;
  --color-gray-300: #d1d5db;
  --color-gray-400: #9ca3af;
  --color-gray-600: #4b5563;
  --color-gray-800: #1f2937;
  --color-gray-900: #111827;
  --color-blue-600: #2563eb;
  --color-red-600: #dc2626;
  --color-sky-100: #e0f2fe;
  --color-sky-200: #bae6fd;
  --color-sky-500: #0ea5e9;
  --color-emerald-400: #34d399;
  --color-indigo-600: #4f46e5;
  --color-yellow-50: #fefce8;
  --color-yellow-100: #fef9c3;

  --font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}


html {
  -webkit-text-size-adjust: 100%;
  font-feature-settings: normal;
  font-variation-settings: normal;
}

body {
  background-color: white;
  color: var(--color-gray-900);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.site-body {
  min-height: 100vh;
}

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

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  color: inherit;
}

a {
  text-decoration: none;
  color: inherit;
}

::selection {
  background-color: #dbeafe; /* blue-100 */
}

/* Layout */
.app-container {
  margin-top: 10vh;
  min-height: 100vh;
  background-color: #ffffff;
}

.content-wrapper {
  max-width: 1280px; /* Increased from 1152px */
  margin: 0 auto;
  padding: 2rem 1rem; /* Reduced for mobile */
}

@media (min-width: 768px) {
  .content-wrapper {
    padding: 3rem 1.5rem;
  }
}

.main-header {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem; /* gap-8 */
  margin-bottom: 3rem; /* mb-12 */
  border-bottom: 1px solid #e5e7eb; /* border-gray-200 */
  padding-bottom: 2rem; /* pb-8 */
}

@media (min-width: 768px) {
  .main-header {
    flex-direction: row;
  }
}

.header-content {
  flex: 1;
}

.header-title {
  font-size: 1.875rem; /* text-3xl for mobile */
  font-weight: 700; /* font-bold */
  letter-spacing: -0.025em; /* tracking-tight */
  margin-bottom: 1rem; /* mb-4 */
  display: flex;
  flex-wrap: wrap; /* Allow wrapping on small screens */
  align-items: baseline;
  gap: 0.5rem; /* gap-2 */
}

@media (min-width: 768px) {
  .header-title {
    font-size: 3rem; /* text-5xl */
    margin-bottom: 1.5rem; /* mb-6 */
    gap: 1rem; /* gap-4 */
  }
}

.header-meta {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.25rem; /* space-y-1 */
  font-size: 0.875rem; /* text-sm */
  color: #4b5563; /* text-gray-600 */
}

.header-meta a {
  color: #2563eb; /* text-blue-600 */
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.25rem;
  word-break: break-all; /* Prevent long URLs from overflowing */
}

.header-meta a:hover {
  text-decoration: underline;
}

.sidebar {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.75rem; /* space-y-3 */
}

@media (min-width: 768px) {
  .sidebar {
    width: 16rem; /* w-64 */
  }
}

.sidebar-button {
  width: 100%;
  padding: 0.75rem 1rem; /* py-3 px-4 */
  background-color: #f0f0f0;
  border: 2px solid #000000;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.2s;
}

.sidebar-button:hover {
  background-color: #e5e7eb;
}

/* Main Content Area */
.main-content {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.section-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.question-main-title {
  border: 2px solid black;
  padding: 1rem;
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: white;
}

.question-header {
  background-color: #a5d8eb;
  border-radius: 9999px;
  padding: 0.375rem 1.25rem;
  display: inline-block;
  width: fit-content;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.subsection-title-blue {
  background-color: var(--color-sky-100);
  padding: 0.75rem 1rem;
  font-weight: bold;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.subsection-badge {
  display: flex;
  align-items: center;
  background-color: #f0fdf4;
  border-left: 6px solid #22c55e;
  padding: 0.5rem 1rem;
  width: fit-content;
  border-radius: 0.25rem;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.subsection-badge-label {
  font-style: italic;
  font-weight: 900;
  color: #16a34a;
  font-size: 1.25rem;
}

.subsection-badge-text {
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--color-gray-900);
}

.subsection-header-small {
  font-weight: 700;
  color: var(--color-gray-600);
  margin-bottom: 1rem;
  font-size: 1rem;
}

.content-box-gray {
  background-color: #f2f2f2;
  padding: 1.5rem;
  border-radius: 0.5rem;
  line-height: 1.7;
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.question-number-pill {
  display: block;
  background-color: var(--color-yellow-50);
  padding: 0.5rem 1rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-gray-700);
  border-top: 1px solid var(--color-yellow-100);
  border-bottom: 1px solid var(--color-yellow-100);
  width: 100%;
  margin-bottom: 1rem;
}

.options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-top: 1rem;
}

@media (min-width: 768px) {
  .options-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.options-grid span {
  background: white;
  padding: 0.5rem;
  border-radius: 0.25rem;
  text-align: center;
  font-size: 0.875rem;
  border: 1px solid var(--color-gray-200);
}

.explanation-box-green {
  border-radius: 0.5rem;
  margin-top: 1rem;
  padding: 1.25rem;
  line-height: 1.8;
  color: var(--color-gray-800);
  font-size: 0.9375rem;
}

.question-text-box {
  background-color: var(--color-gray-100);
  padding: 1rem 1.25rem;
  border-radius: 0.375rem;
  margin-top: 1.5rem;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--color-gray-900);
}

.answer-red-underline {
  color: var(--color-red-600);
  font-size: 1.25rem;
  font-weight: 700;
  border-bottom: 2px solid var(--color-red-600);
  padding-bottom: 0.125rem;
  width: fit-content;
  margin-top: 1rem;
}

.footer {
  margin-top: 5rem;
  border-top: 1px solid var(--color-gray-200);
  background-color: var(--color-gray-50);
  padding: 3rem 0;
  text-align: center;
  font-size: 0.875rem;
  color: var(--color-gray-500);
}

/* Reveal Animation */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Source consolidated from programming-1-72.css */

/* Base Styles & Resets */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --color-primary: #a5d8eb;
    --color-primary-dark: #4a90a4;
    --color-primary-hover: #3d7687;
    --color-bg-page: #ffffff;
    --color-bg-light: #f9fafb;
    --color-bg-muted: #f3f4f6;
    --color-bg-dark: #f2f2f2;
    --color-bg-accent: #FFF9E6;
    --color-border: #e5e7eb;
    --color-border-dark: #d1d5db;
    --color-text-main: #111827;
    --color-text-muted: #4b5563;
    --color-text-light: #9ca3af;
    --color-text-header: #1f2937;
    --color-error: #dc2626;
    --color-link: #2563eb;
    
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;
    
    --header-height: 10vh;
    --container-max-width: 80rem;
    --content-max-width: 56rem;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}


html {
  -webkit-text-size-adjust: 100%;
  font-feature-settings: normal;
  font-variation-settings: normal;
}

body {
  background-color: white;
  color: var(--color-gray-900);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.site-body {
  min-height: 100vh;
}

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

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  color: inherit;
}

a {
  text-decoration: none;
  color: inherit;
}

::selection {
  background-color: #dbeafe; /* blue-100 */
}

/* Layout */
.app-container {
  margin-top: 10vh;
  min-height: 100vh;
  background-color: #ffffff;
}

.content-wrapper {
  max-width: 1280px; /* Increased from 1152px */
  margin: 0 auto;
  padding: 2rem 1rem; /* Reduced for mobile */
}

@media (min-width: 768px) {
  .content-wrapper {
    padding: 3rem 1.5rem;
  }
}

.main-header {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem; /* gap-8 */
  margin-bottom: 3rem; /* mb-12 */
  border-bottom: 1px solid #e5e7eb; /* border-gray-200 */
  padding-bottom: 2rem; /* pb-8 */
}

@media (min-width: 768px) {
  .main-header {
    flex-direction: row;
  }
}

.header-content {
  flex: 1;
}

.header-title {
  font-size: 1.875rem; /* text-3xl for mobile */
  font-weight: 700; /* font-bold */
  letter-spacing: -0.025em; /* tracking-tight */
  margin-bottom: 1rem; /* mb-4 */
  display: flex;
  flex-wrap: wrap; /* Allow wrapping on small screens */
  align-items: baseline;
  gap: 0.5rem; /* gap-2 */
}

@media (min-width: 768px) {
  .header-title {
    font-size: 3rem; /* text-5xl */
    margin-bottom: 1.5rem; /* mb-6 */
    gap: 1rem; /* gap-4 */
  }
}

.header-meta {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.25rem; /* space-y-1 */
  font-size: 0.875rem; /* text-sm */
  color: #4b5563; /* text-gray-600 */
}

.header-meta a {
  color: #2563eb; /* text-blue-600 */
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.25rem;
  word-break: break-all; /* Prevent long URLs from overflowing */
}

.header-meta a:hover {
  text-decoration: underline;
}

.sidebar {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.75rem; /* space-y-3 */
}

@media (min-width: 768px) {
  .sidebar {
    width: 16rem; /* w-64 */
  }
}

.sidebar-button {
  width: 100%;
  padding: 0.75rem 1rem; /* py-3 px-4 */
  background-color: #f0f0f0;
  border: 2px solid #000000;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.2s;
}

.sidebar-button:hover {
  background-color: #e5e7eb;
}

/* Main Content Area */
.main-content {
    max-width: var(--content-max-width);
}

.section-container {
    margin-top: var(--spacing-2xl);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
}

.section-title-box {
    border: 2px solid var(--color-text-main);
    padding: var(--spacing-md);
    background-color: var(--color-bg-page);
    width: 100%;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text-main);
    letter-spacing: 0.05em;
}

.question-item {
    margin-top: var(--spacing-2xl);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.question-item:first-child {
    margin-top: var(--spacing-md);
}

.question-number {
    background-color: var(--color-primary);
    border-radius: 9999px;
    padding: 0.25rem 1rem;
    width: fit-content;
    color: var(--color-text-header);
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
}

.question-box {
    background-color: var(--color-bg-dark);
    border-radius: 0.5rem;
    padding: var(--spacing-lg);
    font-size: 1rem;
    line-height: 1.625;
    color: var(--color-text-header);
}

.commentary-box {
    padding-left: var(--spacing-xs);
    font-size: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    line-height: 1.625;
    color: var(--color-text-muted);
}

.answer-wrapper {
    padding-top: var(--spacing-sm);
}

.answer-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-error);
    border-bottom: 2px solid var(--color-error);
    display: inline-block;
    padding-bottom: 0.125rem;
}

/* Table Styles */
.overflow-x-auto {
    overflow-x: auto;
}

.info-table {
    width: 100%;
    max-width: 28rem;
    border-collapse: collapse;
    font-size: 0.875rem;
    border: 1px solid var(--color-border-dark);
}

.table-header-cell {
    border: 1px solid var(--color-border-dark);
    padding: var(--spacing-sm);
    background-color: var(--color-bg-light);
    font-weight: 700;
    width: 8rem;
    text-align: center;
}

.table-data-cell {
    border: 1px solid var(--color-border-dark);
    padding: var(--spacing-sm);
    text-align: center;
}

/* Other Terms Section */
.other-terms-section {
    margin-top: 5rem;
}

.other-terms-header {
    background-color: var(--color-bg-accent);
    padding: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
}

.other-terms-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text-header);
}

.other-terms-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
    color: var(--color-text-muted);
    line-height: 1.625;
}

.term-item .term-name {
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
}

/* Footer */
.site-footer {
    margin-top: 6rem;
    padding: var(--spacing-2xl) 0;
    border-top: 1px solid var(--color-bg-muted);
    text-align: center;
    color: var(--color-text-light);
    font-size: 13px;
    background-color: var(--color-bg-light);
}

.footer-container {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.footer-copy {
    opacity: 0.8;
}

.final-section {
    padding-top: var(--spacing-3xl);
    padding-bottom: var(--spacing-2xl);
    text-align: center;
}

.final-text {
    font-weight: 500;
    font-style: italic;
    color: var(--color-text-light);
    font-size: 1.25rem;
}

/* Utility Classes */
.hidden {
    display: none;
}

.underline-accent {
    text-decoration: underline;
    text-decoration-color: var(--color-primary);
    text-decoration-thickness: 3px;
    text-underline-offset: 4px;
}

/* 第152回 ビジネス計算実務検定 1級ビジネス計算部門 */
/* 旧 business-calculation-152.css：このページ専用の .exam-* スタイル */

:root {
  --exam-ink: #20242a;
  --exam-muted: #667085;
  --exam-line: #d8dee8;
  --exam-soft: #f6f8fb;
  --exam-accent: #235a9f;
  --exam-accent-dark: #184579;
  --exam-accent-soft: #eaf2fc;
  --exam-answer: #0d6b45;
  --exam-answer-soft: #eaf7f1;
  --exam-warn: #8a5b00;
  --exam-warn-soft: #fff7df;
}

html {
  scroll-behavior: smooth;
}

.exam-learning-page {
  margin: 0;
  color: var(--exam-ink);
  background: #fff;
  font-family: "BIZ UDPGothic", "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.exam-learning-page *,
.exam-learning-page *::before,
.exam-learning-page *::after {
  box-sizing: border-box;
}

/*
 * サイト共通ヘッダー（.header / .header__res）は既存の header.css に任せる。
 * このCSSでは、試験解説ページ本体だけを .exam- で始まるクラスに限定して装飾する。
 */
.exam-hero {
  border-bottom: 1px solid var(--exam-line);
  background: linear-gradient(135deg, #f8fbff 0%, #eef5ff 100%);
  align-items: center;
  padding-left: 20px;
}

.exam-hero .hero,
.exam-main,
.exam-footer .footer-content {
  width: min(1040px, calc(100% - 32px));
  margin-right: auto;
  margin-left: auto;
}

.exam-hero .hero {
  padding-top: 30px;
}

.exam-hero .eyebrow {
  margin: 0 0 8px;
  color: var(--exam-accent);
  font-size: .9rem;
  font-weight: 700;
  letter-spacing: .08em;
}

.exam-hero h1 {
  margin: 0;
  color: var(--exam-ink);
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.35;
}

.exam-hero .lead {
  max-width: 820px;
  margin: 18px 0 0;
  color: var(--exam-muted);
}

.exam-main {
  padding: 40px 0 76px;
}

.exam-main a,
.exam-footer a {
  color: var(--exam-accent);
}

.exam-main > h2,
.exam-main .legend-section > h2,
.exam-main .official-viewer > h2,
.exam-main .instruction-section > h2 {
  margin: 48px 0 20px;
  padding-bottom: 8px;
  border-bottom: 3px solid var(--exam-accent);
  color: var(--exam-ink);
  font-size: clamp(1.35rem, 3vw, 1.65rem);
  line-height: 1.45;
}

.exam-main h3 {
  margin: 0;
  font-size: clamp(1.15rem, 2.4vw, 1.35rem);
  line-height: 1.5;
}

.exam-main h4 {
  margin: 22px 0 5px;
  font-size: 1.04rem;
}

.exam-main p {
  margin-top: .55rem;
  margin-bottom: .55rem;
}

.exam-main .instruction-section,
.exam-main .source-box,
.exam-main .legend-section,
.exam-main .official-viewer {
  margin-bottom: 28px;
  padding: 20px 22px;
  border: 1px solid var(--exam-line);
  border-radius: 10px;
  background: #fff;
}

.exam-main .instruction-section {
  border-left: 5px solid var(--exam-warn);
  background: var(--exam-warn-soft);
}

.exam-main .instruction-section > h2,
.exam-main .legend-section > h2,
.exam-main .official-viewer > h2 {
  margin-top: 0;
}

.exam-main .source-box {
  background: var(--exam-soft);
}

.exam-main .source-note,
.exam-main .legend-intro,
.exam-main .note {
  color: var(--exam-muted);
  font-size: .94rem;
}

.exam-main .legend-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.exam-main .legend-card {
  min-height: 132px;
  padding: 15px;
  border: 1px solid #c8d9ee;
  border-radius: 8px;
  background: #fbfdff;
}

.exam-main .legend-card strong {
  color: var(--exam-accent-dark);
}

.exam-main .legend-card p {
  font-size: .9rem;
  line-height: 1.65;
}

.exam-main .official-pdf-frame {
  display: block;
  width: 100%;
  height: min(76vh, 820px);
  min-height: 480px;
  margin-top: 14px;
  border: 1px solid var(--exam-line);
  border-radius: 8px;
  background: #f3f4f6;
}

.exam-main .viewer-fallback {
  text-align: right;
}

.exam-main .question-nav {
  display: grid;
  grid-template-columns: repeat(10, minmax(44px, 1fr));
  gap: 8px;
  margin: 18px 0 0;
}

.exam-main .question-nav a {
  display: block;
  padding: 8px 4px;
  border: 1px solid var(--exam-line);
  border-radius: 6px;
  background: #fff;
  text-align: center;
  text-decoration: none;
  font-weight: 700;
  transition: background-color .18s ease, border-color .18s ease;
}

.exam-main .question-nav a:hover,
.exam-main .question-nav a:focus-visible {
  border-color: #a9c4e5;
  background: var(--exam-accent-soft);
}

.exam-main .table-scroll {
  width: 100%;
  margin: 16px 0;
  overflow-x: auto;
  border-radius: 8px;
  -webkit-overflow-scrolling: touch;
}

.exam-main .summary-table,
.exam-main .calc-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  background: #fff;
}

.exam-main .summary-table th,
.exam-main .summary-table td,
.exam-main .calc-table th,
.exam-main .calc-table td {
  padding: 10px 12px;
  border: 1px solid var(--exam-line);
  vertical-align: middle;
}

.exam-main .summary-table th,
.exam-main .calc-table th {
  background: var(--exam-soft);
}

.exam-main .summary-table td:first-child {
  width: 68px;
  text-align: center;
  font-weight: 700;
}

.exam-main .summary-table td:last-child {
  color: var(--exam-answer);
  font-weight: 700;
}

.exam-main .problem {
  scroll-margin-top: 118px;
  margin: 28px 0;
  padding: 24px;
  border: 1px solid var(--exam-line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(24, 42, 71, .05);
}

.exam-main .problem-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.exam-main .number {
  display: inline-grid;
  place-items: center;
  flex: 0 0 44px;
  height: 44px;
  border-radius: 50%;
  color: #fff;
  background: var(--exam-accent);
  font-weight: 800;
}

.exam-main .problem-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  margin: 0 0 16px 56px;
  font-size: .88rem;
}

.exam-main .problem-meta a {
  font-weight: 700;
}

.exam-main .verified-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  color: #194a78;
  background: #e4effc;
  font-weight: 700;
}

.exam-main .general-method {
  margin: 16px 0 20px;
  padding: 18px 20px;
  border: 1px solid #b9d1f5;
  border-left: 5px solid var(--exam-accent);
  border-radius: 10px;
  background: var(--exam-accent-soft);
}

.exam-main .general-method h4 {
  margin: 0 0 4px;
  color: var(--exam-accent-dark);
  font-size: 1rem;
}

.exam-main .method-title {
  margin: 0 0 8px;
  font-weight: 700;
}

.exam-main .general-method ol {
  margin: 0;
  padding-left: 1.4rem;
}

.exam-main .general-method li + li {
  margin-top: .32rem;
}

.exam-main .point {
  padding: 13px 16px;
  border-radius: 8px;
  background: var(--exam-accent-soft);
}

.exam-main .formula {
  margin: 12px 0;
  padding: 14px 16px;
  overflow-x: auto;
  border-left: 4px solid var(--exam-accent);
  background: var(--exam-soft);
  font-family: Consolas, "BIZ UDGothic", monospace;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.exam-main .exam-tip {
  margin-top: 18px;
  padding: 14px 16px;
  border-left: 5px solid #d29a00;
  border-radius: 8px;
  background: var(--exam-warn-soft);
}

.exam-main .exam-tip strong {
  color: #765000;
}

.exam-main .exam-tip p {
  margin: .3rem 0 0;
}

.exam-main .answer {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid #b9e2cf;
  border-radius: 8px;
  color: var(--exam-answer);
  background: var(--exam-answer-soft);
  font-size: 1.08rem;
  font-weight: 800;
}

.exam-learning-page .page-top-button {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 1000;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  padding: 5px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--exam-accent-dark);
  box-shadow: 0 8px 20px rgba(35, 90, 159, .28);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .2s ease, visibility .2s ease, transform .2s ease, background-color .2s ease;
}

.exam-learning-page .page-top-button.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.exam-learning-page .page-top-button:hover,
.exam-learning-page .page-top-button:focus-visible {
  background: #123961;
}

.exam-learning-page .page-top-button svg {
  width: 22px;
  height: 22px;
}

.exam-learning-page .page-top-button span {
  margin-top: -4px;
  font-size: .7rem;
  font-weight: 700;
}

.exam-footer {
  padding: 28px 0 48px;
  border-top: 1px solid var(--exam-line);
  color: var(--exam-muted);
  background: #fff;
  font-size: .9rem;
}

.exam-footer .footer-text {
  margin: .3rem 0;
}

.exam-main .reveal {
  opacity: 1;
  transform: none;
}

@media (max-width: 960px) {
  .exam-hero {
    padding-top: 88px;
  }

  .exam-main .legend-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .exam-hero .hero,
  .exam-main,
  .exam-footer .footer-content {
    width: min(100% - 20px, 1040px);
  }

  .exam-hero .hero {
    padding: 36px 0 32px;
  }

  .exam-main {
    padding-top: 28px;
  }

  .exam-main .instruction-section,
  .exam-main .source-box,
  .exam-main .legend-section,
  .exam-main .official-viewer {
    padding: 18px 16px;
  }

  .exam-main .legend-grid {
    grid-template-columns: 1fr;
  }

  .exam-main .legend-card {
    min-height: 0;
  }

  .exam-main .official-pdf-frame {
    height: 62vh;
    min-height: 420px;
  }

  .exam-main .question-nav {
    grid-template-columns: repeat(5, 1fr);
  }

  .exam-main .problem {
    padding: 18px 15px;
  }

  .exam-main .problem-meta {
    margin-left: 0;
  }

  .exam-main .general-method {
    padding: 15px;
  }

  .exam-main .formula {
    padding: 13px 12px;
    font-size: .9rem;
  }

  .exam-learning-page .page-top-button {
    width: 54px;
    height: 54px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .exam-main .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .exam-learning-page .page-top-button {
    transition: none;
  }
}

@media print {
  .exam-learning-page .header,
  .exam-learning-page .header__res,
  .exam-main .question-nav,
  .exam-main .official-viewer,
  .exam-learning-page .page-top-button {
    display: none !important;
  }

  .exam-hero {
    padding-top: 0;
    background: #fff;
  }

  .exam-hero .hero,
  .exam-main,
  .exam-footer .footer-content {
    width: 100%;
  }

  .exam-main .problem {
    break-inside: avoid;
    box-shadow: none;
  }

  .exam-main a,
  .exam-footer a {
    color: inherit;
    text-decoration: none;
  }
}

/* 本文中のテキストリンク：ホバー時に左から下線を伸ばす */
.exam-main p a,
.exam-main li a,
.exam-main .problem-meta a,
.exam-main a.text-link,
.exam-footer .footer-text a {
  padding-bottom: 2px;
  color: var(--exam-accent);
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: left bottom;
  background-size: 0 2px;
  text-decoration: none;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  transition: background-size .3s ease;
}

.exam-main p a:hover,
.exam-main p a:focus-visible,
.exam-main li a:hover,
.exam-main li a:focus-visible,
.exam-main .problem-meta a:hover,
.exam-main .problem-meta a:focus-visible,
.exam-main a.text-link:hover,
.exam-main a.text-link:focus-visible,
.exam-footer .footer-text a:hover,
.exam-footer .footer-text a:focus-visible {
  background-size: 100% 2px;
}

@media (prefers-reduced-motion: reduce) {
  .exam-main p a,
  .exam-main li a,
  .exam-main .problem-meta a,
  .exam-main a.text-link,
  .exam-footer .footer-text a {
    transition: none;
  }
}

.exam-main .official-question__body {
  margin: 0;
  padding: 1rem;
  border: 0;
  border-radius: 0.5rem;
  background-color: #f2f2f2;
  font-style: normal;
}

/* 第152回：追従動画エリアとPC用ページ内目次 */
.exam-learning-page .exam-learning-aside {
  color: var(--exam-ink);
  line-height: 1.55;
}

.exam-learning-page .exam-video-panel,
.exam-learning-page .exam-desktop-toc {
  overflow: hidden;
  border: 1px solid var(--exam-line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(32, 36, 42, 0.08);
}

.exam-learning-page .exam-video-panel h2,
.exam-learning-page .exam-desktop-toc h2 {
  margin: 0;
  padding: 12px 16px;
  color: #fff;
  background: var(--exam-accent-dark);
  font-size: 1rem;
  line-height: 1.45;
}

.exam-learning-page .exam-video-placeholder,
.exam-learning-page .exam-video-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
}

.exam-learning-page .exam-video-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 18px;
  border: 0;
  background:
    linear-gradient(135deg, rgba(35, 90, 159, 0.08), rgba(24, 69, 121, 0.16)),
    #f6f9fd;
  color: var(--exam-accent-dark);
  text-align: left;
}

.exam-learning-page .exam-video-placeholder__icon {
  display: grid;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--exam-accent);
  font-size: 1.2rem;
  line-height: 1;
  text-indent: 3px;
  box-shadow: 0 6px 16px rgba(35, 90, 159, 0.24);
}

.exam-learning-page .exam-video-placeholder__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.exam-learning-page .exam-video-placeholder__text strong {
  font-size: 0.98rem;
}

.exam-learning-page .exam-video-placeholder__text > span {
  color: var(--exam-muted);
  font-size: 0.78rem;
}

.exam-learning-page .exam-video-frame {
  display: block;
  border: 0;
  background: #111;
}

.exam-learning-page .exam-desktop-toc {
  margin-top: 18px;
}

.exam-learning-page .exam-toc-overview,
.exam-learning-page .exam-toc-questions {
  margin: 0;
  list-style: none;
}

.exam-learning-page .exam-toc-overview {
  padding: 10px 12px 4px;
}

.exam-learning-page .exam-toc-overview li + li {
  border-top: 1px solid var(--exam-line);
}

.exam-learning-page .exam-toc-overview a {
  display: block;
  padding: 8px 9px;
  border-radius: 6px;
  color: var(--exam-ink);
  font-size: 0.88rem;
  text-decoration: none;
  transition: color 160ms ease, background-color 160ms ease;
}

.exam-learning-page .exam-toc-label {
  margin: 8px 16px 6px;
  color: var(--exam-muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.exam-learning-page .exam-toc-questions {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  padding: 0 12px 14px;
}

.exam-learning-page .exam-toc-questions a {
  display: grid;
  min-height: 34px;
  place-items: center;
  border: 1px solid var(--exam-line);
  border-radius: 6px;
  color: var(--exam-accent-dark);
  background: var(--exam-soft);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transition: border-color 160ms ease, color 160ms ease, background-color 160ms ease;
}

.exam-learning-page .exam-toc-overview a:hover,
.exam-learning-page .exam-toc-overview a:focus-visible,
.exam-learning-page .exam-toc-overview a.is-current,
.exam-learning-page .exam-toc-questions a:hover,
.exam-learning-page .exam-toc-questions a:focus-visible,
.exam-learning-page .exam-toc-questions a.is-current {
  border-color: var(--exam-accent);
  color: #fff;
  background: var(--exam-accent);
  outline: none;
}

.exam-learning-page #usage-title,
.exam-learning-page #legend-title,
.exam-learning-page #question-list,
.exam-learning-page #answers,
.exam-learning-page .problem[id] {
  scroll-margin-top: 110px;
}

@media (min-width: 769px) {
  .exam-learning-page .exam-learning-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
    gap: 30px;
    align-items: start;
    width: 100%;
  }

  .exam-learning-page .exam-learning-layout > .exam-main {
    width: 100%;
    min-width: 0;
    margin-right: 0;
    margin-left: 0;
  }

  .exam-learning-page .exam-learning-aside {
    position: sticky;
    top: 96px;
    max-height: calc(100vh - 112px);
    padding-right: 4px;
    overflow-y: auto;
    scrollbar-gutter: stable;
  }
}

@media (max-width: 768px) {
  .exam-learning-page .exam-learning-layout {
    display: flex;
    flex-direction: column;
  }

  .exam-learning-page .exam-learning-layout > .exam-main {
    order: 2;
  }

  .exam-learning-page .exam-learning-aside {
    position: sticky;
    top: 78px;
    z-index: 90;
    order: 1;
    width: min(100% - 20px, 1040px);
    margin: 0 auto 14px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 8px 18px rgba(32, 36, 42, 0.1);
    backdrop-filter: blur(8px);
  }

  .exam-learning-page .exam-video-panel {
    border-radius: 9px;
    box-shadow: none;
  }

  .exam-learning-page .exam-video-panel h2 {
    padding: 8px 12px;
    font-size: 0.9rem;
  }

  .exam-learning-page .exam-video-placeholder,
  .exam-learning-page .exam-video-frame {
    height: min(20vh, 180px);
    min-height: 128px;
    aspect-ratio: auto;
  }

  .exam-learning-page .exam-video-placeholder {
    padding: 12px;
  }

  .exam-learning-page .exam-video-placeholder__icon {
    flex-basis: 40px;
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .exam-learning-page .exam-desktop-toc {
    display: none;
  }
}

@media (max-width: 420px) {
  .exam-learning-page .exam-video-placeholder__text > span {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .exam-learning-page .exam-toc-overview a,
  .exam-learning-page .exam-toc-questions a {
    transition: none;
  }
}

/* 第101回 簿記実務検定 1級会計部門 */
.bookkeeping-learning-page .exam-main {
  gap: 0;
}

.bookkeeping-learning-page .bookkeeping-question-nav {
  grid-template-columns: repeat(4, minmax(52px, 1fr));
  max-width: 360px;
}

.bookkeeping-learning-page .abbreviation-section {
  margin-top: 32px;
  padding: 20px 22px;
  border: 1px solid var(--exam-line);
  border-radius: 10px;
  background: var(--exam-soft);
}

.bookkeeping-learning-page .abbreviation-section .section-subtitle {
  margin: 0 0 16px;
  color: var(--exam-ink);
  font-size: clamp(1.2rem, 2.6vw, 1.45rem);
  line-height: 1.45;
}

.bookkeeping-learning-page .question-section {
  margin-top: 32px;
  padding: 24px;
  border: 1px solid var(--exam-line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(32, 36, 42, 0.07);
}

.bookkeeping-learning-page .question-main-title {
  margin: 0 0 8px;
  padding: 0 0 10px;
  border: 0;
  border-bottom: 3px solid var(--exam-accent);
  color: var(--exam-ink);
  background: transparent;
}

.bookkeeping-learning-page .question-main-title h2 {
  margin: 0;
  color: inherit;
  font: inherit;
  line-height: 1.4;
}

.bookkeeping-learning-page .exam-toc-questions {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.bookkeeping-learning-page #question-list,
.bookkeeping-learning-page #abbreviations,
.bookkeeping-learning-page .question-section[id] {
  scroll-margin-top: 110px;
}

@media (max-width: 768px) {
  .bookkeeping-learning-page .abbreviation-section,
  .bookkeeping-learning-page .question-section {
    padding: 18px 15px;
  }

  .bookkeeping-learning-page .bookkeeping-question-nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-width: none;
  }
}

/* 検定解説ページ共通ヘッダー／フッター */
.exam-learning-page .exam-hero .hero {
  width: auto;
  min-width: 0;
  margin-right: 0;
  margin-left: 0;
}

.exam-learning-page .exam-hero .header-meta {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--exam-line);
}

.exam-learning-page .exam-hero .sidebar {
  flex: 0 0 16rem;
}

.exam-learning-page .exam-hero .sidebar-button {
  display: block;
  border: 1px solid var(--exam-line);
  border-radius: 8px;
  color: var(--exam-ink);
  background: #fff;
  text-decoration: none;
}

.exam-learning-page .exam-hero .sidebar-button:hover,
.exam-learning-page .exam-hero .sidebar-button:focus-visible {
  border-color: var(--exam-accent);
  color: var(--exam-accent-dark);
  background: var(--exam-accent-soft);
  outline: none;
}

.exam-learning-page .exam-hero .sidebar-button.is-current {
  border-color: var(--exam-accent);
  color: #fff;
  background: var(--exam-accent);
}

.exam-learning-page .exam-footer {
  margin-top: 0;
}

@media (max-width: 767px) {
  .exam-learning-page .exam-hero .sidebar {
    flex-basis: auto;
    width: 100%;
  }
}
