/* Optical Blue Crystal. Native controls; the K application and transport stay unchanged. */
:root {
  color-scheme: light dark;
  --optical-ink: #0e2149;
  --optical-muted: #405678;
  --optical-accent: #1646cc;
  --optical-line: #c5d6ea;
  --optical-outer: #eaf2fc;
  --optical-shell: #e4f0ff;
  --optical-paper: #fbfdff;
  --optical-input: #f5f9ff;
  --optical-soft: #eaf2fc;
  --optical-tint: #e0effe;
  --optical-result: #d8edff;
  --optical-result-edge: #bad9fa;
  --optical-result-sheen: #ffffff84;
  --optical-track: #c1d4eb;
  --optical-focus: #1b5bce;
  --optical-danger: #ad2547;
  --optical-hero-tint: #eff7ffa6;
  --optical-hero-fade: #eff7ff00;
  --optical-radius: 12px;
  --optical-gutter: 17px;
  --ink: var(--optical-ink);
  --muted: var(--optical-muted);
  --blue: var(--optical-accent);
}
@media (prefers-color-scheme: dark) {
  :root {
    --optical-ink: #edf5ff; --optical-muted: #bdd0eb; --optical-accent: #a3c7ff;
    --optical-line: #38577f; --optical-outer: #0d192d; --optical-shell: #11233f;
    --optical-paper: #162b49; --optical-input: #1c3456; --optical-soft: #1d3659;
    --optical-tint: #203d63; --optical-result: #1b3d69; --optical-result-edge: #426a9d;
    --optical-result-sheen: #7db6f22c; --optical-track: #365781; --optical-focus: #a1caff;
    --optical-danger: #ffafc7; --optical-hero-tint: #102441f5; --optical-hero-fade: #11274748;
  }
}

body { background: var(--optical-outer); color: var(--optical-ink); }
.app {
  width: min(100%, 476px); min-height: auto; margin: 14px auto;
  border: 1px solid var(--optical-line); border-radius: 24px;
  background: var(--optical-shell); box-shadow: 0 16px 52px #19447818;
}
.screen { padding-inline: var(--optical-gutter); }
.app .intro-module {
  isolation: isolate; position: relative; overflow: hidden; min-height: 162px;
  margin: 0; padding: 20px 25px 20px; border: 0; border-radius: 0;
  background: var(--optical-shell); box-shadow: none;
}
.app .intro-module .optical-hero-image {
  position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover;
  object-position: 66% 55%; pointer-events: none;
}
.app .intro-module::before {
  content: ''; position: absolute; z-index: -1; inset: 0; pointer-events: none;
  background: linear-gradient(90deg,var(--optical-hero-tint) 0%,var(--optical-hero-tint) 55%,var(--optical-hero-fade) 89%);
}
.app .intro-module .company-name {
  color: var(--optical-ink); font-weight: 750; font-size: 15px; margin: 0 0 12px;
}
.app .intro-module .company-name::after {
  content: ''; display: block; margin-top: 6px; width: 27px; height: 2px; border-radius: 4px; background: var(--optical-accent);
}
.app .intro-module h1 { color: var(--optical-ink); font-size: clamp(22px, 6.4vw, 32px); line-height: 1.23; font-weight: 850; letter-spacing: -.045em; }
.app .intro-module h1 span { font-size: clamp(17px, 4.8vw, 22px); line-height: 1.27; margin-top: 4px; color: var(--optical-muted); font-weight: 700; }
.app .intro-module p { margin: 7px 0 0; padding: 0; border: 0; color: var(--optical-muted); font-size: 11px; line-height: 1.6; }
.app .intro-module p strong { color: var(--optical-ink); }
.app:has(#calculator[hidden]) .intro-module { min-height: auto; margin: 0; padding: 14px var(--optical-gutter); background: var(--optical-paper); border-bottom: 1px solid var(--optical-line); border-radius: 0; }
.app:has(#calculator[hidden]) .intro-module .company-name { font-size: 13px; margin-bottom: 7px; }
.app:has(#calculator[hidden]) .intro-module .company-name::after, .app:has(#calculator[hidden]) .optical-hero-image, .app:has(#calculator[hidden]) .intro-module::before { display: none; }
.app:has(#calculator[hidden]) .intro-module h1 { font-size: 17px; }
.app:has(#calculator[hidden]) .intro-module h1 span { font-size: 13px; margin-top: 2px; }
#back { background: var(--optical-soft); color: var(--optical-accent); }

.app .intro-module + #calculator { padding: 0 var(--optical-gutter) max(12px,env(safe-area-inset-bottom)); }
.app .calculator-panel {
  position: relative; padding: 16px 15px 12px; border: 1px solid var(--optical-line); border-radius: 19px;
  background: var(--optical-paper); box-shadow: 0 7px 20px #22508a17,inset 0 1px 0 #fff4;
}
.amount > label, .term-section h2 { font-weight: 750; font-size: 15px; }
.app .amount > strong {
  text-align: left; color: var(--optical-ink); margin: 4px 0 0;
  font-size: clamp(33px,10.5vw,46px); font-weight: 850; letter-spacing: -.055em;
}
.app #amount { height: 28px; margin: 4px 0 0; }
.app #amount::-webkit-slider-runnable-track { height: 7px; background: linear-gradient(to right,var(--optical-accent) 0 var(--fill,1.7%),var(--optical-track) var(--fill,1.7%) 100%); }
.app #amount::-webkit-slider-thumb {
  width: 22px; height: 22px; margin-top: -7px; background: #1451dd; border: 3px solid #f5fcff;
  box-shadow: 0 0 0 1px #2b58be,0 3px 8px #0d367842;
}
.app #amount::-moz-range-track { background: var(--optical-track); }
.app #amount::-moz-range-thumb { width: 18px; height: 18px; background: #1451dd; border: 3px solid #f5fcff; box-shadow: 0 0 0 1px #2b58be; }
.limits { color: var(--optical-muted); font-size: 11px; }
.app .term-section { margin-top: 11px; padding-top: 9px; border-top: 1px solid var(--optical-line); }
.term-section h2 { margin-bottom: 7px; }
.app .terms { gap: 6px; }
.app .choices button {
  min-height: 37px; border: 1px solid var(--optical-line); border-radius: var(--optical-radius);
  color: var(--optical-ink); background: var(--optical-soft); font-size: 13px; font-weight: 650;
}
.app .choices .selected { background: linear-gradient(180deg,#245ee5,#1543c1); color: #f7fbff; border-color: #113fac; box-shadow: inset 0 1px 0 #c7d9ff65; }
.app .purpose-section { margin: 10px 0 8px; }
.app .purpose-section summary { min-height: 38px; padding: 6px 9px; background: var(--optical-input); border-color: var(--optical-line); border-radius: var(--optical-radius); }
.app .purpose-section summary > span, .app .purpose-section summary strong { color: var(--optical-ink); }
.app .result {
  border: 1px solid var(--optical-result-edge); border-radius: var(--optical-radius); box-shadow: none;
  background: linear-gradient(142deg,var(--optical-result-sheen) 0%,transparent 52%,var(--optical-result-sheen) 81%),var(--optical-result);
}
.app .result-title { padding: 7px 10px 0; border: 0; color: var(--optical-muted); background: transparent; font-size: 11px; }
.app .payment-row { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(65px,1fr); gap: 8px; padding: 6px 10px 7px; }
.app .payment-row strong { color: var(--optical-accent); font-size: clamp(24px,7.5vw,34px); font-weight: 850; }
.app .result p, .app .rate-block span { color: var(--optical-muted); font-size: 12px; margin-bottom: 3px; }
.app .rate-block { padding-inline-start: 10px; border-color: var(--optical-result-edge); }
.app .rate-block b { color: var(--optical-accent); font-size: clamp(21px,6vw,27px); font-weight: 800; }
.app .cost-details { margin: 0 9px 6px; border: 0; border-radius: 0; background: transparent; }
.app .cost-details summary { padding: 2px 0; min-height: 28px; color: var(--optical-muted); font-size: 12px; }
.app .metrics { padding: 7px 0 5px; border-color: var(--optical-result-edge); }
.app .metrics span, .app .disclaimer { color: var(--optical-muted); }
.app .disclaimer { font-size: 10px; line-height: 1.5; text-align: center; margin: 10px 0 0; padding: 0 2px; }

/* Reserved activity lane and one unobstructed primary action. */
.app .apply-dock { position: static; margin: 11px 0 0; padding: 0; background: transparent; }
.optical-activity-slot { height: 43px; margin-bottom: 9px; }
.app .apply-dock .application-notice {
  position: static; transform: none; width: 100%; max-width: none; height: 43px; gap: 10px; padding: 0 11px;
  border: 1px solid #4d72a9; border-radius: var(--optical-radius); color: #f2f8ff;
  background: linear-gradient(155deg,#122a56 0%,#153973 68%,#2455a4 100%);
  box-shadow: inset 0 1px 0 #a7d7ff44; transition: opacity .2s ease, visibility .2s ease;
}
.app .apply-dock .application-notice.is-visible { transform: none; }
.optical-activity-label { flex-shrink: 0; padding-inline-end: 9px; border-inline-end: 1px solid #d8eaff65; font-size: 12px; font-weight: 750; }
.optical-activity-copy { display: grid; gap: 2px; min-width: 0; }
.capsule-person { font-size: 12px; gap: 6px; }
.app .capsule-status { font-size: 10px; color: #d4e5ff; }
.app .apply-dock .notice-amount { margin-inline-start: auto; padding: 4px 7px; border: 0; border-radius: 7px; color: #123a83; background: #dbeaff; font-size: 15px; }
.app .apply-dock .notice-amount small { margin-left: 1px; color: inherit; font-weight: 650; }

/* Glossy optical-resin face, narrow refracted highlight and a separate cobalt foot. */
.app .primary {
  position: relative; isolation: isolate; min-height: 53px; padding: 10px 49px;
  border: 1px solid #498cfa; border-top: 2px solid #f4fbff; border-radius: 18px;
  color: #fbfdff; background: linear-gradient(180deg,#438aff 0%,#235eea 15%,#1244d0 48%,#1032af 86%,#104dca 100%);
  font-size: 17px; font-weight: 800; line-height: 1.35; letter-spacing: .012em;
  text-shadow: 0 1px 2px #071c73c7;
  box-shadow: inset 0 1px 1px #c9ebffdc,inset 0 -2px 1px #61c2ffac,inset 2px 0 4px #6ba9ff5c,inset -2px 0 4px #071b8e76,0 4px 0 #102c80,0 7px 11px #1a47a946;
  transition: transform .14s ease, box-shadow .14s ease;
}
.app .primary::before {
  content: ''; position: absolute; z-index: -1; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(ellipse at 31% 0%,#edfcffdd 0%,#9be5ff6e 9%,transparent 32%),linear-gradient(164deg,#eefcff35 1%,transparent 29%);
  opacity: .9;
}
.app .primary:active:not(:disabled) {
  transform: translateY(3px) scale(.99);
  box-shadow: inset 0 2px 5px #061b7d90,inset 0 -1px 1px #61c2ff84,0 1px 0 #102c80,0 3px 6px #1a47a936;
}
.app .primary:disabled { opacity: .62; box-shadow: none; cursor: not-allowed; }
.app .primary .optical-arrow {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%); float: none; margin: 0;
  display: grid; place-items: center; width: 31px; height: 31px; border-radius: 50%; font-size: 22px; line-height: 1;
  color: #123bb0; background: linear-gradient(165deg,#f9fdff,#d7e9ff); text-shadow: none;
  box-shadow: inset 0 1px 0 #fff,0 2px 4px #0e27775c;
}
.app :is(input, button, summary, a):focus-visible { outline: 2px solid var(--optical-focus); outline-offset: 3px; }

.app #application { padding-top: 17px; }
.app .application-heading { margin: 0 0 14px; }
.app .application-heading h2 { color: var(--optical-ink); }
.app .application-heading p, .app .identity-fields .field small, .app .application-workspace .privacy { color: var(--optical-muted); }
.app .amount-editor { border-color: var(--optical-line); border-radius: var(--optical-radius); background: var(--optical-tint); }
.app .amount-editor summary > div > span, .app .amount-editor strong, .app .edit-amount { color: var(--optical-accent); }
.app .amount-editor .bands button { background: var(--optical-paper); border-color: var(--optical-line); color: var(--optical-ink); }
.app .amount-editor .bands button.selected { background: linear-gradient(180deg,#245ee5,#1543c1); border-color: #113fac; color: #f7fbff; box-shadow: inset 0 1px 0 #c7d9ff65; }
.app .identity-fields .field input { border-color: var(--optical-line); border-radius: var(--optical-radius); background: var(--optical-paper); color: var(--optical-ink); box-shadow: none; }
.app .identity-fields .field input::placeholder { color: var(--optical-muted); }
.app .identity-fields .field input:focus { border-color: var(--optical-focus); outline: 2px solid var(--optical-focus); outline-offset: 1px; background: var(--optical-paper); }
.app .identity-fields .field input.invalid, .app .identity-fields .field input[aria-invalid=true] { border-color: var(--optical-danger); }
.app .warning-options label { border-color: var(--optical-line); background: var(--optical-paper); color: var(--optical-ink); border-radius: var(--optical-radius); }
.app .warning-options input { accent-color: var(--optical-accent); }
.app .warning-options label:has(:checked) { border-color: var(--optical-focus); background: var(--optical-tint); color: var(--optical-accent); box-shadow: none; }
.app .warning-fieldset > p { color: var(--optical-muted); }
.app .field-error, .app .warning-fieldset p.field-error, .app .warning-fieldset .rejected, .app .warning-fieldset #form-status { color: var(--optical-danger); }
.app .form-submit { position: static; margin: 10px 0 0; padding: 7px 0 max(5px,env(safe-area-inset-bottom)); background: transparent; }
.app .form-submit .primary { padding-inline: 12px; }
.app .success { background: var(--optical-paper); border-color: var(--optical-line); border-radius: var(--optical-radius); box-shadow: none; }
.app .success p, .app .summary span { color: var(--optical-muted); }
.app .summary, .app .check { background: var(--optical-tint); }
.app .check { color: var(--optical-accent); }
.app .line { background: #087b3b; color: #f8fff9; }
.app .optical-preview-note { font-weight: 750; font-size: 13px; }

@media (max-width: 520px) {
  .app { width: 100%; margin: 0; min-height: 100dvh; border: 0; border-radius: 0; box-shadow: none; }
}
@media (max-width: 360px) {
  :root { --optical-gutter: 12px; }
  .app .intro-module { padding-inline: 18px; }
  .app .calculator-panel { padding-inline: 11px; }
  .app .choices button { font-size: 12px; }
  .app .apply-dock .application-notice { gap: 8px; padding-inline: 8px; }
  .optical-activity-label { padding-inline-end: 7px; }
}
@media (max-width: 520px) and (max-height: 730px) {
  .app .intro-module { min-height: 127px; padding-block: 11px 10px; }
  .app .intro-module .company-name { font-size: 13px; margin-bottom: 7px; }
  .app .intro-module .company-name::after { margin-top: 4px; }
  .app .intro-module h1 span { margin-top: 2px; }
  .app .intro-module p { margin-top: 4px; }
  .app .calculator-panel { padding-block: 10px 7px; }
  .app .amount > strong { font-size: clamp(31px,9vw,39px); }
  .app .term-section { margin-top: 8px; padding-top: 6px; }
  .app .choices button { min-height: 33px; }
  .app .purpose-section { margin-block: 7px 6px; }
  .app .purpose-section summary { min-height: 34px; }
  .app .payment-row { padding-block: 4px 3px; }
  .app .result-title { padding-top: 5px; }
  .app .cost-details summary { min-height: 24px; }
  .app .apply-dock { margin-top: 8px; }
  .optical-activity-slot, .app .apply-dock .application-notice { height: 39px; }
  .app .primary { min-height: 49px; }
}
@media (prefers-reduced-motion: reduce) { .app .primary, .app .apply-dock .application-notice { transition: none; } }
