/* 配色／Logo：PwC Office Colours（簡報 theme「PwC Slide Master」）
   Logo mark：`assets/pwc-logo-mark.png`（PwC 橙條標誌） */
:root {
  --pce-brand: #fd5108;
  --pce-brand-mid: #fe7c39;
  --pce-brand-light: #ffaa72;
  --pce-brand-tint-2: #ffe8d4;
  --pce-brand-tint-3: #fff5ed;
  --pce-grey: #a1a8b3;
  --pce-grey-tint-1: #dfe3e6;
  --pce-grey-tint-2: #eeeff1;
  --pce-bg: #f5f7f8;
  --pce-surface: #ffffff;
  --pce-text: #000000;
  --pce-muted: #5b6770;
  --pce-border: #dfe3e6;
  /* 沿用既有變數名，對應簡報主色 */
  --pce-green-dark: #c74302;
  --pce-green: var(--pce-brand);
  --pce-green-light: var(--pce-brand-tint-3);
  --pce-status-done: #c74302;
  --pce-status-partial: #d85a0a;
  --pce-status-wip: #fe7c39;
  --pce-status-todo: #697386;
  --pce-status-wontfix: #464646;
  --pce-status-wontfix-bg: #eceae8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, "Helvetica Neue", "PingFang TC", "Microsoft JhengHei", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  color: var(--pce-text);
  background: var(--pce-bg);
}

.topbar {
  /* 簡報母片：Logo／標題在白底，Orange 作強調色（非整條橙底） */
  background: var(--pce-surface);
  color: var(--pce-text);
  padding: 12px 20px 0;
  border-bottom: 4px solid var(--pce-brand);
  box-shadow: 0 1px 0 var(--pce-grey-tint-1);
}

.topbar-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1 1 280px;
  min-width: 0;
}

.topbar-logo-link {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  padding: 0;
  line-height: 0;
  border-radius: 0;
  box-shadow: none;
}

.topbar-logo-link:hover,
.topbar-logo-link:focus-visible {
  opacity: 0.92;
}

.topbar-logo {
  height: 36px;
  width: auto;
  display: block;
}

.topbar-titles {
  min-width: 0;
}

.topbar h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", "PingFang TC", serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--pce-text);
}

.topbar .meta {
  font-size: 0.85rem;
  color: var(--pce-muted);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nav-links a {
  color: var(--pce-green-dark);
  text-decoration: none;
  font-size: 0.85rem;
  padding: 4px 10px;
  border: 1px solid var(--pce-brand);
  border-radius: 4px;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  background: var(--pce-brand-tint-3);
  color: var(--pce-green-dark);
}

main {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 20px 48px;
}

.lead {
  background: var(--pce-surface);
  border: 1px solid var(--pce-border);
  border-left: 4px solid var(--pce-brand);
  padding: 12px 16px;
  margin: 0 0 24px;
  font-size: 0.92rem;
  color: var(--pce-muted);
}

.lead p {
  margin: 0.35em 0;
}

h2 {
  font-family: Georgia, "Times New Roman", "PingFang TC", serif;
  font-size: 1.2rem;
  margin: 2rem 0 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid var(--pce-brand);
}

h2:first-of-type {
  margin-top: 0;
}

details.status-collapsible {
  margin: 2rem 0 0.75rem;
  background: var(--pce-surface);
  border: 1px solid var(--pce-border);
  border-radius: 8px;
  padding: 0 16px 12px;
}

details.status-collapsible summary.status-collapsible-summary {
  cursor: pointer;
  list-style: none;
  font-family: Georgia, "Times New Roman", "PingFang TC", serif;
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 -16px;
  padding: 0.75rem 16px 0.35rem;
  border-bottom: 2px solid transparent;
  color: var(--pce-text);
}

details.status-collapsible summary.status-collapsible-summary::-webkit-details-marker {
  display: none;
}

details.status-collapsible summary.status-collapsible-summary::before {
  content: "▸ ";
  color: var(--pce-brand);
  font-size: 0.85em;
}

details.status-collapsible[open] summary.status-collapsible-summary {
  border-bottom-color: var(--pce-brand);
  margin-bottom: 0.75rem;
}

details.status-collapsible[open] summary.status-collapsible-summary::before {
  content: "▾ ";
}

details.status-collapsible summary.status-collapsible-summary:hover {
  color: var(--pce-green-dark);
}

details.status-collapsible > table,
details.status-collapsible > pre,
details.status-collapsible > ul.checklist,
details.status-collapsible > p:first-of-type {
  margin-top: 0;
}

.summary-box {
  background: var(--pce-surface);
  border: 1px solid var(--pce-border);
  border-radius: 8px;
  padding: 16px 18px;
  margin-bottom: 8px;
}

.summary-box p {
  margin: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--pce-surface);
  border: 1px solid var(--pce-border);
  border-radius: 8px;
  overflow: hidden;
  margin: 0 0 1rem;
  font-size: 0.92rem;
}

th,
td {
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--pce-border);
}

th {
  background: var(--pce-green-light);
  font-weight: 600;
}

tr:last-child td {
  border-bottom: none;
}

code {
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 0.88em;
  background: var(--pce-grey-tint-2);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}

pre {
  background: #000000;
  color: #eeeff1;
  padding: 14px 16px;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.45;
}

pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}

a {
  color: var(--pce-green-dark);
}

a:hover {
  color: var(--pce-green);
}

.status-done,
.status-ok {
  color: var(--pce-status-done);
  font-weight: 600;
}

.status-partial {
  color: var(--pce-status-partial);
  font-weight: 600;
}

.status-todo,
.status-no {
  color: var(--pce-status-todo);
  font-weight: 600;
}

.status-wip {
  color: var(--pce-status-wip);
  font-weight: 600;
}

.status-wontfix {
  color: var(--pce-status-wontfix);
}

.status-badge-wontfix {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--pce-status-wontfix-bg);
  color: var(--pce-status-wontfix);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px dashed #a8a8a8;
  white-space: nowrap;
}

tr.status-row-wontfix {
  background: #faf9f8;
}

tr.status-row-wontfix td:first-child {
  border-left: 4px solid var(--pce-status-wontfix);
}

.status-wontfix-item {
  color: #5b6770;
}

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

.checklist li {
  padding: 6px 0 6px 28px;
  position: relative;
}

.checklist li::before {
  content: "☐";
  position: absolute;
  left: 0;
  color: var(--pce-muted);
}

footer {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px 32px;
  font-size: 0.8rem;
  color: var(--pce-muted);
}

.generated-note {
  font-size: 0.8rem;
  color: var(--pce-muted);
  margin-top: 2rem;
}

.progress-charts {
  margin: 0 0 2rem;
}

.charts-intro {
  font-size: 0.9rem;
  color: var(--pce-muted);
  margin: 0 0 14px;
}

.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.chart-card {
  background: var(--pce-surface);
  border: 1px solid var(--pce-border);
  border-radius: 10px;
  padding: 14px 16px 12px;
}

.chart-card-wide {
  grid-column: 1 / -1;
}

.chart-card h3 {
  margin: 0 0 12px;
  font-family: Georgia, "Times New Roman", "PingFang TC", serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--pce-text);
}

.chart-score-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

@property --score {
  syntax: "<number>";
  inherits: false;
  initial-value: 0;
}

.donut {
  --score: 0;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: conic-gradient(
    var(--pce-green) calc(var(--score) * 1%),
    var(--pce-grey-tint-1) calc(var(--score) * 1%)
  );
  position: relative;
  flex-shrink: 0;
  transition: --score 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}

.progress-charts .segment-bar .seg {
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.progress-charts.charts-animate .segment-bar .seg {
  transform: scaleX(1);
}

.progress-charts.charts-animate .segment-bar .seg:nth-child(1) {
  transition-delay: 0.08s;
}

.progress-charts.charts-animate .segment-bar .seg:nth-child(2) {
  transition-delay: 0.16s;
}

.progress-charts.charts-animate .segment-bar .seg:nth-child(3) {
  transition-delay: 0.24s;
}

.progress-charts.charts-animate .segment-bar .seg:nth-child(4) {
  transition-delay: 0.32s;
}

.progress-charts .chart-card {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.progress-charts.charts-animate .chart-card {
  opacity: 1;
  transform: translateY(0);
}

.progress-charts.charts-animate .chart-card:nth-child(1) {
  transition-delay: 0.05s;
}

.progress-charts.charts-animate .chart-card:nth-child(2) {
  transition-delay: 0.12s;
}

.progress-charts.charts-animate .chart-card:nth-child(3) {
  transition-delay: 0.19s;
}

.progress-charts.charts-animate .chart-card:nth-child(4) {
  transition-delay: 0.26s;
}

.progress-charts.charts-animate .chart-card:nth-child(n + 5) {
  transition-delay: 0.33s;
}

@media (prefers-reduced-motion: reduce) {
  .donut {
    transition: none;
  }

  .progress-charts .segment-bar .seg {
    transform: scaleX(1);
  }

  .progress-charts .chart-card {
    transform: none;
    opacity: 1;
    transition: none;
  }
}

.donut::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: #fff;
}

.score-text {
  display: flex;
  flex-direction: column;
}

.score-num {
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--pce-green-dark);
  line-height: 1.1;
}

.score-cap {
  font-size: 0.78rem;
  color: var(--pce-muted);
}

.segment-bar {
  display: flex;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--pce-grey-tint-1);
  margin-bottom: 10px;
}

.seg {
  display: block;
  height: 100%;
  min-width: 2px;
}

.seg-done {
  background: var(--pce-brand);
}

.seg-partial {
  background: var(--pce-brand-light);
}

.seg-wip {
  background: var(--pce-brand-mid);
}

.seg-todo {
  background: var(--pce-grey);
}

.seg-wontfix {
  background: repeating-linear-gradient(
    -45deg,
    var(--pce-grey-tint-1),
    var(--pce-grey-tint-1) 4px,
    #d8d6d4 4px,
    #d8d6d4 8px
  );
}

.chart-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 0.82rem;
}

.chart-legend li {
  display: flex;
  align-items: center;
  gap: 6px;
}

.chart-legend .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.chart-legend .dot.seg-wontfix {
  background: var(--pce-grey);
  border: 1px dashed #a8a8a8;
  border-radius: 2px;
}

details.status-collapsible > .lead {
  margin-bottom: 12px;
}

details.status-lead-collapsible {
  margin-top: 0;
}

details.status-lead-collapsible > .lead {
  margin-top: 0;
  border-left-width: 3px;
}

.chart-meta {
  margin: 10px 0 0;
  font-size: 0.75rem;
  color: var(--pce-muted);
}

.phase-stepper-hint {
  font-size: 0.82rem;
  color: var(--pce-muted);
  margin: 0 0 12px;
}

.phase-stepper {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}

.phase-step {
  border: 1px solid var(--pce-border);
  border-radius: 8px;
  padding: 0;
  background: var(--pce-surface);
}

.phase-step-trigger {
  display: block;
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.phase-step-trigger:hover,
.phase-step-trigger:focus-visible {
  outline: 2px solid var(--pce-brand);
  outline-offset: 2px;
}

.phase-step.is-selected {
  box-shadow: 0 0 0 2px var(--pce-brand);
}

.phase-step.is-selected .phase-step-trigger {
  outline: none;
}

.phase-step.phase-done {
  border-color: var(--pce-brand);
  background: var(--pce-brand-tint-3);
}

.phase-step.phase-wip {
  border-color: var(--pce-brand-mid);
  background: var(--pce-brand-tint-2);
}

.phase-step.phase-partial {
  border-color: var(--pce-brand-light);
  background: var(--pce-brand-tint-3);
}

.phase-step.phase-todo {
  border-color: var(--pce-grey);
  background: var(--pce-bg);
}

.phase-badge {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 4px;
}

.phase-status {
  display: block;
  font-size: 0.8rem;
  color: var(--pce-muted);
  margin-bottom: 6px;
}

.phase-def {
  display: block;
  font-size: 0.84rem;
  line-height: 1.45;
  margin-bottom: 4px;
}

.phase-note {
  display: block;
  font-size: 0.78rem;
  color: var(--pce-muted);
  line-height: 1.4;
}

.phase-details-placeholder {
  margin: 0 0 1rem;
  padding: 12px 14px;
  font-size: 0.88rem;
  color: var(--pce-muted);
  background: var(--pce-grey-tint-2);
  border-radius: 8px;
  border: 1px dashed var(--pce-border);
}

.phase-details-placeholder[hidden] {
  display: none;
}

.phase-details .phase-detail-block {
  margin: 0 0 1.25rem;
  padding: 0 0 1rem;
  border-bottom: 1px solid var(--pce-border);
}

.phase-details .phase-detail-block[hidden] {
  display: none;
}

.phase-details .phase-detail-block:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.phase-details h4 {
  margin: 0 0 10px;
  font-family: Georgia, "Times New Roman", "PingFang TC", serif;
  font-size: 0.95rem;
  color: var(--pce-brand);
}

.phase-details ul.phase-detail-list {
  margin: 0 0 1rem;
  padding-left: 1.35rem;
  list-style: disc;
}

.phase-details ul.phase-detail-list li {
  margin-bottom: 0.45rem;
  line-height: 1.5;
}

.phase-details ul.phase-detail-list li:last-child {
  margin-bottom: 0;
}

.checklist li.check-done::before {
  content: "☑";
  color: var(--pce-green);
}

.module-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 0 0 24px;
}

.module-card {
  display: block;
  background: var(--pce-surface);
  border: 1px solid var(--pce-border);
  border-radius: 10px;
  padding: 18px 16px;
  text-decoration: none;
  color: var(--pce-text);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.module-card:hover,
.module-card:focus-visible {
  border-color: var(--pce-brand);
  box-shadow: 0 4px 14px rgba(253, 81, 8, 0.14);
  color: var(--pce-green-dark);
}

.module-card strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.module-card span {
  font-size: 0.88rem;
  color: var(--pce-muted);
}

