/* AI planner. Loaded after assets/styles.css and uses its tokens, so the page
   reads as part of the site: light working surfaces, one dark summary panel,
   azure only for what can be operated. */

.pl-shell { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4.4fr); gap: 2rem 3rem; align-items: start; }
.pl-main { display: grid; gap: 1.5rem; min-width: 0; }
.pl-side { position: sticky; top: 6.25rem; display: grid; gap: 1rem; min-width: 0; }

.pl-step { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--shadow-1); padding: 2rem 2.1rem 2.1rem; min-width: 0; }
.pl-step[aria-disabled="true"] { opacity: .55; pointer-events: none; }
.pl-step > header { display: grid; grid-template-columns: 2.25rem 1fr; gap: .9rem; align-items: start; margin-bottom: 1.4rem; }
.pl-num { width: 2.25rem; height: 2.25rem; border-radius: 50%; display: grid; place-items: center; background: #E8EEFC; color: var(--azure); font: 400 1.25rem/1 var(--serif); }
.pl-step h2 { font-family: var(--sans); font-weight: 600; font-size: 1.1875rem; line-height: 1.35; letter-spacing: -.006em; color: var(--ink); margin: .2rem 0 .25rem; }
.pl-step header p { margin: 0; font-size: .9375rem; color: var(--slate); }
.pl-sub { font-size: .8125rem; font-weight: 600; color: var(--ink); margin: 1.6rem 0 .65rem; display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.pl-sub small { font-weight: 400; color: var(--grey); }
.pl-sub:first-child { margin-top: 0; }

/* -------------------------------------------------------------- describe */
.pl-tabs { display: inline-grid; grid-auto-flow: column; gap: .25rem; padding: .25rem; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 1rem; }
.pl-tab { display: inline-flex; align-items: center; gap: .5rem; font: 550 .875rem/1 var(--sans); color: var(--slate); background: transparent; border: 0; border-radius: 9px; padding: .65rem .95rem; cursor: pointer; }
.pl-tab svg { width: 16px; height: 16px; }
.pl-tab[aria-selected="true"] { background: var(--white); color: var(--ink); box-shadow: 0 1px 2px rgba(11, 20, 32, .08); }
.pl-tab:hover { color: var(--ink); }
.pl-panel[hidden] { display: none; }
.pl-text { min-height: 9.5rem; font-size: 1rem; }
.pl-chips { display: flex; flex-wrap: wrap; gap: .45rem; margin: .8rem 0 0; padding: 0; list-style: none; }
.pl-chips button { font: 500 .8125rem/1.3 var(--sans); color: var(--steel); background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: .45rem .8rem; cursor: pointer; text-align: left; }
.pl-chips button:hover { border-color: var(--azure); color: var(--ink); }
.pl-row { display: flex; flex-wrap: wrap; align-items: center; gap: .85rem; margin-top: 1.25rem; }
.pl-row .form-note { margin: 0; }

.pl-rec { display: grid; grid-template-columns: auto 1fr; gap: 1.25rem; align-items: center; padding: 1.25rem; border: 1px dashed var(--mist); border-radius: var(--r-m); background: var(--paper); }
.pl-rec-btn { width: 4.25rem; height: 4.25rem; border-radius: 50%; border: 0; background: var(--ink); color: var(--white); display: grid; place-items: center; cursor: pointer; transition: transform .15s ease, background .15s ease; }
.pl-rec-btn:hover { background: var(--navy); transform: scale(1.04); }
.pl-rec-btn svg { width: 24px; height: 24px; }
.pl-rec-btn.on { background: var(--azure); box-shadow: 0 0 0 6px rgba(43, 98, 227, .18); }
.pl-rec-btn.on svg { animation: pl-pulse 1.2s ease-in-out infinite; }
@keyframes pl-pulse { 50% { transform: scale(.82); } }
.pl-rec b { display: block; color: var(--ink); font-weight: 600; font-size: .9375rem; }
.pl-rec span { font-size: .875rem; color: var(--slate); }
.pl-time { font: 500 .875rem/1 var(--mono); color: var(--azure); margin-left: .35rem; }
.pl-meter { height: 4px; border-radius: 4px; background: var(--veil); margin-top: .6rem; overflow: hidden; }
.pl-meter i { display: block; height: 100%; width: 0; background: var(--azure); transition: width .2s linear; }
.pl-video { width: 100%; max-height: 16rem; border-radius: var(--r-m); background: var(--ink); margin-top: 1rem; object-fit: cover; }
.pl-drop { display: grid; place-items: center; gap: .35rem; text-align: center; padding: 1.6rem 1rem; border: 1px dashed var(--mist); border-radius: var(--r-m); background: var(--paper); cursor: pointer; font-size: .875rem; color: var(--slate); }
.pl-drop:hover, .pl-drop.over { border-color: var(--azure); background: #F1F5FE; }
.pl-drop b { color: var(--ink); font-weight: 600; font-size: .9375rem; }
.pl-drop input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pl-status { font-size: .875rem; color: var(--steel); margin: .9rem 0 0; display: flex; align-items: center; gap: .55rem; }
.pl-status[hidden] { display: none; }
.pl-spin { width: 14px; height: 14px; flex: none; border-radius: 50%; border: 2px solid var(--veil); border-top-color: var(--azure); animation: pl-rot .8s linear infinite; }
@keyframes pl-rot { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------ understood */
.pl-summary { font: 400 1.25rem/1.45 var(--serif); color: var(--ink); margin: 0 0 1.25rem; text-wrap: pretty; }
.pl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem 1rem; }
.pl-grid .field { margin: 0; min-width: 0; }
.pl-grid .wide { grid-column: span 2; }
.pl-grid .full { grid-column: 1 / -1; }
.pl-grid input, .pl-grid select { padding: .6rem .75rem; font-size: .9375rem; }
.pl-grid label { font-size: .8125rem; }
.pl-checks { display: flex; flex-wrap: wrap; gap: .45rem; }
.pl-checks label { position: relative; cursor: pointer; margin: 0; }
.pl-checks input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.pl-checks span { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem .8rem; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); font-size: .8125rem; font-weight: 500; color: var(--steel); }
.pl-checks input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--white); }
.pl-checks input:focus-visible + span { outline: 2px solid var(--azure); outline-offset: 2px; }
.pl-notes { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.4rem; }
.pl-notes > div { background: var(--paper); border-radius: var(--r-m); padding: 1rem 1.15rem; font-size: .875rem; }
.pl-notes b { display: block; font-size: .8125rem; color: var(--ink); margin-bottom: .4rem; }
.pl-notes ul { margin: 0; padding-left: 1.1rem; color: var(--steel); }
.pl-notes li + li { margin-top: .3rem; }
.pl-said { margin-top: 1rem; font-size: .8125rem; color: var(--grey); }
.pl-said summary { cursor: pointer; color: var(--slate); font-weight: 550; }
.pl-said p { margin: .5rem 0 0; white-space: pre-wrap; color: var(--steel); }

/* -------------------------------------------------------------- configure */
.pl-gpus { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .65rem; }
.pl-gpu { position: relative; display: block; cursor: pointer; }
.pl-gpu input { position: absolute; opacity: 0; inset: 0; margin: 0; width: 100%; height: 100%; cursor: pointer; }
.pl-gpu .card { display: flex; flex-direction: column; gap: .2rem; height: 100%; padding: .9rem .9rem .85rem; border: 1px solid var(--line); border-radius: 12px; background: var(--white); transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.pl-gpu:hover .card { border-color: var(--azure); }
.pl-gpu input:checked + .card { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink), var(--shadow-1); }
.pl-gpu input:focus-visible + .card { outline: 2px solid var(--azure); outline-offset: 2px; }
.pl-gpu input:disabled + .card { cursor: not-allowed; background: var(--paper); }
.pl-gpu input:disabled { cursor: not-allowed; }
.pl-gpu .nm { font-weight: 600; font-size: .9375rem; color: var(--ink); line-height: 1.25; }
.pl-gpu .sp { font: 400 .75rem/1.35 var(--mono); color: var(--slate); }
.pl-gpu .ct { margin-top: .45rem; font-size: .8125rem; color: var(--steel); line-height: 1.35; }
.pl-gpu .pr { margin-top: auto; padding-top: .45rem; font-weight: 600; font-size: .875rem; color: var(--ink); }
.pl-gpu input:disabled + .card .nm, .pl-gpu input:disabled + .card .pr { color: var(--grey); }
.pl-tag { align-self: flex-start; font-size: .6875rem; font-weight: 600; letter-spacing: .01em; padding: .2rem .5rem; border-radius: 999px; margin-bottom: .35rem; background: var(--veil); color: var(--slate); }
.pl-tag.rec { background: var(--azure); color: var(--white); }
.pl-tag.fit { background: #E8EEFC; color: var(--azure); }
.pl-tag.slow { background: var(--veil); color: var(--steel); }
.pl-tag.no { background: transparent; border: 1px solid var(--line); color: var(--grey); }

.pl-seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: .45rem; }
.pl-seg label { position: relative; cursor: pointer; }
.pl-seg input { position: absolute; opacity: 0; inset: 0; margin: 0; width: 100%; height: 100%; cursor: pointer; }
.pl-seg span { display: flex; flex-direction: column; justify-content: center; height: 100%; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); font-size: .875rem; font-weight: 550; line-height: 1.3; color: var(--ink); }
.pl-seg small { font-weight: 400; font-size: .75rem; color: var(--slate); margin-top: .15rem; }
.pl-seg label:hover span { border-color: var(--azure); }
.pl-seg input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--white); }
.pl-seg input:checked + span small { color: var(--mist); }
.pl-seg input:focus-visible + span { outline: 2px solid var(--azure); outline-offset: 2px; }
.pl-seg input:disabled + span { opacity: .45; cursor: not-allowed; }

.pl-models { display: grid; gap: .45rem; }
.pl-model { position: relative; cursor: pointer; display: block; }
.pl-model input { position: absolute; opacity: 0; inset: 0; margin: 0; width: 100%; height: 100%; cursor: pointer; }
.pl-model > span { display: grid; grid-template-columns: 1rem 1fr auto; gap: .75rem; align-items: center; padding: .7rem .9rem; border: 1px solid var(--line); border-radius: 10px; background: var(--white); font-size: .875rem; color: var(--steel); }
.pl-model > span::before { content: ""; width: 1rem; height: 1rem; border-radius: 50%; border: 1.5px solid var(--mist); box-sizing: border-box; }
.pl-model input:checked + span { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.pl-model input:checked + span::before { border: 5px solid var(--ink); }
.pl-model input:focus-visible + span { outline: 2px solid var(--azure); outline-offset: 2px; }
.pl-model b { color: var(--ink); font-weight: 600; }
.pl-model em { font-style: normal; font: 400 .75rem/1.3 var(--mono); color: var(--slate); white-space: nowrap; }
.pl-toggle { display: flex; align-items: center; gap: .65rem; font-size: .875rem; color: var(--steel); cursor: pointer; margin-top: 1rem; }
.pl-toggle input { width: 1.05rem; height: 1.05rem; accent-color: var(--ink); margin: 0; flex: none; }

.pl-warn { font-size: .875rem; padding: .8rem 1rem; border-radius: 10px; border: 1px solid #C9D7F6; background: #EEF3FE; color: var(--navy); margin-top: 1rem; }
.pl-warn[hidden] { display: none; }

.pl-levers { display: grid; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.pl-levers li { min-width: 0; display: grid; grid-template-columns: 1fr auto; gap: .35rem 1rem; align-items: center; padding: .85rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.pl-levers b { color: var(--ink); font-weight: 600; font-size: .9375rem; }
.pl-levers p { grid-column: 1; margin: 0; font-size: .8125rem; color: var(--slate); }
.pl-levers .save { display: inline-block; margin-top: .2rem; font: 500 .8125rem/1.35 var(--mono); color: var(--azure); }
.pl-levers button { grid-column: 2; grid-row: 1 / span 2; font: 550 .8125rem/1 var(--sans); color: var(--ink); background: var(--white); border: 1px solid var(--mist); border-radius: 9px; padding: .55rem .8rem; cursor: pointer; }
.pl-levers button:hover { border-color: var(--ink); }

.pl-spec { width: 100%; border-collapse: collapse; font-size: .8125rem; margin-top: .4rem; }
.pl-spec td { padding: .5rem 0; border-top: 1px solid var(--line-faint); color: var(--steel); vertical-align: top; }
.pl-spec td:last-child { text-align: right; font-family: var(--mono); color: var(--ink); padding-left: 1rem; }
.pl-more { margin-top: 1rem; }
.pl-more summary { cursor: pointer; font-size: .875rem; font-weight: 550; color: var(--azure); }

/* --------------------------------------------------------------- roadmap */
.pl-phases { display: flex; gap: 3px; margin: .25rem 0 1.25rem; border-radius: 10px; overflow: hidden; }
.pl-phases div { min-width: 0; padding: .7rem .75rem; background: var(--navy); color: var(--white); font-size: .75rem; line-height: 1.3; }
.pl-phases div:nth-child(1) { background: var(--ink); }
.pl-phases div:nth-child(3) { background: var(--steel); }
.pl-phases div:nth-child(4) { background: var(--azure); }
.pl-phases b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-phases span { color: rgba(255, 255, 255, .72); font-family: var(--mono); }
.pl-phase-list { margin: 0 0 1.5rem; padding: 0; list-style: none; counter-reset: ph; }
.pl-phase-list li { counter-increment: ph; display: grid; grid-template-columns: 2rem 1fr auto; gap: .75rem; padding: .75rem 0; border-top: 1px solid var(--line-faint); font-size: .875rem; color: var(--steel); }
.pl-phase-list li::before { content: counter(ph, decimal-leading-zero); font: 500 .8125rem/1.6 var(--mono); color: var(--azure); }
.pl-phase-list b { display: block; color: var(--ink); font-weight: 600; }
.pl-phase-list em { font-style: normal; font: 500 .8125rem/1.6 var(--mono); color: var(--slate); white-space: nowrap; }
.pl-form { border-top: 1px solid var(--line); padding-top: 1.5rem; }
.pl-form .field { margin-bottom: 1rem; }
.pl-consent { display: grid; grid-template-columns: 1.1rem 1fr; gap: .65rem; align-items: start; font-size: .8125rem; color: var(--slate); margin: .5rem 0 1.25rem; cursor: pointer; }
.pl-consent input { width: 1.05rem; height: 1.05rem; margin: .15rem 0 0; accent-color: var(--ink); }
.pl-done { text-align: left; }
.pl-done h3 { font-size: 1.375rem; margin-bottom: .5rem; }
.pl-ref { font: 500 1rem/1 var(--mono); color: var(--azure); }

/* ---------------------------------------------------------- summary panel */
.pl-build { background: var(--ink); color: var(--mist); border-radius: var(--r-l); padding: 1.75rem 1.75rem 1.6rem; box-shadow: var(--shadow-2); }
.pl-build .label { color: var(--azure-2); margin-bottom: .6rem; }
.pl-build-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.pl-build h3 { color: var(--white); font: 400 1.4rem/1.25 var(--serif); margin: 0 0 .35rem; text-wrap: balance; }
.pl-build .sub { font-size: .8125rem; color: #A9B6C8; margin: 0 0 1.1rem; }
.pl-cur { display: inline-grid; grid-auto-flow: column; padding: .2rem; border-radius: 9px; background: var(--glass); border: 1px solid var(--glass-line); flex: none; }
.pl-cur button { font: 550 .75rem/1 var(--sans); color: #A9B6C8; background: transparent; border: 0; border-radius: 7px; padding: .4rem .55rem; cursor: pointer; }
.pl-cur button[aria-pressed="true"] { background: var(--white); color: var(--ink); }
.pl-comp { list-style: none; margin: 0; padding: 0; }
.pl-comp li { display: grid; grid-template-columns: 1.6rem 1fr auto; gap: .2rem .6rem; padding: .8rem 0; border-top: 1px solid var(--line-dark); }
.pl-comp .n { font: 500 .75rem/1.55 var(--mono); color: var(--azure-2); }
.pl-comp b { color: var(--white); font-weight: 600; font-size: .9375rem; display: block; }
.pl-comp small { display: block; font-size: .78rem; color: #A9B6C8; line-height: 1.4; margin-top: .1rem; }
.pl-comp .v { text-align: right; font-size: .875rem; color: var(--white); font-weight: 550; white-space: nowrap; }
.pl-comp .v small { text-align: right; }
.pl-tot { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; margin: .4rem 0 1rem; }
.pl-tot div { background: var(--ink-3); border: 1px solid var(--line-dark); border-radius: 12px; padding: .75rem .8rem; min-width: 0; }
.pl-tot span { display: block; font-size: .72rem; color: #A9B6C8; }
.pl-tot b { display: block; color: var(--white); font-weight: 600; font-size: .9375rem; line-height: 1.3; margin-top: .25rem; }
.pl-tot div.key { background: var(--navy); border-color: rgba(110, 155, 255, .4); }
.pl-allow { font-size: .78rem; color: #A9B6C8; margin: 0 0 1.1rem; line-height: 1.5; }
.pl-build .btn { width: 100%; justify-content: center; background: var(--white); color: var(--ink); border-color: var(--white); }
.pl-build .btn:hover { background: var(--veil); }
.pl-build .btn.ghost { background: var(--glass); color: var(--white); border-color: var(--glass-line); margin-top: .5rem; }
.pl-build .acts { display: grid; gap: .5rem; }
.pl-flash { animation: pl-flash .6s ease; }
@keyframes pl-flash { from { color: var(--azure-2); } }

.pl-how { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-l); padding: 1.6rem 1.75rem; }
.pl-how h3 { font-size: 1.0625rem; }
.pl-how ol { margin: 0; padding-left: 1.15rem; font-size: .875rem; color: var(--steel); }
.pl-how li + li { margin-top: .45rem; }
.pl-how p { font-size: .8125rem; color: var(--grey); margin: 1rem 0 0; }

/* The mobile bar shows the running total when the panel is off screen. */
.pl-bar { display: none; }

@media (max-width: 1180px) {
  .pl-gpus { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1020px) {
  .pl-shell { grid-template-columns: 1fr; }
  .pl-side { position: static; }
  .pl-bar { position: fixed; z-index: 50; inset: auto 0 0 0; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 1rem calc(.8rem + env(safe-area-inset-bottom)); background: var(--ink); color: var(--white); border-top: 1px solid var(--line-dark); }
  .pl-bar[hidden] { display: none; }
  .pl-bar span { font-size: .75rem; color: #A9B6C8; display: block; }
  .pl-bar b { font-size: .9375rem; }
  .pl-bar a { font: 550 .8125rem/1 var(--sans); color: var(--ink); background: var(--white); border-radius: 9px; padding: .65rem .85rem; text-decoration: none; white-space: nowrap; }
}
@media (max-width: 760px) {
  .pl-step { padding: 1.4rem 1.2rem 1.5rem; }
  .pl-step > header { grid-template-columns: 1fr; gap: .6rem; }
  .pl-grid { grid-template-columns: 1fr 1fr; }
  .pl-grid .wide { grid-column: 1 / -1; }
  .pl-notes { grid-template-columns: 1fr; }
  .pl-seg { grid-auto-flow: row; grid-template-columns: 1fr 1fr; }
  .pl-tabs { display: grid; grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
  .pl-tab { justify-content: center; padding: .65rem .4rem; }
  .pl-tot { grid-template-columns: 1fr; }
  .pl-phases div { padding: .55rem .45rem; }
  .pl-phases b { font-size: .6875rem; }
  .pl-model > span { grid-template-columns: 1rem 1fr; }
  .pl-model em { grid-column: 2; white-space: normal; }
  .pl-rec { grid-template-columns: 1fr; justify-items: start; }
}
@media (max-width: 420px) {
  .pl-gpus { grid-template-columns: 1fr 1fr; gap: .5rem; }
  .pl-gpu .card { padding: .75rem; }
  .pl-grid { grid-template-columns: 1fr; }
}
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
