/* The negotiation octagon on deal.airkod.com (DESIGN.md, section 6n). Loaded after app.css, which gives tokens, fonts,
   buttons and the header. Mobile first. */
.dl { padding-top: var(--header-h); }
.dl [hidden] { display: none !important; }
.dl h1, .dl h2, .dl h3 { text-wrap: balance; }

.dl-intro { padding-top: 40px; padding-bottom: 32px; }
.dl-kicker { color: var(--accent); font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; }
.dl-intro h1 { margin-top: 12px; font-size: clamp(32px, 4vw, 58px); font-weight: 300; line-height: 1.1; letter-spacing: -0.03em; }
.dl-lead { max-width: 860px; margin-top: 16px; color: var(--muted); font-size: clamp(17px, 1.4vw, 21px); font-weight: 300; }
.dl-steps { display: grid; gap: 12px; margin-top: 24px; counter-reset: dl-step; }
.dl-steps li { display: flex; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--sky); font-size: 15px; counter-increment: dl-step; }
.dl-steps li::before { content: counter(dl-step); flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 4px; background: var(--accent-soft); color: var(--accent); font-size: 13px; }

.dl-app { position: relative; z-index: 2; padding-bottom: 56px; }

/* Controls */
.dl-field { display: grid; gap: 4px; min-width: 0; }
.dl-field > span, .dl fieldset legend { color: var(--muted); font-size: 13px; }
.dl-input { width: 100%; min-width: 0; min-height: 40px; padding: 8px 10px; border: 1px solid #D5DEE8; border-radius: var(--r-ctl); background: #fff; color: var(--ink); font: inherit; font-size: 16px; line-height: 1.3; }
.dl-input:focus { border-color: var(--accent); }
.dl-input::placeholder { color: #8795AA; }
.dl-input.is-invalid { border-color: var(--coral); background: #FFF6F6; }
.dl-input--num { font-variant-numeric: tabular-nums; }
textarea.dl-input { resize: vertical; }
.dl-link { color: var(--accent); font-size: 14px; text-align: left; }
.dl-link:hover { text-decoration: underline; }
.dl-link--danger { color: var(--coral); }
.dl .btn:disabled { opacity: 0.45; cursor: default; }
.dl-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.dl-four { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.dl-hint { color: var(--muted); font-size: 14px; }
.dl-empty { color: var(--muted); font-size: 14px; }
.dl-warn { margin-top: 8px; padding: 10px 12px; border: 1px solid #F6CACB; border-radius: var(--r-ctl); background: #FFF4F4; color: #A8272A; font-size: 14px; }
.dl-note { margin-top: 12px; padding: 10px 12px; border: 1px solid #D6D9FC; border-radius: var(--r-ctl); background: var(--accent-soft); font-size: 14px; }
.dl .is-up { color: #0B7F5C; fill: #0B7F5C; }
.dl .is-down { color: #C42F32; fill: #C42F32; }

.dl-chip { display: inline-block; padding: 2px 8px; border-radius: 4px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-style: normal; white-space: nowrap; }
.dl-chip--ok { background: #DDF8EE; color: #0A6E50; }
.dl-chip--low { background: #FFF1DC; color: #8A5300; }
.dl-chip--beyond { background: #FDE5E5; color: #A8272A; }

/* Case bar and templates */
.dl-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-card); background: #fff; }
.dl-bar .dl-field { flex: 1 1 220px; }
.dl-bar .dl-field--grow { flex-grow: 2; }
.dl-bar__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.dl-bar__actions .btn { min-height: 40px; }
.dl .dl-delete.is-armed { border-color: var(--coral); color: var(--coral); }
.dl-new { margin-top: 12px; padding: 20px; border: 1px solid #D6D9FC; border-radius: var(--r-card); background: var(--sky); }
.dl-new header { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 16px; }
.dl-new h2 { font-size: 22px; font-weight: 400; }
.dl-templates { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.dl-template { display: grid; align-content: start; gap: 6px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-card); background: #fff; text-align: left; }
.dl-template:hover { border-color: var(--accent); }
.dl-template strong { font-size: 16px; font-weight: 500; }
.dl-template span { color: var(--muted); font-size: 14px; }

/* Board */
.dl-board { display: grid; gap: 16px; margin-top: 16px; align-items: start; }
.dl-panel { min-width: 0; border: 1px solid var(--line); border-radius: var(--r-card); background: #fff; }
.dl-chart { padding: 16px; }
.dl-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.dl-stat { display: grid; align-content: start; gap: 2px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--sky); font-variant-numeric: tabular-nums; }
.dl-stat span { color: var(--muted); font-size: 13px; }
.dl-stat strong { font-size: 24px; font-weight: 400; line-height: 1.2; overflow-wrap: anywhere; }
.dl-stat small { color: var(--muted); font-size: 13px; }
.dl-stat--offer { border-color: #FFC8A3; background: #FFF7F0; }

.dl-radar { margin: 8px auto 0; max-width: 660px; }
.dl-radar svg { width: 100%; height: auto; max-width: none; overflow: visible; font-variant-numeric: tabular-nums; }
.dl-ring { fill: none; stroke: #D5DEE8; stroke-width: 1; }
.dl-ring--ideal { stroke: #B9C6D6; }
.dl-ring--exit { stroke: var(--coral); stroke-dasharray: 2 4; }
.dl-axis { stroke: var(--line); stroke-width: 1; }
.dl-shape { stroke-linejoin: round; }
.dl-shape--start { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 5 4; }
.dl-shape--now { fill: rgba(83, 58, 253, 0.16); stroke: var(--accent); stroke-width: 2; }
.dl-shape--offer { fill: rgba(255, 138, 61, 0.16); stroke: #F26A12; stroke-width: 2; }
.dl-dot { fill: var(--accent); stroke: #fff; stroke-width: 1.5; }
.dl-dot.is-empty { fill: #B9C6D6; }
.dl-face { cursor: pointer; }
.dl-face:hover .dl-label { fill: var(--accent); }
.dl-label { fill: var(--ink); font-size: 14px; font-weight: 500; }
.dl-sub { fill: var(--muted); font-size: 13px; }
.dl-radar .is-compact .dl-label { font-size: 11px; }
.dl-radar .is-compact .dl-sub { font-size: 11px; }

.dl-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; margin-top: 8px; font-size: 13px; }
.dl-legend li { display: flex; align-items: center; gap: 8px; }
.dl-legend li::before { content: ""; width: 20px; border-top: 2px solid var(--accent); }
.dl-legend .dl-legend--start::before { border-top: 2px dashed var(--ink); }
.dl-legend .dl-legend--offer::before { border-top-color: #F26A12; }
.dl-legend .dl-legend--exit::before { border-top: 2px dotted var(--coral); }
.dl-chart > .dl-hint { margin-top: 8px; text-align: center; font-size: 13px; }

/* Tabs and the negotiation column */
.dl-tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); }
.dl-tabs button { min-height: 48px; padding: 8px 12px; border-bottom: 2px solid transparent; margin-bottom: -1px; font-size: 15px; }
.dl-tabs button[aria-selected="true"] { border-bottom-color: var(--accent); color: var(--accent); }
.dl-block { display: grid; gap: 12px; padding: 16px; border-bottom: 1px solid var(--line); }
[role="tabpanel"] > .dl-block:last-child { border-bottom: 0; }
.dl-block h2 { font-size: 20px; font-weight: 400; }

.dl-rows { display: grid; }
.dl-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 112px; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.dl-row label { display: grid; gap: 2px; justify-items: start; min-width: 0; font-size: 14px; overflow-wrap: anywhere; }
.dl-row label small { color: var(--muted); font-size: 12px; }
.dl-row__from { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dl-row.is-changed .dl-input { border-color: #F26A12; background: #FFF7F0; }
.dl-effect { font-size: 17px; font-variant-numeric: tabular-nums; }

.dl-comps, .dl-history { display: grid; gap: 8px; }
.dl-comp { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-ctl); }
.dl-comp div { display: grid; gap: 2px; min-width: 0; }
.dl-comp strong { font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.dl-comp small { color: var(--muted); font-size: 13px; }
.dl-comp .btn { flex: none; }
.dl-comp--full { border-color: #BDEBDA; background: #F4FCF9; }

.dl-phrase { padding: 12px; border-radius: var(--r-ctl); background: var(--sky); font-size: 15px; overflow-wrap: anywhere; }
.dl-decide { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

.dl-move { display: grid; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-ctl); font-size: 14px; }
.dl-move.is-rejected { background: var(--sky); }
.dl-move__head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.dl-move__head strong { margin-left: auto; font-weight: 500; font-variant-numeric: tabular-nums; }
.dl-move p { overflow-wrap: anywhere; }
.dl-move__note { color: var(--muted); }
.dl-move__actions { display: flex; flex-wrap: wrap; gap: 16px; }

/* Terms of the deal */
.dl-setup { border-bottom: 1px solid var(--line); padding: 0 16px; }
.dl-setup:last-child { border-bottom: 0; }
.dl-setup summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; cursor: pointer; font-size: 17px; list-style: none; }
.dl-setup summary::-webkit-details-marker { display: none; }
.dl-setup summary small { display: grid; place-items: center; min-width: 26px; height: 26px; margin-left: auto; border-radius: 4px; background: var(--sky); color: var(--muted); font-size: 13px; }
.dl-setup summary::after { content: "+"; width: 14px; color: var(--accent); font-size: 20px; text-align: center; }
.dl-setup[open] summary::after { content: "-"; }
.dl-setup > * + * { margin-top: 12px; }
.dl-setup > .btn { margin-bottom: 16px; }
.dl-param { display: grid; gap: 12px; justify-items: stretch; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--sky); }
.dl-param > .dl-link { justify-self: start; }
.dl-param > .dl-warn { margin-top: 0; }
.dl-money { display: grid; gap: 10px; }
.dl-money fieldset { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.dl-money legend { margin-bottom: 6px; padding: 0; }
.dl-check { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: #fff; font-size: 14px; cursor: pointer; }
.dl-check input { accent-color: var(--accent); }
.dl-formula { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

/* Eight faces */
.dl-faces { margin-top: 40px; }
.dl-faces > h2 { margin-bottom: 16px; font-size: clamp(24px, 2.4vw, 36px); font-weight: 300; }
.dl-cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.dl-card { display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-card); background: #fff; }
.dl-card--beyond { border-color: #F2B8B9; }
.dl-card header { display: flex; align-items: center; gap: 10px; }
.dl-card header .dl-chip { margin-left: auto; }
.dl-card__no { color: var(--accent); font-size: 13px; font-variant-numeric: tabular-nums; }
.dl-card h3 { font-size: 19px; font-weight: 400; }
.dl-card__benefit { font-size: 15px; font-weight: 300; overflow-wrap: anywhere; }
.dl-card ul { display: grid; gap: 10px; }
.dl-card li { display: grid; gap: 6px; padding-top: 10px; border-top: 1px solid var(--line); }
.dl-card__name { font-size: 14px; overflow-wrap: anywhere; }
.dl-card dl { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0; font-variant-numeric: tabular-nums; }
.dl-card dt { color: var(--muted); font-size: 12px; }
.dl-card dd { margin: 0; font-size: 18px; }
.dl-card__offer dd { color: #B84A00; }
.dl-card li small { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.dl-card footer { display: flex; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.dl-card footer strong { font-weight: 500; }
.dl-card > .dl-link { align-self: flex-start; }

.dl-privacy { margin-top: 24px; color: var(--muted); font-size: 14px; }

.dl-cta { position: relative; z-index: 2; padding-bottom: 48px; }
.dl-cta > div { display: grid; justify-items: start; gap: 14px; padding: clamp(24px, 4vw, 56px); border-radius: var(--r-sheet); background: #0D1738; color: #fff; }
.dl-cta h2 { font-size: clamp(26px, 3vw, 44px); font-weight: 300; line-height: 1.15; }
.dl-cta p { max-width: 720px; color: #A9B8DD; font-weight: 300; }

.dl-footer { border-top: 1px solid var(--line); padding: 20px 0; color: var(--muted); font-size: 14px; }
.dl-footer .container { display: flex; justify-content: space-between; gap: 16px; }

@media (max-width: 560px) {
  .dl-header-cta { display: none; }
  .dl-bar__actions .btn { flex: 1 1 auto; }
  .dl-row { grid-template-columns: minmax(0, 1fr) 104px; }
  .dl-row__from { display: none; }
  .dl-comp { flex-direction: column; align-items: flex-start; }
  .dl-stats { grid-template-columns: minmax(0, 1fr); }
  .dl-stat { grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 12px; }
  .dl-stat strong { font-size: 21px; text-align: right; white-space: nowrap; }
  .dl-stat small { grid-column: 1 / -1; }
}

@media (min-width: 700px) {
  .dl-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1100px) {
  .dl-board { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
  .dl-four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* The octagon stays in sight while the terms on the right are edited. */
@media (min-width: 1100px) and (min-height: 780px) {
  .dl-chart { position: sticky; top: calc(var(--header-h) + 12px); }
  .dl-radar { max-width: min(660px, calc((100vh - var(--header-h) - 270px) * 1.32)); }
}
