/* Estimation settings: table of calculation methods, editor for the opened cell, and one apply step.
   Rules sit in the readability layer like the rest of the administration styles. */
@layer readability {
  body#royal-blue-app .est-board {padding:22px !important}
  body#royal-blue-app .est-board :is(h3,h4,p) {margin-top:0}
  body#royal-blue-app .est-board [hidden] {display:none !important}
  body#royal-blue-app .est-board .settings-title h3 {display:flex;align-items:center;gap:9px;font-size:18px !important}
  body#royal-blue-app .est-intro {color:#506580;line-height:1.7;margin:0 0 16px;font-size:14px !important}

  /* Where things stand now */
  body#royal-blue-app .est-status {display:flex;align-items:flex-start;gap:12px;padding:14px 16px;border-radius:12px;background:#f0f7ff;border:1px solid #d5e5fa}
  body#royal-blue-app .est-status>div {flex:1;min-width:0}
  body#royal-blue-app .est-status strong {display:block;font-size:15px !important;color:#1f4272}
  body#royal-blue-app .est-status p {margin:3px 0 0;font-size:13px !important;line-height:1.6;color:#36516f}
  body#royal-blue-app .est-status-icon {display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:#dcebff;color:#245bba;flex:none}
  body#royal-blue-app .est-status[data-state=active] {background:#eef9f5;border-color:#c4e6da}
  body#royal-blue-app .est-status[data-state=active] .est-status-icon {background:#d6f0e5;color:#18826a}
  body#royal-blue-app .est-status:is([data-state=scheduled],[data-state=draft]) {background:#fff8e8;border-color:#f0dcae}
  body#royal-blue-app .est-status:is([data-state=scheduled],[data-state=draft]) .est-status-icon {background:#fbe9bd;color:#8a5a00}
  body#royal-blue-app .est-context {display:flex;flex-wrap:wrap;gap:6px 22px;list-style:none;margin:10px 2px 0;padding:0;color:#506580;font-size:13px !important}
  body#royal-blue-app .est-context li {display:flex;align-items:center;gap:6px}
  body#royal-blue-app .est-context b {color:#24446b;font-weight:600}
  body#royal-blue-app .est-guide {margin:12px 0 4px}
  body#royal-blue-app .est-guide>summary {display:flex;align-items:center;gap:8px;cursor:pointer;color:#245bba;font-size:13px !important;list-style:none;min-height:36px}
  body#royal-blue-app .est-guide>summary>svg:last-child {margin-left:auto}
  body#royal-blue-app .est-guide ol {margin:6px 0 4px;padding:12px 16px 12px 34px;background:#f7faff;border:1px solid #e1eafa;border-radius:10px;font-size:13px !important;line-height:1.75;color:#36516f}

  /* Step headings */
  body#royal-blue-app .est-section-heading {display:flex;align-items:center;justify-content:space-between;gap:12px;margin:22px 0 12px;flex-wrap:wrap}
  body#royal-blue-app .est-section-heading>div {display:flex;align-items:center;gap:10px}
  body#royal-blue-app .est-section-heading h3 {margin:0;font-size:17px !important}
  body#royal-blue-app .est-step {display:inline-grid;place-items:center;flex:0 0 26px;width:26px;height:26px;background:#e8f0ff;color:#175adb;border-radius:8px;font-size:13px;font-weight:700}

  /* The table */
  body#royal-blue-app .est-matrix-wrap {overflow-x:auto;border:1px solid #d5e3f9;border-radius:12px;background:#fff}
  body#royal-blue-app .est-matrix-wrap:focus-visible {outline:3px solid #aac8ff;outline-offset:2px}
  body#royal-blue-app .est-matrix {width:100%;min-width:640px;table-layout:fixed;border-collapse:separate;border-spacing:0}
  body#royal-blue-app .est-matrix thead th:first-child {width:170px}
  body#royal-blue-app .est-matrix caption {position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
  body#royal-blue-app .est-matrix :is(th,td) {padding:8px !important;vertical-align:top;text-align:left;border-bottom:1px solid #e6eefb;font-size:13px !important}
  body#royal-blue-app .est-matrix tbody tr:last-child :is(th,td) {border-bottom:0}
  body#royal-blue-app .est-matrix thead th {background:#f5f9ff;color:#24446b;vertical-align:bottom;padding:10px 10px 8px}
  body#royal-blue-app .est-matrix thead th strong {display:block;font-size:14px !important}
  body#royal-blue-app .est-matrix thead th small {display:block;font-size:12px !important;font-weight:400;color:#506580}
  body#royal-blue-app .est-matrix :is(thead th:first-child,tbody th[scope=row]) {position:sticky;left:0;z-index:1;background:#f9fbff;min-width:170px;border-right:1px solid #e6eefb}
  body#royal-blue-app .est-matrix tbody th[scope=row] {display:table-cell}
  body#royal-blue-app .est-param-icon {display:inline-block;vertical-align:top;margin:1px 8px 0 0;color:#3d73bc}
  body#royal-blue-app .est-param-text {display:inline-block;vertical-align:top;max-width:calc(100% - 30px)}
  body#royal-blue-app .est-matrix tbody th[scope=row] strong {display:block;font-size:13px !important;color:#24446b;line-height:1.4}
  body#royal-blue-app .est-matrix tbody th[scope=row] small {display:block;font-size:12px !important;font-weight:400;color:#62758d}
  body#royal-blue-app .est-cell {position:relative;display:grid;grid-template-columns:minmax(0,1fr);gap:4px;width:100%;min-width:0;min-height:84px;padding:10px 12px;text-align:left;font:inherit;white-space:normal;overflow-wrap:anywhere;color:#264667;background:#fff;border:1px solid #dbe7fb;border-radius:10px;cursor:pointer;align-content:start}
  body#royal-blue-app .est-cell>* {white-space:normal;min-width:0}
  body#royal-blue-app .est-cell:hover {border-color:#96b8f4;background:#f8fbff}
  body#royal-blue-app .est-cell:focus-visible {outline:3px solid #aac8ff;outline-offset:2px}
  body#royal-blue-app .est-cell[aria-pressed=true] {border-color:#2b65ea;background:#edf4ff;box-shadow:0 0 0 2px #cfe0ff}
  body#royal-blue-app .est-cell[data-tone=custom] {border-left:4px solid #21927c;background:#f4fbf8}
  body#royal-blue-app .est-cell[data-tone=custom][aria-pressed=true] {background:#edf4ff;border-left-color:#21927c}
  body#royal-blue-app .est-cell[data-tone=reverting] {border-style:dashed}
  body#royal-blue-app .est-cell[data-blocked=true] {border-color:#e8c36b;background:#fffaf0}
  body#royal-blue-app .est-cell[data-dirty=true]::after {content:"";position:absolute;top:8px;right:8px;width:9px;height:9px;border-radius:50%;background:#e59a1a;box-shadow:0 0 0 3px #fbe7bd}
  body#royal-blue-app .est-cell-result {display:flex;align-items:baseline;flex-wrap:wrap;gap:2px 6px;min-height:28px}
  body#royal-blue-app .est-value {font-size:21px !important;font-weight:700;line-height:1.25;color:#133858;font-variant-numeric:tabular-nums}
  body#royal-blue-app .est-cell-result small {font-size:12px !important;color:#506580}
  body#royal-blue-app .est-value-none,body#royal-blue-app .est-value-pending {color:#8a9bb0}
  body#royal-blue-app .est-was {font-size:12px !important;color:#8a5a00;background:#fff1cf;border-radius:5px;padding:0 6px;line-height:1.6}
  body#royal-blue-app .est-cell-method {font-size:12.5px !important;line-height:1.45;color:#36516f}
  body#royal-blue-app .est-cell-warning {font-size:12px !important;line-height:1.45;color:#8a5a00}
  body#royal-blue-app .est-cell-badge {justify-self:start;font-size:11.5px !important;line-height:1.6;padding:0 8px;border-radius:999px;background:#edf2f9;color:#506580}
  body#royal-blue-app .est-cell[data-tone=custom] .est-cell-badge {background:#d9f0e6;color:#17664f}
  body#royal-blue-app .est-cell[data-dirty=true] .est-cell-badge {background:#fbe7bd;color:#7a4b00}
  body#royal-blue-app .est-static {color:#506580}
  body#royal-blue-app .est-static,body#royal-blue-app .est-static * {white-space:normal !important;overflow-wrap:anywhere}
  body#royal-blue-app .est-static :is(span,a) {display:block;font-size:13px !important;color:#36516f}
  body#royal-blue-app .est-static a {color:#245bba}
  body#royal-blue-app .est-static small {display:block;font-size:12px !important;color:#62758d;margin-top:2px}
  body#royal-blue-app .est-empty {display:flex;gap:14px;align-items:center;padding:22px;color:#2466cf}
  body#royal-blue-app .est-empty p {color:#506580;font-size:13px !important;margin:5px 0 0}
  body#royal-blue-app .est-legend {display:flex;flex-wrap:wrap;align-items:center;gap:6px 14px;margin:10px 2px 0;font-size:12.5px !important;color:#506580}
  body#royal-blue-app .est-dot {display:inline-block;width:10px;height:10px;border-radius:3px;margin-right:-6px}
  body#royal-blue-app .est-dot-default {background:#c9d6e8}
  body#royal-blue-app .est-dot-custom {background:#21927c}
  body#royal-blue-app .est-dot-dirty {background:#e59a1a;border-radius:50%}
  body#royal-blue-app .est-links {display:flex;flex-wrap:wrap;gap:6px 20px;margin:8px 2px 0}
  body#royal-blue-app .est-links a {display:inline-flex;align-items:center;gap:6px;font-size:13px !important;color:#245bba}

  /* The editor for the opened cell */
  body#royal-blue-app .est-editor {margin-top:16px;padding:18px 20px;background:#f8fbff;border:1px solid #bcd3f7;border-radius:14px;box-shadow:0 8px 24px #1d4a8a14;scroll-margin-top:90px}
  body#royal-blue-app .est-editor-head {display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px}
  body#royal-blue-app .est-editor-head h4 {margin:2px 0 3px;font-size:18px !important;color:#1f4272}
  body#royal-blue-app .est-editor-head h4:focus {outline:none}
  body#royal-blue-app .est-editor-head p {margin:0;font-size:13px !important;color:#506580;line-height:1.6}
  body#royal-blue-app .est-editor-eyebrow {font-size:12px !important;font-weight:600;color:#245bba;letter-spacing:.2px}
  body#royal-blue-app .est-choices {border:0;padding:0;margin:0 0 12px;min-width:0}
  body#royal-blue-app .est-choices legend {padding:0;margin-bottom:8px;font-size:14px !important;font-weight:600;color:#24446b}
  body#royal-blue-app .est-choice-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
  body#royal-blue-app .est-choice {position:relative;display:block;cursor:pointer;min-width:0}
  body#royal-blue-app .est-choice input {position:absolute;top:15px;left:14px;width:18px;height:18px;margin:0;accent-color:#2b65ea;cursor:pointer}
  body#royal-blue-app .est-choice-body {display:block;height:100%;padding:13px 14px 13px 44px;background:#fff;border:1px solid #d5e3f9;border-radius:10px}
  body#royal-blue-app .est-choice-body strong {display:flex;align-items:center;flex-wrap:wrap;gap:6px;font-size:14px !important;color:#24446b;line-height:1.4}
  body#royal-blue-app .est-choice-body em {font-style:normal;font-size:11.5px !important;font-weight:500;padding:0 7px;border-radius:999px;background:#edf2f9;color:#506580;line-height:1.6}
  body#royal-blue-app .est-choice-body small {display:block;margin-top:5px;font-size:12.5px !important;line-height:1.6;color:#506580}
  body#royal-blue-app .est-choice:hover .est-choice-body {border-color:#96b8f4}
  body#royal-blue-app .est-choice input:checked+.est-choice-body {border-color:#2b65ea;background:#edf4ff;box-shadow:0 0 0 1px #2b65ea}
  body#royal-blue-app .est-choice input:focus-visible+.est-choice-body {outline:3px solid #aac8ff;outline-offset:3px}
  body#royal-blue-app .est-adjust {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;padding:14px;background:#fff;border:1px solid #dbe7fb;border-radius:10px;margin-bottom:12px}
  body#royal-blue-app .est-adjust .field {margin:0}
  body#royal-blue-app .est-result {padding:14px 16px;border-radius:10px;background:#eef8f4;border:1px solid #c4e6da;color:#176548;margin-bottom:12px}
  body#royal-blue-app .est-result-title {display:block;font-size:12.5px !important;font-weight:600;margin-bottom:8px;letter-spacing:.1px}
  body#royal-blue-app .est-result-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:10px;margin:0}
  body#royal-blue-app .est-result-grid>div {padding:10px 12px;background:#fff;border:1px solid #d3eadf;border-radius:8px}
  body#royal-blue-app .est-result-grid dt {font-size:12px !important;color:#506580;margin:0 0 3px}
  body#royal-blue-app .est-result-grid dd {margin:0;font-size:19px !important;font-weight:700;color:#133858;font-variant-numeric:tabular-nums}
  body#royal-blue-app .est-result-grid dd small {display:block;font-size:12px !important;font-weight:400;color:#506580;margin-top:2px}
  body#royal-blue-app .est-after[data-changed=true] {border-color:#7fc4a8;background:#e5f6ee}
  body#royal-blue-app .est-after[data-changed=true] dd {color:#0f6a4c}
  body#royal-blue-app .est-result-note {margin:8px 0 0;font-size:13px !important;line-height:1.6;color:#36516f}
  body#royal-blue-app .est-result-note[data-state=error] {color:#a52d3c}
  body#royal-blue-app .est-advanced {border-top:1px solid #e1eafa;padding-top:10px;margin-top:4px}
  body#royal-blue-app .est-advanced>summary {display:flex;gap:8px;align-items:center;cursor:pointer;font-size:13px !important;color:#245bba;line-height:1.6;list-style:none;min-height:36px}
  body#royal-blue-app .est-advanced>summary>span {font-size:12px !important;color:#62758d;margin-left:4px}
  body#royal-blue-app .est-advanced>summary>svg:last-child {margin-left:auto}
  body#royal-blue-app .est-advanced[open]>summary>svg:last-child {transform:rotate(180deg)}
  body#royal-blue-app .est-advanced>.form-grid {margin-top:12px;grid-template-columns:repeat(2,minmax(0,1fr)) !important;gap:14px !important}
  body#royal-blue-app .est-copy {display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:14px 0 0;padding-top:12px;border-top:1px solid #e1eafa;font-size:13px !important;color:#36516f}
  body#royal-blue-app .est-copy small {flex-basis:100%;font-size:12.5px !important;color:#17664f;min-height:1em}
  body#royal-blue-app .est-editor-actions {display:flex;flex-wrap:wrap;justify-content:flex-end;gap:10px;margin-top:14px}

  /* Step 2 */
  body#royal-blue-app .est-apply {margin:26px 0 0;padding:18px;border:1px solid #d5e3f9;border-radius:12px;min-width:0;background:#f9fbff}
  body#royal-blue-app .est-apply legend {display:flex;align-items:center;gap:10px;padding:0 8px;font-size:16px !important;font-weight:600}
  body#royal-blue-app .est-no-changes {margin:0 0 12px;font-size:13px !important;color:#62758d}
  body#royal-blue-app .est-changes-count {margin:0 0 8px;font-size:13px !important;color:#36516f}
  body#royal-blue-app .est-changes {list-style:none;margin:0 0 14px;padding:0;display:grid;gap:6px}
  body#royal-blue-app .est-changes li {display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 10px;padding:8px 12px;background:#fff;border:1px solid #e1eafa;border-radius:8px;font-size:13px !important;color:#36516f}
  body#royal-blue-app .est-changes strong {color:#24446b}
  body#royal-blue-app .est-change-tag {font-size:11.5px !important;padding:0 8px;border-radius:999px;line-height:1.7;background:#e1ecff;color:#1c4aa5}
  body#royal-blue-app .est-changes li[data-kind=added] .est-change-tag {background:#d9f0e6;color:#17664f}
  body#royal-blue-app .est-changes li[data-kind=removed] .est-change-tag {background:#fbe7bd;color:#7a4b00}
  body#royal-blue-app .est-orphans {margin:0 0 14px;padding:12px 14px;border-radius:10px;background:#fff6e5;border:1px solid #f0d9a4;color:#6b4a12;font-size:13px !important}
  body#royal-blue-app .est-orphans ul {margin:8px 0 0;padding-left:18px}
  body#royal-blue-app .est-orphans li {margin:4px 0}
  body#royal-blue-app .est-apply-fields {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;align-items:start}
  body#royal-blue-app .est-when {display:grid;gap:8px}
  body#royal-blue-app .est-when input[type=datetime-local]:disabled {display:none}
  body#royal-blue-app .est-label {font-size:13px !important;font-weight:600;color:#24446b}
  body#royal-blue-app .est-radio {display:flex;align-items:flex-start;gap:9px;font-size:13px !important;color:#24446b;cursor:pointer;min-height:32px}
  body#royal-blue-app .est-radio input {margin:3px 0 0;width:17px;height:17px;accent-color:#2b65ea}
  body#royal-blue-app .est-radio small {display:block;font-size:12.5px !important;color:#506580;line-height:1.55;margin-top:2px}
  body#royal-blue-app .est-board .admin-save-area {margin-top:20px}
  body#royal-blue-app .est-save-note {margin:4px 0 14px;font-size:13px !important;line-height:1.65;color:#506580}

  @media(max-width:900px) {
    body#royal-blue-app .est-choice-grid {grid-template-columns:1fr}
    body#royal-blue-app .est-apply-fields {grid-template-columns:1fr}
  }
  @media(max-width:600px) {
    body#royal-blue-app .est-board {padding:16px !important}
    body#royal-blue-app .est-status {flex-wrap:wrap}
    body#royal-blue-app .est-matrix {min-width:640px}
    body#royal-blue-app .est-matrix thead th:first-child {width:130px}
    body#royal-blue-app .est-matrix :is(thead th:first-child,tbody th[scope=row]) {min-width:130px}
    body#royal-blue-app .est-editor {padding:14px}
    body#royal-blue-app .est-adjust,body#royal-blue-app .est-advanced>.form-grid {grid-template-columns:1fr !important}
    body#royal-blue-app .est-advanced>summary>span {display:none}
    body#royal-blue-app .est-editor-actions .btn {flex:1}
  }
}
