/* CI minutes cost calculator. System fonts only; no images, no imports. */

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #1c2530;
  background: #f4f6f8;
}

body {
  margin: 0;
}

a {
  color: #0b5cad;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid #f0a000;
  outline-offset: 2px;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding: 0.75rem 1.25rem;
  background: #16202b;
  color: #ffffff;
}

.site-name {
  margin: 0;
  font-weight: 700;
}

.site-header nav {
  display: flex;
  gap: 1rem;
}

.site-header a {
  color: #cfe4ff;
}

.site-header a[aria-current="page"] {
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
}

main {
  max-width: 62rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2rem;
}

main.prose {
  max-width: 46rem;
}

h1 {
  margin: 0 0 0.5rem;
  font-size: 1.9rem;
  line-height: 1.2;
}

h2 {
  margin: 0 0 0.75rem;
  font-size: 1.35rem;
}

h3 {
  margin: 1.5rem 0 0.4rem;
  font-size: 1.08rem;
}

.prose h2 {
  margin-top: 2rem;
}

.lead {
  margin: 0 0 1.25rem;
  font-size: 1.08rem;
  color: #34414f;
}

.panel {
  margin: 0 0 1.25rem;
  padding: 1.25rem;
  background: #ffffff;
  border: 1px solid #d5dce3;
  border-radius: 8px;
}

.panel.full {
  border-color: #0b5cad;
  border-width: 2px;
}

.fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 0.9rem 1rem;
}

.field {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.25rem;
}

.field.wide {
  grid-column: span 2;
}

label {
  font-weight: 600;
  font-size: 0.93rem;
}

input,
select,
button {
  font: inherit;
  color: inherit;
}

input,
select {
  width: 100%;
  min-height: 2.5rem;
  padding: 0.4rem 0.55rem;
  background: #ffffff;
  border: 1px solid #8894a1;
  border-radius: 6px;
}

button {
  min-height: 2.5rem;
  padding: 0.45rem 1rem;
  background: #0b5cad;
  color: #ffffff;
  border: 0;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
}

button:hover {
  background: #094a8c;
}

button:disabled {
  background: #8894a1;
  cursor: default;
}

.unlock {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 0.75rem;
  align-items: end;
  max-width: 40rem;
  margin: 1rem 0 0.5rem;
}

.unlock label {
  grid-column: 1 / -1;
}

.hint {
  margin: 0.35rem 0 0.75rem;
  font-size: 0.93rem;
  color: #4a5766;
}

.note {
  margin: 0.6rem 0;
  color: #34414f;
}

.status {
  margin: 0.75rem 0;
  font-weight: 600;
  color: #8a3c00;
}

.status:empty,
.note:empty,
.result-line:empty {
  display: none;
}

.figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.75rem;
  margin: 0 0 0.75rem;
}

.figure {
  padding: 0.75rem 0.9rem;
  background: #f4f6f8;
  border: 1px solid #d5dce3;
  border-radius: 6px;
}

.figure dt {
  font-size: 0.86rem;
  color: #4a5766;
}

.figure dd {
  margin: 0.2rem 0 0;
  font-size: 1.3rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.figure.strong {
  background: #e7f1fb;
  border-color: #9cc3ea;
}

.result-line {
  margin: 0.6rem 0;
}

.result-line.strong {
  font-weight: 700;
}

.result-list {
  margin: 0.75rem 0;
  padding: 0.75rem 0.9rem 0.75rem 2rem;
  background: #f4f6f8;
  border: 1px solid #d5dce3;
  border-radius: 6px;
}

.result-list:empty {
  display: none;
}

.plain {
  padding-left: 1.2rem;
  font-size: 0.93rem;
  color: #34414f;
  overflow-wrap: anywhere;
}

.table-wrap {
  overflow-x: auto;
  margin: 0.5rem 0 0.75rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
  font-variant-numeric: tabular-nums;
}

th,
td {
  padding: 0.45rem 0.6rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid #d5dce3;
}

thead th {
  background: #eef1f4;
  font-size: 0.86rem;
  white-space: nowrap;
}

tbody th {
  font-weight: 600;
}

tbody th label {
  font-weight: 600;
}

caption {
  padding: 0 0 0.4rem;
  text-align: left;
  font-size: 0.86rem;
  color: #4a5766;
  caption-side: top;
}

pre {
  margin: 0.75rem 0;
  padding: 0.75rem 0.9rem;
  overflow-x: auto;
  background: #16202b;
  color: #f4f6f8;
  border-radius: 6px;
  font-size: 0.88rem;
  line-height: 1.45;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.cta {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  background: #e7f1fb;
  border: 1px solid #9cc3ea;
  border-radius: 8px;
}

.guide-list {
  padding-left: 1.2rem;
}

tr.total th,
tr.total td {
  font-weight: 700;
  border-top: 2px solid #8894a1;
}

table.mix input {
  max-width: 8rem;
}

td select {
  min-width: 14rem;
}

details {
  margin: 0.75rem 0;
}

summary {
  cursor: pointer;
  font-weight: 600;
}

.site-footer {
  max-width: 62rem;
  margin: 0 auto;
  padding: 1rem 1.25rem 2rem;
  font-size: 0.88rem;
  color: #4a5766;
  border-top: 1px solid #d5dce3;
}

.site-footer p {
  margin: 0 0 0.5rem;
}

@media (max-width: 40rem) {
  h1 {
    font-size: 1.5rem;
  }

  .field.wide {
    grid-column: auto;
  }

  .unlock {
    grid-template-columns: 1fr;
  }
}
