/* ── Reset / base ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html {
  font-family: Verdana, Arial, Helvetica, sans-serif;
  font-size: 9pt;
  line-height: 1.4;
  color: #000;
}

body {
  margin: 0;
  padding: 0;
  background: #fff;
}

a:link    { color: #336699; text-decoration: underline; }
a:visited { color: #999999; text-decoration: underline; }
a:hover   { color: #7799BB; text-decoration: none; }
a:active  { color: #999999; }

/* ── Site header ───────────────────────────────────────────────────────── */
.site-header {
  border-bottom: 1px solid #ccc;
  background: #fff;
  padding: 8px 12px;
}

.site-header-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.site-logo-img {
  height: 100px;
  width: auto;
}

.site-title {
  font-size: 18px;
  font-weight: 700;
  color: #001EFF;
  padding-top: 6px;
}

/* ── Site footer ───────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid #ccc;
  padding: 8px 12px;
  font-size: 11px;
  color: #666;
  margin-top: 24px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}
.site-footer a { color: #336699; font-size: 7.5pt; font-family: Arial, sans-serif; }
.site-footer { font-size: 7.5pt; font-family: Arial, sans-serif; }

/* ── Main content wrapper ─────────────────────────────────────────────── */
main {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 12px 24px;
}

/* ── Step indicator ───────────────────────────────────────────────────── */
.step-indicator {
  display: flex;
  align-items: flex-end;
  padding-bottom: 4px;
  font-size: 0.8em;
}

.step-indicator-label {
  font-weight: bold;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
  margin-right: 2px;
  line-height: 1;
}

.step-indicator-steps {
  display: flex;
  align-items: flex-end;
}

.step-indicator-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 50px;
}

.step-indicator-step-label {
  font-size: 1em;
  color: #000;
  text-align: center;
  white-space: normal;
  width: 50px;
  line-height: 1.2;
}

.step-indicator-item.step-active-item .step-indicator-step-label {
  color: #531732;
  font-weight: bold;
}

.step-indicator-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  height: 25px;
  outline: 1px solid #cccbc9;
  margin-top: 5px;
  background: linear-gradient(#f0f0f0, #cccccc);
  background: -moz-linear-gradient(#f0f0f0, #cccccc);
  background: -webkit-linear-gradient(#f0f0f0, #cccccc);
  font-size: 1em;
  font-weight: bold;
  color: #fff;
}

.step-indicator-box.step-active {
  background: linear-gradient(#601b3a, #531732);
  background: -moz-linear-gradient(#601b3a, #531732);
  background: -webkit-linear-gradient(#001EFF, #001EFF);
  outline: 1px solid #001EFF;
  color: #fff;
}

a.step-indicator-box.step-past {
  background: linear-gradient(#f0f0f0, #cccccc);
  background: -moz-linear-gradient(#f0f0f0, #cccccc);
  background: -webkit-linear-gradient(#f0f0f0, #cccccc);
  outline: 1px solid #cccbc9;
  color: #333;
  text-decoration: none;
  cursor: pointer;
}

a.step-indicator-box.step-past:hover {
  background: #bbb;
  outline-color: #666;
}

/* ── Wizard navigation buttons ────────────────────────────────────────── */
.wizard-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  margin: 6px 0;
  border-top: 1px dotted #aaa;
  padding-top: 6px;
}

.wizard-nav-link,
.wizard-nav-btn {
  display: inline-block;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
  vertical-align: middle;
}

.wizard-nav-link img,
.wizard-nav-btn img {
  border: 0;
  display: block;
}

.wizard-actions a,
.wizard-actions button,
.wizard-btn {
  display: inline-block;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 700;
  color: #000;
  background: #d6d6d6;
  border: 1px solid #999;
  text-decoration: none;
  cursor: pointer;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.4;
}

.wizard-actions a:hover,
.wizard-actions button:hover { background: #c0c0c0; }

/* GIF nav buttons and exit link inside wizard-actions must not inherit the grey button style */
.wizard-actions .wizard-nav-link,
.wizard-actions .wizard-nav-btn,
.wizard-actions .exit-calculator-link {
  background: none;
  border: none;
  padding: 0;
  color: #336699;
  text-decoration: underline;
  font-size: 9pt;
  font-weight: normal;
}
.wizard-actions .wizard-nav-link:hover,
.wizard-actions .wizard-nav-btn:hover { background: none; }
.wizard-actions .exit-calculator-link:hover { background: none; text-decoration: none; }

.exit-calculator-form {
  display: inline-flex;
  margin: 0;
}

.wizard-actions a.start-over,
.btn-text-link {
  background: none;
  border: none;
  padding: 0;
  font-size: 12px;
  font-weight: normal;
  color: #336699;
  text-decoration: underline;
}
.wizard-actions a.start-over:hover,
.btn-text-link:hover { text-decoration: none; }

.exit-calculator-link {
  font-size: 9pt;
  color: #336699;
  text-decoration: underline;
  margin-left: 2px;
}
.exit-calculator-link:hover { text-decoration: none; }

/* ── Page heading area ────────────────────────────────────────────────── */
.wizard-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-top: 8px;
}

.wizard-heading-text h1 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 4px;
}

.wizard-heading-text p {
  font-size: 12px;
  margin: 0;
  max-width: 340px;
}

/* ── Validation ───────────────────────────────────────────────────────── */
.field-validation-error,
.validation-summary-errors {
  color: #b42318;
  font-size: 12px;
}

/* ── Fieldset / legend ────────────────────────────────────────────────── */
fieldset {
  border: none;
  margin: 0;
  padding: 0;
}

legend {
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 4px;
}

/* ── Index selection (Step 1) ─────────────────────────────────────────── */
.index-groups-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 24px;
}

.index-group-block {
  margin-bottom: 12px;
}

.index-group-block legend {
  font-weight: 700;
  font-size: 13px;
  color: #000;
  margin-bottom: 4px;
  display: block;
}

.select-all-global {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 8px 0 12px;
  font-weight: 700;
  font-size: 13px;
}

.index-option {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin: 2px 0;
  font-size: 12px;
}

.index-option.select-all-group {
  margin-bottom: 4px;
}

/* ── Output type (Step 2) ─────────────────────────────────────────────── */
.output-option {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 8px 0;
  font-size: 13px;
}

.output-option input[type="radio"] {
  margin-top: 2px;
}

.output-option label strong {
  display: block;
  font-size: 13px;
}

.output-option label span {
  display: block;
  font-size: 12px;
  color: #333;
}

/* ── Date selects (Step 3) ────────────────────────────────────────────── */
.date-select-group {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 8px 0 4px;
  font-size: 13px;
}

.date-select-group label {
  font-weight: 700;
  min-width: 80px;
  text-align: right;
  margin-right: 8px;
}

.date-select-group select {
  font-size: 13px;
  padding: 1px 2px;
}

/* ── Special date-range two-column layout (main content left, disclaimer right) */
.special-layout {
  display: flex;
  align-items: flex-start;
  gap: 32px;
}

.special-layout-main {
  flex: 1;
  min-width: 0;
}

.date-range-disclaimer {
  flex: 0 0 200px;
  color: #999;
  font-size: 8pt;
  line-height: 1.6;
  margin: 4px 0 0;
}

/* ── Period checkboxes grid (Step 3) ──────────────────────────────────── */
.period-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px 20px;
  margin: 6px 0 16px;
}

.period-grid .index-option {
  margin: 0;
}

/* ── Results table (Step 4) ───────────────────────────────────────────── */
.results-table-container {
  overflow-x: auto;
  margin-bottom: 12px;
}

table {
  border-collapse: collapse;
  font-size: 12px;
}

.results-table {
  width: 100%;
  font-variant-numeric: tabular-nums;
}

.results-table th,
.results-table td {
  border-bottom: 1px solid #d6d6d6;
  padding: 5px 10px;
  text-align: right;
  white-space: nowrap;
}

.results-table th:first-child,
.results-table td:first-child {
  text-align: left;
  min-width: 200px;
}

.results-table thead th {
  font-weight: 700;
}

.results-table thead abbr {
  color: inherit;
  cursor: help;
  text-decoration: none;
}

.results-table tbody tr td:first-child,
.results-table tbody tr th[scope="row"] {
  font-weight: normal;
}

.results-table tbody .group-header-row td,
.results-table tbody .group-header-row th {
  font-weight: 700;
  padding-top: 14px;
  border-bottom: 1px solid #888;
}

.results-table tbody .group-header-row:first-child th {
  padding-top: 8px;
}

/* ── Download/print links (Step 4) ───────────────────────────────────── */
.result-actions {
  display: flex;
  gap: 16px;
  align-items: center;
  margin: 8px 0 12px;
  font-size: 12px;
}

.result-actions a {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #336699;
  text-decoration: underline;
}

.icon-excel::before  { content: "📊"; font-size: 14px; }
.icon-print::before  { content: "🖨"; font-size: 14px; }

/* ── Disclaimer text (Step 4) ─────────────────────────────────────────── */
.result-disclaimer {
  font-size: 11px;
  color: #333;
  margin-top: 16px;
  border-top: 1px solid #ccc;
  padding-top: 8px;
  line-height: 1.5;
}

/* ── Misc ──────────────────────────────────────────────────────────────── */
#calculator-wizard[aria-busy="true"] { opacity: 0.65; }

.note-text {
  font-size: 11px;
  color: #333;
  margin: 6px 0;
}
