/* One More Year Syndrome Calculator - Standardized Wide-Width Layout */
.omy-wrap {
  max-width: 100% !important;
  width: 100% !important;
  box-sizing: border-box;
  overflow-x: hidden;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #083141;
}
.omy-wrap * {
  box-sizing: border-box;
}

.omy-container {
  max-width: 1400px !important;
  width: 100% !important;
  margin: 24px auto 32px !important;
  padding: 24px;
  color: #083141;
  background: #ffffff;
  border: 2px solid #083141;
  border-radius: 16px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
  box-sizing: border-box;
}

.omy-card {
  border: 1px solid #d5e4eb;
  background: #ffffff;
  border-radius: 12px;
  padding: 20px 24px;
  margin: 20px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  transition: box-shadow 0.2s ease;
}
.omy-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.omy-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: #083141;
  line-height: 1.2;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

.omy-subtitle {
  margin: 0 0 16px 0;
  color: #526b75;
  font-size: 0.95rem;
  line-height: 1.6;
}

.omy-grid {
  display: grid;
  gap: 12px;
}
.omy-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.omy-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 1024px) {
  .omy-grid-2,
  .omy-grid-3 {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.omy-group-title {
  font-weight: 800;
  margin: 0 0 12px 0;
  font-size: 1.3rem;
  color: #083141;
  letter-spacing: -0.01em;
}

.omy-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.omy-label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: #0f172a;
  margin-bottom: 0;
  line-height: 1.4;
}

.omy-input,
.omy-select {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  background: #ffffff;
  color: #0f172a;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
  outline: none;
  min-height: 38px;
  font-family: inherit;
  line-height: 1.5;
  box-sizing: border-box;
}

.omy-input:focus,
.omy-select:focus {
  outline: none;
  border-color: #59747c;
  box-shadow: 0 0 0 2px rgba(89, 116, 124, 0.2);
  background: #f8fafc;
}

.omy-muted {
  font-size: 0.85rem;
  color: #526b75;
  margin-top: 4px;
  line-height: 1.5;
}

.omy-inst {
  background: #f0f7fa;
  border: 1px solid #d5e4eb;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.9rem;
  color: #083141;
  margin: 16px 0;
  line-height: 1.5;
}

.omy-section-desc {
  background: #fef3f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 0.9rem;
  color: #083141;
  margin: 0 0 16px 0;
  line-height: 1.6;
}
.omy-section-desc--blue {
  background: #eff6ff;
  border-color: #bfdbfe;
}
.omy-section-desc--green {
  background: #f0fdf4;
  border-color: #bbf7d0;
}
.omy-section-desc--purple {
  background: #faf5ff;
  border-color: #e9d5ff;
}
.omy-section-desc--amber {
  background: #fffbeb;
  border-color: #fde68a;
}

.omy-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.omy-btn {
  appearance: none;
  border: 2px solid #59747c;
  background: #59747c;
  color: #ffffff;
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(89, 116, 124, 0.2);
}
.omy-btn:hover {
  background: #4a5f66;
  border-color: #4a5f66;
  box-shadow: 0 4px 8px rgba(89, 116, 124, 0.3);
  transform: translateY(-1px);
}
.omy-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(89, 116, 124, 0.2);
}
.omy-btn--primary {
  background: #59747c;
  border-color: #59747c;
  color: #ffffff;
}
.omy-btn--primary:hover {
  background: #4a5f66;
  border-color: #4a5f66;
}
.omy-btn--secondary {
  background: #ffffff;
  border-color: #59747c;
  color: #59747c;
}
.omy-btn--secondary:hover {
  background: #f8fafc;
  border-color: #4a5f66;
  color: #4a5f66;
}
.omy-btn[aria-pressed="true"] {
  background: #083141;
  border-color: #083141;
  color: #ffffff;
}

.omy-pillbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.omy-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 2px solid #d5e4eb;
  background: #f0f7fa;
  font-weight: 700;
  font-size: 0.85rem;
  color: #083141;
  cursor: pointer;
  transition: all 0.2s ease;
}
.omy-pill:hover {
  border-color: #59747c;
  background: #e5f0f5;
}
.omy-pill[aria-pressed="true"] {
  border-style: solid;
  border-color: #59747c;
  background: #59747c;
  color: #ffffff;
}

.omy-results {
  margin-top: 20px;
}

.omy-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin: 16px 0;
}

.omy-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  font-weight: 600;
  font-size: 0.85rem;
  color: #0f172a;
}
.omy-badge.ok {
  border-color: #35a56b;
  background: #e5f6ef;
  color: #123828;
}
.omy-badge.bad {
  border-color: #ef4444;
  background: #fff1f2;
  color: #b91c1c;
}

.omy-tablewrap {
  overflow-x: auto;
  border: 1px solid #d5e4eb;
  border-radius: 8px;
  margin: 16px 0;
  -webkit-overflow-scrolling: touch;
}

.omy-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
  background: #fff;
}

.omy-table th {
  background: #EBF2F4;
  color: #083141;
  text-align: left;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 12px;
  border-bottom: 1px solid #d5e4eb;
  white-space: nowrap;
}

.omy-table td {
  padding: 12px;
  border-bottom: 1px solid #e3edf2;
  color: #083141;
  font-size: 0.9rem;
  white-space: nowrap;
}

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

.omy-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.omy-details {
  margin-top: 20px;
}

.omy-acc {
  border: 1px solid #d5e4eb;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  margin-bottom: 12px;
}

.omy-acc summary {
  cursor: pointer;
  padding: 14px 16px;
  font-weight: 800;
  background: #f9fafb;
  border-bottom: 1px solid #d5e4eb;
  color: #083141;
  font-size: 1rem;
  transition: background 0.2s ease;
}
.omy-acc summary:hover {
  background: #f0f7fa;
}

.omy-acc .omy-acc-body {
  padding: 16px;
}

.omy-kv {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px 16px;
}

.omy-kv div {
  font-size: 0.9rem;
}

.omy-kv strong {
  display: block;
  font-size: 0.85rem;
  color: #526b75;
  font-weight: 700;
  margin-bottom: 4px;
}

.omy-kv div > div {
  font-weight: 600;
  color: #083141;
  font-size: 0.95rem;
}

/* Charts */
.omy-chart-container {
  border: 1px solid #d5e4eb;
  background: #ffffff;
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

.omy-chart-title {
  font-weight: 700;
  color: #083141;
  font-size: 1.05rem;
  margin-bottom: 16px;
}

.omy-chart-canvas {
  width: 100%;
  height: 350px;
  display: block;
  max-width: 100%;
}

@media (max-width: 768px) {
  .omy-chart-canvas {
    height: 250px;
  }
}

.omy-chart-legend {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 16px;
  justify-content: center;
}

.omy-chart-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: #526b75;
  font-weight: 500;
}

.omy-chart-legend-color {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  flex-shrink: 0;
}

.omy-charts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 20px;
}

@media (max-width: 1024px) {
  .omy-charts-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* KPI Cards */
.omy-kpis {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin: 20px 0;
}

.omy-kpi {
  border: 1px solid #d5e4eb;
  background: #f8fafc;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 12px;
}

.omy-kpi .k {
  font-weight: 600;
  color: #083141;
  font-size: 0.85rem;
  margin-bottom: 6px;
}

.omy-kpi .v {
  font-weight: 700;
  color: #083141;
  font-size: 1.5rem;
  margin-top: 4px;
  line-height: 1.2;
}

/* Print */
@media print {
  .omy-no-print {
    display: none !important;
  }
  .omy-container {
    max-width: none;
    padding: 0;
    border: none;
    box-shadow: none;
  }
  .omy-card {
    box-shadow: none;
  }
  .omy-tablewrap {
    border: none;
  }
  .omy-table th {
    background: #fff;
  }
  .omy-chart-container {
    display: none !important;
  }
  @page {
    size: A4;
    margin: 12mm;
  }
}

@media (max-width: 768px) {
  .omy-container {
    padding: 12px;
    margin: 12px auto 20px;
  }
  .omy-title {
    font-size: 1.4rem;
  }
  .omy-card {
    padding: 16px 18px;
    margin: 16px 0;
  }
  .omy-group-title {
    font-size: 1.1rem;
  }
  .omy-kpi .v {
    font-size: 1.3rem;
  }
  .omy-tablewrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-left: -12px;
    margin-right: -12px;
    padding-left: 12px;
    padding-right: 12px;
  }
  .omy-table {
    font-size: 0.85rem;
  }
  .omy-table th,
  .omy-table td {
    padding: 8px 6px;
  }
  .omy-kpis {
    grid-template-columns: 1fr;
  }
  .omy-btn {
    padding: 0.65rem 1.2rem;
    font-size: 0.9rem;
  }
  .omy-pill {
    padding: 6px 12px;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .omy-container {
    padding: 10px;
    margin: 8px auto 16px;
  }
  .omy-title {
    font-size: 1.2rem;
  }
  .omy-subtitle {
    font-size: 0.9rem;
  }
  .omy-card {
    padding: 12px 14px;
    margin: 12px 0;
  }
  .omy-group-title {
    font-size: 1rem;
  }
  .omy-tablewrap {
    margin-left: -10px;
    margin-right: -10px;
    padding-left: 10px;
    padding-right: 10px;
  }
  .omy-table {
    font-size: 0.8rem;
    min-width: 800px;
  }
  .omy-table th,
  .omy-table td {
    padding: 6px 4px;
  }
  .omy-kpi .v {
    font-size: 1.2rem;
  }
  .omy-chart-canvas {
    height: 220px;
  }
  .omy-section-desc {
    font-size: 0.85rem;
    padding: 10px 12px;
  }
  .omy-inst {
    font-size: 0.85rem;
    padding: 10px 12px;
  }
}
