/* trbr.today — стили по дизайн-канвасу (Noosphere). Токены — в tokens.css. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--surface); color: var(--text); font-family: 'IBM Plex Sans', system-ui, sans-serif; font-size: 15px; line-height: 1.45; }
a { color: var(--primary); } a:hover { color: var(--primary-hover); }
button { font: inherit; color: inherit; }
input, textarea, select { font: inherit; }
h1, h2, h3, p, dl, dd { margin: 0; }
.mono { font-family: 'IBM Plex Mono', monospace; }
.hidden { display: none !important; }

/* типографика */
.eyebrow { font-family: 'IBM Plex Mono', monospace; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-meta); }
.eyebrow.inverse { color: rgba(255,255,255,.7); }
.rule { width: 48px; height: 3px; background: var(--accent); }
.h-display { font-family: 'Unbounded', sans-serif; font-weight: 600; font-size: 40px; line-height: 1.1; letter-spacing: -0.02em; }
.h-display.sm { font-size: 28px; line-height: 1.15; }
.h-section { font-family: 'Unbounded', sans-serif; font-weight: 600; font-size: 20px; letter-spacing: -0.02em; }
.muted { color: var(--text-muted); } .meta { color: var(--text-meta); } .subtle { color: var(--text-subtle); }
.small { font-size: 13px; } .s14 { font-size: 14px; }
.serif-num { font-family: 'Literata', Georgia, serif; font-weight: 500; font-size: 40px; line-height: 1; }

/* каркас */
.shell { min-height: 100vh; display: flex; flex-wrap: wrap; }
.sidenav { flex: 0 0 248px; background: var(--surface-inverse); color: var(--text-inverse); padding: 28px 16px; display: flex; flex-direction: column; gap: 32px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; }
.brand-mark { width: 32px; height: 32px; flex-shrink: 0; border: 1.5px solid rgba(255,255,255,.85); border-radius: 6px; display: flex; align-items: center; justify-content: center; font-family: 'Unbounded', sans-serif; font-weight: 600; font-size: 15px; }
.brand-name { font-family: 'Unbounded', sans-serif; font-weight: 600; font-size: 15px; letter-spacing: -0.02em; }
.brand-host { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: rgba(255,255,255,.7); }
.navlist { display: flex; flex-direction: column; gap: 2px; }
.navlink { height: 44px; display: flex; align-items: center; gap: 12px; padding: 0 12px; border-radius: 4px; color: rgba(255,255,255,.82); text-decoration: none; font-size: 15px; }
.navlink:hover { color: #fff; background: rgba(255,255,255,.08); }
.navlink[aria-current="page"] { background: rgba(255,255,255,.12); color: #fff; font-weight: 500; }
.navlink .ico { width: 20px; height: 20px; flex-shrink: 0; }
.nav-bottom { margin-top: auto; border-top: 1px solid rgba(255,255,255,.18); padding-top: 16px; display: flex; flex-direction: column; gap: 2px; }
.nav-bottom .navlink { font-size: 14px; }
.nav-me { display: flex; align-items: center; gap: 10px; padding: 8px 12px; font-size: 14px; color: rgba(255,255,255,.82); }
.topbar { display: none; }
.main { flex: 1 1 560px; min-width: 0; padding: 40px 48px 64px; display: flex; flex-direction: column; gap: 40px; }
.main.tight { gap: 32px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.page-title { display: flex; flex-direction: column; gap: 12px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* иконки */
.ico { width: 20px; height: 20px; display: inline-block; vertical-align: middle; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.ico.sm { width: 14px; height: 14px; }

/* кнопки */
.btn { height: 44px; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 6px; border: 1px solid transparent; background: transparent; cursor: pointer; font-size: 15px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.btn:focus-visible, .navlink:focus-visible, .chip:focus-visible, .seg button:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.btn.primary { background: var(--primary); color: var(--on-primary); } .btn.primary:hover { background: var(--primary-hover); }
.btn.secondary { border-color: var(--border-strong); color: var(--text); background: var(--surface-elevated); } .btn.secondary:hover { border-color: var(--text-muted); }
.btn.quiet { color: var(--primary); } .btn.quiet:hover { background: var(--primary-soft); }
.btn.danger { color: var(--danger); } .btn.danger:hover { background: var(--danger-soft); }
.btn.sm { height: 36px; padding: 0 12px; font-size: 14px; }
.btn.lg { height: 52px; font-size: 16px; font-weight: 600; }
.btn.full { width: 100%; }
.btn:disabled { opacity: .55; cursor: default; }
.btn.icon-only { width: 36px; padding: 0; }

/* теги, чипы, сегменты */
.tag { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 4px; font-size: 12px; font-weight: 500; white-space: nowrap; background: var(--surface-sunken); color: var(--text-muted); }
.tag.primary { background: var(--primary-soft); color: var(--on-primary-soft); }
.tag.accent { background: var(--accent-soft); color: var(--on-accent-soft); }
.tag.info { background: var(--info-soft); color: var(--info-strong); }
.tag.success { background: var(--success-soft); color: var(--success-strong); }
.tag.warning { background: var(--warning-soft); color: var(--warning-strong); }
.tag.danger { background: var(--danger-soft); color: var(--danger-strong); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { height: 32px; padding: 0 12px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface-elevated); color: var(--text); font-size: 13px; cursor: pointer; }
.chip.on { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.seg { display: inline-flex; padding: 3px; border-radius: 6px; background: var(--surface-sunken); border: 1px solid var(--border); }
.seg button { height: 36px; padding: 0 14px; border: 0; border-radius: 4px; background: transparent; cursor: pointer; font-size: 14px; color: var(--text-muted); }
.seg button.on { background: var(--surface-elevated); color: var(--text); font-weight: 500; box-shadow: var(--shadow-card); }

/* чекбокс и переключатель */
.cb { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; min-height: 24px; }
.cb input { position: absolute; opacity: 0; width: 0; height: 0; }
.cb .box { width: 22px; height: 22px; flex-shrink: 0; border: 1.5px solid var(--border-strong); border-radius: 5px; background: var(--surface-elevated); display: inline-flex; align-items: center; justify-content: center; }
.cb .box::after { content: ''; width: 6px; height: 11px; border: solid var(--on-primary); border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); opacity: 0; }
.cb input:checked + .box { background: var(--primary); border-color: var(--primary); } .cb input:checked + .box::after { opacity: 1; }
.cb input:focus-visible + .box { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.cb .lbl { font-size: 15px; } .cb input:checked ~ .lbl { color: var(--text-subtle); text-decoration: line-through; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track { width: 40px; height: 24px; border-radius: 12px; background: var(--border-strong); position: relative; transition: background .15s; flex-shrink: 0; }
.switch .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .15s; }
.switch input:checked + .track { background: var(--primary); } .switch input:checked + .track::after { left: 19px; }
.switch input:focus-visible + .track { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

/* аватар */
.avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: #fff; font-weight: 600; flex-shrink: 0; width: 40px; height: 40px; font-size: 15px; }
.avatar.lg { width: 48px; height: 48px; font-size: 18px; } .avatar.sm { width: 28px; height: 28px; font-size: 12px; } .avatar.xs { width: 32px; height: 32px; font-size: 13px; }

/* списки и статистика */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.stat { padding: 20px; display: flex; flex-direction: column; gap: 6px; border-left: 1px solid var(--border); }
.stat:first-child { padding-left: 0; border-left: 0; }
.stat-num { font-family: 'IBM Plex Mono', monospace; font-weight: 500; font-size: 32px; line-height: 1.1; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 48px; }
.block { display: flex; flex-direction: column; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 12px; }
.row { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-top: 1px solid var(--border); }
.row.link { color: inherit; text-decoration: none; } .row.link:hover { background: var(--surface-elevated); margin: 0 -12px; padding-left: 12px; padding-right: 12px; }
.row-grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row-title { font-size: 15px; font-weight: 500; overflow-wrap: anywhere; }
.row-date { width: 64px; flex-shrink: 0; display: flex; flex-direction: column; font-family: 'IBM Plex Mono', monospace; }
.row-date b { font-weight: 500; font-size: 15px; } .row-date span { font-size: 12px; color: var(--text-meta); }
.row-right { width: 72px; text-align: right; font-family: 'IBM Plex Mono', monospace; font-size: 14px; color: var(--text-muted); white-space: nowrap; }
.row .edit { opacity: 0; transition: opacity .1s; } .row:hover .edit, .row:focus-within .edit { opacity: 1; }
.list-end { border-top: 1px solid var(--border); }
.empty { padding: 24px 0; color: var(--text-muted); font-size: 14px; border-top: 1px solid var(--border); }
.done .row-title { color: var(--text-subtle); text-decoration: line-through; font-weight: 400; }
.people-strip { display: flex; flex-wrap: wrap; gap: 32px; }
.person { display: flex; align-items: center; gap: 12px; }
.card { background: var(--surface-elevated); border-radius: 10px; padding: 20px; display: flex; flex-direction: column; gap: 16px; box-shadow: var(--shadow-card); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.aside { flex: 1 1 320px; min-width: 0; max-width: 420px; }
.progress { height: 6px; background: var(--surface-sunken); border-radius: 3px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--primary); }
.facts div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--border); }
.facts dt { font-size: 13px; color: var(--text-muted); } .facts dd { font-family: 'IBM Plex Mono', monospace; font-size: 13px; text-align: right; overflow-wrap: anywhere; }
.plans-wrap { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.plans-list { flex: 999 1 480px; min-width: 0; }

/* заметки */
.notes-main { padding: 0; gap: 0; flex-direction: row; flex-wrap: wrap; }
.notes-list { flex: 1 1 360px; min-width: 0; padding: 40px 24px 40px 48px; border-right: 1px solid var(--border); display: flex; flex-direction: column; gap: 20px; }
.notes-article { flex: 2 1 480px; min-width: 0; padding: 40px 56px 64px; display: flex; flex-direction: column; gap: 24px; background: var(--surface-elevated); }
.note-row { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; gap: 4px; padding: 14px 12px; margin: 0 -12px; border-top: 1px solid var(--border); border-radius: 4px; }
.note-row:hover { background: var(--surface-sunken); } .note-row.on { background: var(--primary-soft); }
.note-row:focus-visible { outline: 2px solid var(--focus-ring); }
.note-row .t { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.note-body { font-size: 17px; line-height: 1.6; max-width: 680px; white-space: pre-line; overflow-wrap: anywhere; }
.note-locked { padding: 20px; border-radius: 8px; background: var(--surface-sunken); display: flex; flex-direction: column; gap: 12px; align-items: flex-start; max-width: 680px; }
.check-list { display: flex; flex-direction: column; max-width: 680px; }
.check-list .cb { min-height: 44px; border-bottom: 1px solid var(--border); }
.article-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.byline { display: flex; align-items: center; gap: 10px; padding-bottom: 20px; border-bottom: 1px solid var(--border); font-size: 14px; color: var(--text-muted); }
.article-title { font-family: 'Unbounded', sans-serif; font-weight: 600; font-size: 32px; line-height: 1.15; letter-spacing: -0.02em; max-width: 720px; overflow-wrap: anywhere; }

/* формы */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 500; color: var(--text-muted); }
.field input, .field textarea, .field select { height: 44px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--surface-elevated); color: var(--text); font-size: 15px; width: 100%; }
.field textarea { height: auto; min-height: 120px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--focus-ring); outline-offset: 1px; border-color: var(--focus-ring); }
.field .hint { font-size: 12px; color: var(--text-subtle); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-error { color: var(--danger); font-size: 14px; }
.search input { height: 44px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--surface-elevated); width: 100%; font-size: 15px; }

/* модальное окно */
.modal { border: 0; border-radius: 12px; padding: 0; width: min(560px, calc(100% - 32px)); max-height: calc(100dvh - 32px); background: var(--surface-elevated); color: var(--text); box-shadow: var(--shadow-modal); }
.modal::backdrop { background: rgba(15,31,77,.45); }
.modal form { display: flex; flex-direction: column; gap: 16px; padding: 28px; }
.modal-foot { display: flex; justify-content: space-between; gap: 8px; padding-top: 8px; flex-wrap: wrap; }
.modal-foot .spacer { flex: 1; }

/* выбор «кто вы» */
.whoami { position: fixed; inset: 0; background: var(--surface); display: flex; align-items: center; justify-content: center; padding: 24px; z-index: 10; }
.whoami-box { display: flex; flex-direction: column; gap: 24px; max-width: 560px; width: 100%; }
.who-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.who-btn { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-elevated); cursor: pointer; text-align: left; }
.who-btn:hover { border-color: var(--primary); }

/* вход */
.login-body { min-height: 100vh; }
.login { min-height: 100vh; display: flex; flex-wrap: wrap; }
.login-brand { flex: 1 1 480px; min-height: 320px; padding: 48px 56px; background: var(--surface-inverse); color: var(--text-inverse); display: flex; flex-direction: column; justify-content: space-between; gap: 48px; }
.login-brand > div { display: flex; flex-direction: column; gap: 24px; }
.badge { align-self: flex-start; font-family: 'IBM Plex Mono', monospace; font-size: 13px; padding: 4px 8px; border: 1px solid rgba(255,255,255,.4); border-radius: 4px; letter-spacing: .02em; }
.login-logo { font-family: 'Unbounded', sans-serif; font-weight: 600; font-size: 72px; line-height: 1; letter-spacing: -0.02em; color: var(--text-inverse); }
.login-form-wrap { flex: 999 1 440px; padding: 48px 56px; display: flex; flex-direction: column; justify-content: center; align-items: center; }
.login-form { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 24px; }

/* телефон */
@media (max-width: 899px) {
  .shell { flex-direction: column; }
  .sidenav { position: static; height: auto; flex: none; padding: 0; gap: 0; }
  .sidenav .brand { height: 60px; padding: 0 16px; }
  .sidenav .brand-host, .sidenav .nav-bottom .navlink span, .sidenav .navlist { display: none; }
  .sidenav .nav-bottom { position: absolute; right: 8px; top: 8px; border: 0; padding: 0; margin: 0; flex-direction: row; align-items: center; }
  .shell { position: relative; }
  .nav-me { padding: 8px; }
  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; height: calc(72px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); display: grid; grid-auto-flow: column; grid-auto-columns: minmax(57px, 1fr); overflow-x: auto; scrollbar-width: none; border-top: 1px solid var(--border); background: var(--surface-elevated); z-index: 5; }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-decoration: none; font-size: 10px; letter-spacing: -.01em; color: var(--text-muted); min-width: 0; }
  .tabbar a[aria-current="page"] { color: var(--primary); font-weight: 600; }
  .tabbar .ico { width: 22px; height: 22px; }
  .main { padding: 24px 16px calc(96px + env(safe-area-inset-bottom)); gap: 24px; }
  .h-display { font-size: 26px; line-height: 1.15; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-num { font-size: 24px; } .stat { padding: 14px 12px; } .stat:first-child { padding-left: 0; } .stat:nth-child(3) { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--border); padding-left: 0; }
  .two-col { gap: 32px; }
  .notes-list { padding: 24px 16px; border-right: 0; border-bottom: 1px solid var(--border); }
  .notes-article { padding: 24px 16px 40px; }
  .notes-main { padding: 0 0 calc(96px + env(safe-area-inset-bottom)); }
  .article-title { font-size: 24px; }
  .row .edit { opacity: 1; }
  .field-row { grid-template-columns: 1fr; }
  .login-brand { padding: 32px 24px; min-height: 240px; } .login-logo { font-size: 56px; } .login-form-wrap { padding: 32px 24px; }
}
@media (min-width: 900px) { .tabbar { display: none; } }
@media print { .sidenav, .tabbar, .actions, .edit { display: none !important; } .main { padding: 0; } }

/* дополнения */
.nav-me { border: 0; background: transparent; cursor: pointer; width: 100%; text-align: left; }
.goal-title { all: unset; cursor: pointer; font-weight: 500; font-size: 15px; } .goal-title:hover { color: var(--primary); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--surface-inverse); color: #fff; padding: 10px 16px; border-radius: 8px; font-size: 14px; z-index: 20; box-shadow: var(--shadow-popover); }
@media (max-width: 899px) { .toast { bottom: calc(96px + env(safe-area-inset-bottom)); } }

/* страницы */
.page-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.page-card { display: flex; flex-direction: column; background: var(--surface-elevated); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow-card); color: inherit; text-decoration: none; border: 1px solid transparent; }
.page-card:hover { border-color: var(--border-strong); color: inherit; }
.page-cover { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--surface-sunken); }
.page-card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; }
.page-card-title { font-family: 'Unbounded', sans-serif; font-weight: 600; font-size: 18px; letter-spacing: -0.02em; line-height: 1.2; }

/* менталитет */
.ment-bar { height: 6px; }
.ment-card .page-card-body { gap: 10px; padding-top: 18px; }

/* принципы */
.tabbar::-webkit-scrollbar { display: none; }
.prin-group { gap: 0; }
.prin-row { align-items: flex-start; gap: 16px; }
.prin-n { width: 32px; flex-shrink: 0; font-weight: 500; font-size: 15px; padding-top: 1px; }
.prin-note { max-width: 46rem; padding-top: 14px; font-family: 'Literata', Georgia, serif; font-size: 15px; line-height: 1.55; }

/* компьютер Бори: белая страница с холодным голубым акцентом. Свои токены, чтобы тёмная тема сайта подхватилась одной заменой */
.pc { --pc-bg: #ffffff; --pc-card: #ffffff; --pc-soft: #f3f8fc; --pc-line: #d9e4ee; --pc-accent: #2f6f9f; --pc-accent-strong: #22557c; --pc-ice: #dce9f4; --pc-text: #16212b; --pc-muted: #566472; --pc-up: #8f6210; --pc-down: #1f6b50;
  background: var(--pc-bg); color: var(--pc-text); }
:root[data-theme="dark"] .pc, :root[data-theme$="-dark"] .pc, [data-theme="dark"] .pc, [data-theme$="-dark"] .pc {
  --pc-bg: #0f1419; --pc-card: #161d24; --pc-soft: #1a242d; --pc-line: #2a3945; --pc-accent: #7cc0ee; --pc-accent-strong: #a9d8f6; --pc-ice: #1f3443; --pc-text: #e8eef3; --pc-muted: #9fb0bd; --pc-up: #e3b55a; --pc-down: #7fcfaa; }
.pc .rule { background: var(--pc-accent); }
.pc .eyebrow { color: var(--pc-muted); }
.pc-muted { color: var(--pc-muted); }
.pc .btn.secondary { background: var(--pc-card); color: var(--pc-text); border-color: var(--pc-line); }
.pc .btn.secondary:hover:not(:disabled) { border-color: var(--pc-accent); color: var(--pc-accent-strong); }
.pc-hero { display: flex; flex-direction: column; gap: 24px; }
.pc-desc { font-size: 17px; color: var(--pc-muted); max-width: 44rem; }
.pc-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.pc-stat { background: var(--pc-soft); border: 1px solid var(--pc-line); border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pc-stat .v { font-family: 'IBM Plex Mono', monospace; font-weight: 500; font-size: 26px; line-height: 1.15; white-space: nowrap; }
.pc-bar { height: 6px; border-radius: 3px; background: var(--pc-ice); overflow: hidden; margin-top: 4px; }
.pc-bar i { display: block; height: 100%; background: var(--pc-accent); border-radius: 3px; }
.pc-sec { display: flex; flex-direction: column; gap: 16px; }
.pc-sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px 16px; flex-wrap: wrap; border-bottom: 1px solid var(--pc-line); padding-bottom: 10px; }
.pc-cards { display: flex; flex-direction: column; gap: 14px; }
.pc-card { background: var(--pc-card); border: 1px solid var(--pc-line); border-radius: 14px; padding: 20px; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; scroll-margin-top: 16px; }
.pc-card.bought { border-color: var(--pc-accent); }
.pc-main { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 16px; align-content: start; }
.pc-ico { width: 48px; height: 48px; border-radius: 12px; background: var(--pc-ice); color: var(--pc-accent-strong); display: flex; align-items: center; justify-content: center; }
.pc-ico .ico { width: 26px; height: 26px; }
.pc-main-body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pc-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pc .pc-cat { color: var(--pc-accent-strong); font-weight: 500; }
.pc-model { margin: 0; font-size: 19px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.pc-model.sm { font-size: 15px; }
.pc-price-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.pc-price { font-family: 'IBM Plex Mono', monospace; font-weight: 500; font-size: 24px; white-space: nowrap; }
.pc-price.sm { font-size: 16px; }
.pc-delta { font-family: 'IBM Plex Mono', monospace; font-size: 13px; white-space: nowrap; color: var(--pc-muted); }
.pc-delta.up { color: var(--pc-up); } .pc-delta.down { color: var(--pc-down); }
.pc-note { font-size: 14px; color: var(--pc-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-why { font-size: 15px; margin: 0; } .pc-why b { font-weight: 600; }
.pc-shop { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.pc-store { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 4px; font-size: 12px; font-weight: 600; background: var(--pc-ice); color: var(--pc-accent-strong); white-space: nowrap; }
.pc-store.none { background: transparent; border: 1px dashed var(--pc-line); color: var(--pc-muted); font-weight: 400; }
.pc-alts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pc-alt { border: 1px solid var(--pc-line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 6px; background: var(--pc-soft); min-width: 0; }
.pc-alt .pc-shop { margin-top: auto; padding-top: 6px; }
.pc-alt.empty { border-style: dashed; background: transparent; color: var(--pc-muted); font-size: 14px; justify-content: center; min-height: 96px; }
.pc-alt.empty.main { min-height: 72px; align-items: flex-start; }
.pc-alt-toggle { display: none; }
.pc-weeks { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.pc-week { border: 1px solid var(--pc-line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 6px; min-width: 0; background: var(--pc-card); }
.pc-week.now { border-color: var(--pc-accent); background: var(--pc-soft); }
.pc-week-head { display: flex; justify-content: space-between; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 14px; font-weight: 500; padding-bottom: 4px; }
.pc-chip { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; padding: 6px 8px; border-radius: 6px; background: var(--pc-ice); color: var(--pc-text); text-decoration: none; }
.pc-chip:hover { color: var(--pc-accent-strong); } .pc-chip .mono { white-space: nowrap; color: var(--pc-muted); }
.pc-chip.ordered { outline: 1px solid var(--pc-accent); }
.pc-mark { font-size: 13px; font-weight: 600; padding: 6px 8px; border-radius: 6px; border: 1px dashed var(--pc-accent); color: var(--pc-accent-strong); }
.pc-week-sum { margin-top: auto; padding-top: 6px; font-size: 13px; text-align: right; border-top: 1px solid var(--pc-line); }
.pc-dad { border: 1px solid var(--pc-line); border-radius: 12px; overflow: hidden; }
.pc-dad-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) minmax(0, 1fr); gap: 0 20px; padding: 12px 16px; border-top: 1px solid var(--pc-line); font-size: 15px; }
.pc-dad-row:first-child { border-top: 0; }
.pc-dad-row.head { background: var(--pc-soft); font-family: 'IBM Plex Mono', monospace; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--pc-muted); }
.pc-dad-row.total { background: var(--pc-soft); }
.pc-dad-row .k { color: var(--pc-muted); } .pc-dad-row .lab { display: none; }
.pc-x { font-family: 'IBM Plex Mono', monospace; font-size: 13px; color: var(--pc-accent-strong); white-space: nowrap; }
@media (max-width: 1240px) { .pc-card { grid-template-columns: 1fr; } }
@media (max-width: 899px) {
  .pc-card { padding: 16px; gap: 12px; }
  .pc-main { grid-template-columns: 40px minmax(0, 1fr); gap: 12px; } .pc-ico { width: 40px; height: 40px; border-radius: 10px; }
  .pc-model { font-size: 17px; } .pc-price { font-size: 21px; } .pc-stat .v { font-size: 22px; }
  .pc-note { white-space: normal; }
  .pc-alt-toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid var(--pc-line); border-radius: 10px; background: var(--pc-soft); color: var(--pc-text); font-size: 14px; font-weight: 500; cursor: pointer; }
  .pc-alt-toggle .chev { font-family: 'IBM Plex Mono', monospace; font-size: 18px; color: var(--pc-accent-strong); }
  .pc-card:not(.open) .pc-alts { display: none; }
  .pc-alts { grid-template-columns: 1fr; }
  .pc-alt.empty { min-height: 56px; }
  .pc-weeks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pc-dad-row { grid-template-columns: 1fr; gap: 4px; } .pc-dad-row.head { display: none; }
  .pc-dad-row .lab { display: inline; color: var(--pc-muted); font-size: 13px; }
  .pc-dad-row .k { font-family: 'IBM Plex Mono', monospace; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
}
@media (max-width: 400px) { .pc-weeks { grid-template-columns: 1fr; } .pc-stats { grid-template-columns: 1fr 1fr; } .pc-stat { padding: 12px; } .pc-stat .v { font-size: 18px; } }
.pc-back { align-self: flex-start; color: var(--pc-accent-strong); text-decoration: none; margin-bottom: -12px; }
.pc-back:hover { text-decoration: underline; color: var(--pc-accent-strong); }

/* компьютер Бори: фотографии элементов */
.pc-main.has-photo { grid-template-columns: 148px minmax(0, 1fr); gap: 20px; }
.pc-photo { margin: 0; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pc-photo a { display: block; aspect-ratio: 1 / 1; border-radius: 12px; border: 1px solid var(--pc-line); background: #ffffff; overflow: hidden; }
.pc-photo img { width: 100%; height: 100%; object-fit: contain; padding: 8px; display: block; }
.pc-photo figcaption { font-family: 'IBM Plex Mono', monospace; font-size: 10px; color: var(--pc-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-photo .pc-ico { display: none; }
.pc-photo.noimg a, .pc-photo.noimg figcaption { display: none; } .pc-photo.noimg .pc-ico { display: flex; }
.pc-photo.thumb a { aspect-ratio: 16 / 10; border-radius: 8px; } .pc-photo.thumb img { padding: 6px; }
.pc-photo.thumb { margin-bottom: 4px; }
@media (max-width: 899px) { .pc-main.has-photo { grid-template-columns: 96px minmax(0, 1fr); gap: 14px; } .pc-photo.thumb a { aspect-ratio: 16 / 9; } }
@media (max-width: 400px) { .pc-main.has-photo { grid-template-columns: 84px minmax(0, 1fr); gap: 12px; } }

/* компьютер Бори: расчёт по выбранным вариантам */
.pc-pick { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px 0 10px; border: 1px solid var(--pc-line); border-radius: 18px; font-size: 13px; font-weight: 500; cursor: pointer; background: var(--pc-card); color: var(--pc-text); align-self: flex-start; margin-top: 2px; }
.pc-pick input { accent-color: var(--pc-accent); width: 16px; height: 16px; margin: 0; cursor: pointer; }
.pc-pick:hover { border-color: var(--pc-accent); }
.pc-pick.on { border-color: var(--pc-accent); background: var(--pc-ice); color: var(--pc-accent-strong); }
.pc-pick:has(input:disabled) { opacity: .6; cursor: default; }
.pc-pick:has(input:focus-visible) { outline: 2px solid var(--pc-accent); outline-offset: 2px; }
.pc-alt.picked { border-color: var(--pc-accent); box-shadow: inset 0 0 0 1px var(--pc-accent); background: var(--pc-card); }
.pc-card.alt-picked { border-color: var(--pc-accent); }
.pc-card.alt-picked .pc-main .pc-price { color: var(--pc-muted); text-decoration: line-through; text-decoration-thickness: 1px; }
.pc-calc { position: sticky; top: 8px; z-index: 4; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding: 12px 16px; border: 1px solid var(--pc-line); border-radius: 12px; background: var(--pc-soft); margin: -16px 0; box-shadow: 0 6px 18px -12px rgba(22, 33, 43, .35); }
.pc-calc.on { border-color: var(--pc-accent); background: var(--pc-ice); }
.pc-calc-sum { display: flex; flex-direction: column; gap: 2px; }
.pc-calc-sum b { font-size: 20px; font-weight: 500; white-space: nowrap; }
.pc-calc-text { flex: 1 1 220px; color: var(--pc-muted); min-width: 0; }
.pc-calc.on .pc-calc-text { color: var(--pc-text); }
.pc-alt-toggle b { font-weight: 600; color: var(--pc-accent-strong); }
@media (max-width: 899px) { .pc-calc { top: 6px; padding: 8px 12px; margin: -8px 0; gap: 4px 12px; } .pc-calc .eyebrow { display: none; } .pc-calc-sum b { font-size: 18px; } .pc-calc .btn { order: 2; margin-left: auto; height: 32px; } .pc-calc-text { order: 3; flex-basis: 100%; font-size: 13px; } }
.pc-order { max-width: 44rem; border-left: 3px solid var(--pc-accent); padding-left: 12px; }

/* компьютер Бори: снимки сборок */
.pc-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.pc-shot { margin: 0; display: flex; flex-direction: column; border: 1px solid var(--pc-line); border-radius: 12px; overflow: hidden; background: var(--pc-card); min-width: 0; }
.pc-shot > a { display: block; aspect-ratio: 16 / 9; background: var(--pc-soft); }
.pc-shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pc-shot figcaption { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.pc-shot-src { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--pc-muted); }
.pc-shot-src a { color: var(--pc-accent-strong); }
@media (max-width: 400px) { .pc-gallery { grid-template-columns: 1fr; } }
