/* Upstage AI Pack pages — extends brity.css (.br) + bassist.css (.ba-pill) */
.up .h2 { white-space: pre-line; }
.up-switch { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface); margin-top: 28px; }
.up-switch button { display: flex; align-items: baseline; gap: 8px; padding: 10px 16px; border-radius: 9px; color: var(--muted); font-size: 13.5px; transition: .2s; }
.up-switch button b { font-size: 15px; color: var(--fg); letter-spacing: .02em; }
.up-switch button.on { background: var(--bg); color: var(--fg); box-shadow: 0 1px 3px rgba(15,18,32,.08), 0 0 0 1px var(--line); }
.up-switch button.on b { color: var(--accent); }
.up-hero .br-hero-in { padding-top: 40px; }
.up-hero h1 { font-size: 54px; }
.up-lead { margin-top: 24px !important; font-size: 16.5px; color: var(--muted); }
.up-points { margin-top: 24px; border-top: 1px solid var(--line); }
.up-points > div { display: flex; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line); font-weight: 600; font-size: 15.5px; }
.up-points em { font-style: normal; font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--accent); padding-top: 3px; }
.up-shot { margin: 0; border-radius: 14px; overflow: hidden; background: #fff; border: 1px solid var(--line); box-shadow: 0 30px 60px -30px rgba(15,18,32,.4); }
.up-shot-bar { height: 36px; display: flex; align-items: center; gap: 6px; padding: 0 14px; background: var(--surface); border-bottom: 1px solid var(--line); }
.up-shot-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.up-shot-bar span { margin-left: auto; font-family: 'JetBrains Mono', monospace; font-size: 11.5px; color: var(--muted); }
.up-shot img { display: block; width: 100%; aspect-ratio: 16/10; object-fit: cover; object-position: top left; }
.up-shot figcaption { display: flex; align-items: center; gap: 12px; padding: 16px 18px; background: var(--fg); color: var(--bg); font-weight: 700; font-size: 15px; }
.up-shot figcaption b { font-size: 11.5px; font-family: 'JetBrains Mono', monospace; font-weight: 500; color: var(--accent-light); text-transform: uppercase; letter-spacing: .06em; }

/* challenges */
.up-ch { display: grid; grid-template-columns: 320px 1fr; gap: 40px; }
.up-ch-nav { display: flex; flex-direction: column; border-top: 1px solid var(--fg); }
.up-ch-nav button { text-align: left; padding: 20px 0; border-bottom: 1px solid var(--line); font-size: 17px; font-weight: 700; color: var(--muted); display: flex; gap: 14px; align-items: baseline; transition: color .2s; }
.up-ch-nav button small { font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 500; }
.up-ch-nav button.on { color: var(--fg); }
.up-ch-nav button.on small { color: var(--accent); }
.up-ch-body { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; animation: aUp .4s both; align-content: start; }
.up-ch-body > div { background: var(--surface); border-radius: var(--radius); padding: 26px 26px 28px; }
.up-ch-body b { font-size: 17px; letter-spacing: -0.02em; }
.up-ch-body p { font-size: 14.5px; color: var(--muted); margin-top: 10px; }

.up-ba { margin-top: 72px; background: #0f1220; color: #fff; border-radius: var(--radius); padding: 48px; display: grid; grid-template-columns: 300px 1fr; gap: 40px; }
.up-ba .eyebrow { color: var(--accent-light); }
.up-ba h3 { font-size: 28px; letter-spacing: -0.03em; line-height: 1.35; }
.up-ba-g { display: grid; grid-template-columns: 56px repeat(4, 1fr); gap: 10px; }
.up-ba-g .lb { writing-mode: vertical-rl; transform: rotate(180deg); display: grid; place-items: center; font-weight: 700; font-size: 14px; color: rgba(255,255,255,.5); }
.up-ba-g .lb.sol { color: var(--accent-light); }
.up-ba-g .pr { border: 1px solid rgba(255,255,255,.14); border-radius: 10px; padding: 18px; }
.up-ba-g .pr small { display: block; font-size: 12.5px; font-weight: 700; color: rgba(255,255,255,.55); margin-bottom: 10px; }
.up-ba-g .pr p { font-size: 14px; color: rgba(255,255,255,.75); }
.up-ba-g .sl { background: #fff; color: #15171c; border-radius: 10px; padding: 18px; display: flex; align-items: center; }
.up-ba-g .sl p { font-size: 15px; font-weight: 700; line-height: 1.45; }

/* features */
.up-fnav { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.up-fnav button { padding: 12px 18px; border-radius: 10px; border: 1px solid var(--line); font-weight: 700; font-size: 16px; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; transition: .2s; }
.up-fnav button small { font-size: 11px; font-weight: 600; color: var(--accent); }
.up-fnav button.on { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.up-fnav button.on small { color: var(--accent-light); }
.up-feat { display: grid; grid-template-columns: 1fr 1.35fr; gap: 40px; align-items: center; padding: 40px; background: var(--surface); border-radius: var(--radius); animation: aUp .4s both; }
.up-feat-txt h3 { font-size: 32px; letter-spacing: -0.03em; }
.up-feat-txt .d { font-size: 15.5px; color: var(--muted); margin-top: 12px; }
.up-feat-txt ul { list-style: none; margin-top: 28px; border-top: 1px solid var(--line); }
.up-feat-txt li { padding: 16px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.up-feat-txt li b { font-size: 16px; }
.up-feat-txt li span { font-size: 14px; color: var(--muted); }
.up-feat-img { margin: 0; border-radius: 12px; overflow: hidden; background: #fff; box-shadow: 0 20px 40px -24px rgba(15,18,32,.35); }
.up-feat-img img { display: block; width: 100%; }
.up-pipe { margin-top: 20px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 18px 22px; border: 1px dashed var(--line); border-radius: var(--radius); }
.up-pipe .lb { font-size: 13px; font-weight: 700; color: var(--muted); margin-right: 8px; }
.up-pipe button { height: 36px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); font-weight: 700; font-size: 14px; background: var(--bg); }
.up-pipe button.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.up-pipe i { font-style: normal; color: var(--muted); }

/* why */
.up-why { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.up-why > div { border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
.up-why h4 { font-size: 22px; letter-spacing: -0.03em; line-height: 1.4; margin: 20px 0 20px; }
.up-why dl > div { display: grid; grid-template-columns: 170px 1fr; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.up-why dt { font-weight: 700; font-size: 14.5px; color: var(--accent); }
.up-why dd { font-size: 14px; color: var(--muted); margin: 0; }

/* architecture */
.up-arch { display: grid; grid-template-columns: 1.25fr 1fr; gap: 16px; }
.up-stack { background: #0f1220; color: #fff; border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 8px; }
.up-stack-h { display: flex; flex-direction: column; gap: 4px; padding-bottom: 16px; margin-bottom: 4px; border-bottom: 1px solid rgba(255,255,255,.12); }
.up-stack-h b { font-size: 18px; }
.up-stack-h span { font-size: 13px; color: var(--accent-light); }
.up-row { display: grid; grid-template-columns: 130px 1fr 170px; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 8px; background: rgba(255,255,255,.05); }
.up-row .ly { font-family: 'JetBrains Mono', monospace; font-size: 11.5px; color: rgba(255,255,255,.5); }
.up-row .ch { display: flex; flex-wrap: wrap; gap: 6px; }
.up-row em { font-style: normal; font-size: 12.5px; font-weight: 600; padding: 6px 10px; border-radius: 6px; background: rgba(255,255,255,.07); color: rgba(255,255,255,.45); }
.up-row em.on { background: var(--accent); color: #fff; }
.up-row .nt { font-size: 12.5px; font-weight: 700; color: rgba(255,255,255,.8); text-align: right; }
.up-foot { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-family: 'JetBrains Mono', monospace; font-size: 12px; color: rgba(255,255,255,.55); }
.up-foot span { padding: 8px 12px; border: 1px dashed rgba(255,255,255,.25); border-radius: 6px; }
.up-foot i { flex: 1; border-top: 2px dashed rgba(255,255,255,.2); }
.up-arch-side { display: flex; flex-direction: column; gap: 16px; }
.up-model { background: var(--surface); border-radius: var(--radius); padding: 24px 26px; }
.up-model h5 { font-size: 13px; font-weight: 700; color: var(--accent); margin-bottom: 6px; }
.up-model > div { padding: 12px 0; border-bottom: 1px solid var(--line); }
.up-model > div:last-child { border-bottom: 0; padding-bottom: 0; }
.up-model b { font-size: 15.5px; }
.up-model p { font-size: 13.5px; color: var(--muted); margin-top: 4px; }
.up-apps { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.up-apps > div { border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 30px; }
.up-apps > div.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.up-apps small { font-family: 'JetBrains Mono', monospace; font-size: 11.5px; color: var(--muted); }
.up-apps h4 { font-size: 24px; letter-spacing: -0.03em; margin: 10px 0 4px; }
.up-apps b { font-size: 14.5px; color: var(--accent); }
.up-apps p { font-size: 14.5px; color: var(--muted); margin-top: 12px; }

.up-ews { margin-top: 72px; }
.up-ews-h h3 { font-size: 30px; letter-spacing: -0.03em; }
.up-ews-h p { color: var(--muted); font-size: 15.5px; margin-top: 10px; max-width: 760px; }
.up-ews-g { display: grid; grid-template-columns: 240px 1fr 1.3fr; gap: 32px; margin-top: 32px; align-items: start; }
.up-ews-list { display: flex; flex-direction: column; border-top: 1px solid var(--fg); }
.up-ews-list button { text-align: left; display: flex; gap: 14px; align-items: baseline; padding: 16px 0; border-bottom: 1px solid var(--line); font-weight: 700; font-size: 17px; color: var(--muted); }
.up-ews-list em { font-style: normal; font-size: 22px; font-weight: 800; color: var(--line); letter-spacing: -0.03em; transition: color .2s; }
.up-ews-list button.on { color: var(--fg); }
.up-ews-list button.on em { color: var(--accent); }
.up-ews-body { animation: aUp .4s both; padding-top: 8px; }
.up-ews-body p { font-size: 17px; font-weight: 600; line-height: 1.55; letter-spacing: -0.02em; }
.up-ews-body ul { list-style: none; margin-top: 20px; }
.up-ews-body li { position: relative; padding: 10px 0 10px 20px; font-size: 14.5px; color: var(--muted); border-top: 1px solid var(--line); }
.up-ews-body li::before { content: ''; position: absolute; left: 0; top: 20px; width: 8px; height: 2px; background: var(--accent); }
.up-ews-body small { display: block; margin-top: 10px; font-size: 12px; color: var(--muted); }
.up-ews-img { margin: 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.up-ews-img img { display: block; width: 100%; }

/* roadmap */
.up-road { display: grid; grid-template-columns: 1fr 1.5fr 1fr; gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.up-road > div { padding: 32px 28px; border-right: 1px solid var(--line); position: relative; }
.up-road > div:last-child { border-right: 0; }
.up-road > div.on { background: color-mix(in oklch, var(--accent) 7%, var(--bg)); }
.up-road > div.on::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--accent); }
.up-road .hd small { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--accent); }
.up-road .hd h4 { font-size: 22px; letter-spacing: -0.03em; margin: 8px 0 6px; }
.up-road .pk { font-size: 13px; font-weight: 700; color: var(--muted); cursor: pointer; }
.up-road .pk:hover { color: var(--accent); }
.up-road ul { list-style: none; margin-top: 24px; display: flex; flex-direction: column; gap: 8px; }
.up-road li { padding: 12px 14px; border-radius: 8px; background: var(--surface); font-weight: 600; font-size: 14.5px; }
.up-road > div.on li { background: var(--bg); }
.up-road .gp { margin-top: 24px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.up-road .gp > div { display: flex; flex-direction: column; gap: 6px; }
.up-road .gp b { font-size: 13px; color: var(--accent); margin-bottom: 2px; }
.up-road .gp span { padding: 10px 12px; border-radius: 8px; background: var(--surface); font-weight: 600; font-size: 14px; }
.up-road > div.on .gp span { background: var(--bg); }

/* cases */
.up-cases { display: grid; grid-template-columns: 280px 1fr; gap: 32px; align-items: start; }
.up-clist { display: flex; flex-direction: column; gap: 6px; }
.up-clist button { text-align: left; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; column-gap: 8px; padding: 14px 16px; border-radius: 10px; border: 1px solid var(--line); transition: .2s; }
.up-clist small { font-size: 12px; font-weight: 700; color: var(--muted); }
.up-clist b { font-size: 15.5px; grid-column: 1; }
.up-clist .pks { grid-row: 1 / 3; grid-column: 2; display: flex; gap: 3px; align-self: center; }
.up-clist .pks i { font-style: normal; font-size: 10.5px; font-weight: 700; padding: 3px 6px; border-radius: 4px; background: var(--surface); color: var(--muted); }
.up-clist .pks i.me { background: color-mix(in oklch, var(--accent) 14%, var(--bg)); color: var(--accent); }
.up-clist button.on { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.up-clist button.on small { color: rgba(255,255,255,.6); }
.up-clist button.on .pks i { background: rgba(255,255,255,.12); color: rgba(255,255,255,.7); }
.up-clist button.on .pks i.me { background: var(--accent); color: #fff; }
.up-cbody { animation: aUp .4s both; }
.up-cbody .meta { display: flex; gap: 12px; align-items: center; }
.up-cbody .meta b { font-size: 15px; }
.up-cbody h3 { font-size: 26px; letter-spacing: -0.03em; line-height: 1.4; margin: 14px 0 24px; }
.up-cg { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.up-cg > div { padding: 28px; border-radius: var(--radius); background: var(--surface); }
.up-cg > div.sol { background: color-mix(in oklch, var(--accent) 9%, var(--bg)); }
.up-cg span { font-size: 13px; font-weight: 700; color: var(--accent); }
.up-cg ul { list-style: none; margin-top: 14px; }
.up-cg li { position: relative; padding: 9px 0 9px 18px; font-size: 14.5px; color: var(--muted); }
.up-cg .sol li { color: var(--fg); font-weight: 600; }
.up-cg li::before { content: ''; position: absolute; left: 0; top: 19px; width: 7px; height: 2px; background: var(--accent); }
.up-ctab { border-top: 1px solid var(--fg); }
.up-ctab > div { display: grid; grid-template-columns: 130px 1fr 1fr; border-bottom: 1px solid var(--line); }
.up-ctab > div > * { padding: 16px 16px; font-size: 14.5px; }
.up-ctab > div > *:first-child { padding-left: 0; }
.up-ctab .hd > span { font-size: 14px; font-weight: 700; display: flex; flex-direction: column; gap: 2px; }
.up-ctab .hd small { font-size: 12px; color: var(--muted); font-weight: 500; }
.up-ctab span { color: var(--muted); }
.up-ctab .to { background: color-mix(in oklch, var(--accent) 7%, var(--bg)); color: var(--fg); font-weight: 600; }
.up-ctab .hd .to { background: var(--accent); color: #fff; border-radius: 10px 10px 0 0; }
.up-ctab .hd .to small { color: rgba(255,255,255,.75); }
.up-cbody .sum { margin-top: 20px; padding: 18px 20px; border-radius: var(--radius); background: var(--fg); color: var(--bg); font-size: 15px; font-weight: 600; }

/* lineup */
.up-line { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.up-line > div { border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; display: flex; flex-direction: column; cursor: pointer; transition: border-color .2s, transform .2s; }
.up-line > div:hover { border-color: var(--fg); }
.up-line > div.on { background: var(--fg); color: var(--bg); border-color: var(--fg); cursor: default; }
.up-line .cd { display: flex; align-items: baseline; justify-content: space-between; }
.up-line .cd b { font-size: 40px; letter-spacing: -0.04em; color: var(--accent); }
.up-line > div.on .cd b { color: var(--accent-light); }
.up-line .cd span { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--muted); }
.up-line h4 { font-size: 21px; letter-spacing: -0.02em; margin-top: 18px; }
.up-line .ct { font-size: 14.5px; font-weight: 600; margin-top: 4px; color: var(--muted); }
.up-line > div.on .ct, .up-line > div.on .cd span, .up-line > div.on .cp { color: rgba(255,255,255,.62); }
.up-line ul { list-style: none; margin: 18px 0; }
.up-line li { padding: 8px 0; font-size: 14px; border-top: 1px solid var(--line); }
.up-line > div.on li { border-color: rgba(255,255,255,.14); }
.up-line .im { padding: 14px 16px; border-radius: 8px; background: var(--surface); font-weight: 700; font-size: 14.5px; }
.up-line > div.on .im { background: rgba(255,255,255,.08); }
.up-line .im small { display: block; font-size: 11px; font-family: 'JetBrains Mono', monospace; color: var(--accent); font-weight: 500; margin-bottom: 4px; }
.up-line > div.on .im small { color: var(--accent-light); }
.up-line .cp { font-size: 12.5px; color: var(--muted); margin-top: 14px; }
.up-line em { font-style: normal; font-weight: 700; font-size: 14px; margin-top: auto; padding-top: 20px; color: var(--accent); }
.up-line em.cur { color: rgba(255,255,255,.5); }

@container site (max-width: 900px) {
  .up-switch { display: flex; width: 100%; }
  .up-switch button { flex: 1; flex-direction: column; gap: 0; padding: 8px 10px; font-size: 11.5px; }
  .up-hero h1 { font-size: 34px; }
  .up-points > div { font-size: 14px; }
  .up-ch, .up-ba, .up-feat, .up-arch, .up-apps, .up-ews-g, .up-cases, .up-cg, .up-line, .up-why { grid-template-columns: minmax(0, 1fr); }
  .up-ch { gap: 16px; }
  .up-ch-nav { flex-direction: row; overflow-x: auto; scrollbar-width: none; border-top: 0; border-bottom: 1px solid var(--line); gap: 18px; }
  .up-ch-nav button { flex: none; border-bottom: 0; font-size: 14.5px; padding: 12px 0; }
  .up-ch-body { grid-template-columns: minmax(0, 1fr); }
  .up-ch-body > div { padding: 20px; }
  .up-ba { padding: 24px; gap: 20px; margin-top: 40px; }
  .up-ba h3 { font-size: 21px; }
  .up-ba-g { grid-template-columns: 1fr 1fr; }
  .up-ba-g .lb { writing-mode: horizontal-tb; transform: none; grid-column: 1 / -1; justify-content: start; }
  .up-feat { padding: 20px; gap: 24px; }
  .up-feat-txt h3 { font-size: 24px; }
  .up-fnav button { font-size: 13.5px; padding: 10px 12px; }
  .up-why > div { padding: 22px; }
  .up-why dl > div { grid-template-columns: 1fr; gap: 4px; }
  .up-stack { padding: 18px; }
  .up-row { grid-template-columns: 1fr; gap: 8px; }
  .up-row .nt { text-align: left; }
  .up-ews { margin-top: 48px; }
  .up-ews-h h3 { font-size: 23px; }
  .up-ews-list { flex-direction: row; overflow-x: auto; scrollbar-width: none; gap: 16px; border-top: 0; border-bottom: 1px solid var(--line); }
  .up-ews-list button { flex: none; border-bottom: 0; font-size: 14.5px; }
  .up-road { grid-template-columns: minmax(0, 1fr); }
  .up-road > div { border-right: 0; border-bottom: 1px solid var(--line); padding: 22px; }
  .up-road .gp { grid-template-columns: 1fr 1fr 1fr; }
  .up-clist { flex-direction: row; overflow-x: auto; scrollbar-width: none; }
  .up-clist button { flex: none; min-width: 170px; }
  .up-cbody h3 { font-size: 20px; }
  .up-cg > div { padding: 20px; }
  .up-ctab { overflow-x: auto; }
  .up-ctab > div { min-width: 560px; }
  .up-line > div { padding: 22px; }
}
