.cgfc { max-width: 820px; display: flex; flex-direction: column; color: #27331f; }
.cgfc-section { margin-bottom: 26px; }
.cgfc-h { margin: 0 0 12px; font-size: 15.5px; font-weight: 700; color: #27331f; }

.cgfc-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 8px; }
.cgfc label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 700; color: #27331f; }
.cgfc input, .cgfc select {
  padding: 9px 11px; font-size: 14.5px; border: 1px solid #d9e0d4; border-radius: 6px; background: #fff; color: #27331f;
  font-family: inherit;
}
.cgfc input:focus, .cgfc select:focus { outline: 2px solid #19616a; outline-offset: 1px; }
.cgfc input:disabled, .cgfc select:disabled { opacity: 0.5; cursor: not-allowed; background: #f3f4f8; }
.cgfc-hint { margin: 6px 0 0; font-size: 12.5px; color: #5b6b56; min-height: 1em; }

/* Result */
.cgfc-result { display: flex; flex-direction: column; gap: 12px; }
.cgfc-summary { display: flex; flex-wrap: wrap; gap: 10px; }
.cgfc-stat {
  flex: 1 1 200px; padding: 12px 14px; background: #f3f4f8; border: 1px solid #d9e0d4; border-radius: 8px;
  display: flex; flex-direction: column; gap: 4px;
}
.cgfc-stat-highlight { background: #fff; border: 1px solid #19616a; flex-basis: 100%; }
.cgfc-stat-label { font-size: 11.5px; font-weight: 700; color: #5b6b56; text-transform: uppercase; letter-spacing: 0.03em; }
.cgfc-stat-value { font-size: 20px; font-weight: 700; color: #19616a; }
.cgfc-stat-sub { font-size: 13px; font-weight: 400; color: #5b6b56; }

/* Reference table */
.cgfc-table-wrap { overflow-x: auto; }
.cgfc-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.cgfc-table th, .cgfc-table td { text-align: left; padding: 8px 9px; border: 1px solid #d9e0d4; vertical-align: top; }
.cgfc-table th { background: #f3f4f8; color: #27331f; font-weight: 700; white-space: nowrap; }
.cgfc-table td { color: #27331f; }
.cgfc-table tbody tr:nth-child(even) td { background: #f3f4f8; }
.cgfc-table .cgfc-ref-name { font-weight: 700; white-space: nowrap; }
.cgfc-table .cgfc-ref-penalty { color: #c0392b; font-weight: 700; }

/* Prose */
.cgfc-prose p { margin: 0 0 10px; font-size: 13.5px; line-height: 1.6; color: #27331f; }
.cgfc-prose p:last-child { margin-bottom: 0; }
.cgfc-prose code { font-family: ui-monospace, monospace; font-size: 12.5px; background: #f3f4f8; border: 1px solid #d9e0d4; border-radius: 4px; padding: 1px 5px; color: #19616a; }

.cgfc-note { margin-top: 4px; font-size: 13px; color: #5b6b56; }

@media (max-width: 640px) {
  .cgfc-row2 { grid-template-columns: 1fr; }
  .cgfc-summary { flex-direction: column; }
}
