/*
 * PayFlow AI — public demo styles
 *
 * Design goal: a restrained fintech/SaaS interface rather than a generic
 * "AI neon" landing page. PayPal blue is used as the primary accent while
 * typography, spacing and borders carry most of the visual hierarchy.
 */

:root {
  --page: #0b1016;
  --surface: #111820;
  --surface-raised: #161f29;
  --surface-soft: #0e151d;
  --border: #27323e;
  --border-soft: #202a34;
  --text: #f4f7fa;
  --text-secondary: #aab6c2;
  --text-muted: #768594;
  --accent: #4d9cff;
  --accent-hover: #68abff;
  --accent-soft: rgba(77, 156, 255, 0.11);
  --success: #55c995;
  --success-soft: rgba(85, 201, 149, 0.09);
  --paypal: #ffc439;
  --paypal-hover: #ffd05e;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--page);
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--page);
  color: var(--text);
  font-family: 'DM Sans', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.noise {
  display: none;
}

/* -------------------------------------------------------------------------- */
/* Header                                                                     */
/* -------------------------------------------------------------------------- */

header {
  position: relative;
  z-index: 10;
  width: min(100% - 40px, var(--max-width));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-soft);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-family: Manrope, sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand b {
  color: var(--text-secondary);
  font-weight: 600;
}

.mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #1877f2;
  color: white;
  font-size: 14px;
  font-weight: 800;
}

nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

nav a,
footer a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
}

nav a:hover,
footer a:hover {
  color: var(--text);
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 500;
}

.status-pill span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c4974a;
}

.status-pill.ok span {
  background: var(--success);
}

/* -------------------------------------------------------------------------- */
/* Hero                                                                       */
/* -------------------------------------------------------------------------- */

.hero {
  width: min(100% - 40px, 920px);
  margin: 0 auto;
  padding: 94px 0 72px;
  text-align: center;
}

.eyebrow,
.kicker {
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 850px;
  margin: 17px auto 22px;
  color: var(--text);
  font-family: Manrope, sans-serif;
  font-size: clamp(46px, 6.5vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.hero h1 em {
  color: #a9cfff;
  font-style: normal;
}

.hero > p {
  max-width: 670px;
  margin: 0 auto;
  color: var(--text-secondary);
  font-size: 17px;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 30px 0 28px;
}

.btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 15px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  appearance: none;
  cursor: pointer;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.primary {
  background: var(--accent);
  color: #06101c;
}

.primary:hover {
  background: var(--accent-hover);
}

.ghost {
  border-color: var(--border);
  background: var(--surface);
  color: var(--text);
}

.ghost:hover {
  border-color: #3b4958;
  background: var(--surface-raised);
}

.trust {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 22px;
  color: var(--text-muted);
  font-size: 11px;
}

/* -------------------------------------------------------------------------- */
/* Application shell                                                          */
/* -------------------------------------------------------------------------- */

.workspace {
  width: min(100% - 40px, var(--max-width));
  min-height: 700px;
  margin: 0 auto 110px;
  display: grid;
  grid-template-columns: 215px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.sidebar {
  min-width: 0;
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border-soft);
  background: var(--surface-soft);
}

.side-title {
  padding: 5px 10px 12px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.side {
  width: 100%;
  min-height: 42px;
  margin: 1px 0;
  padding: 9px 10px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  text-align: left;
  font-size: 13px;
  font-weight: 500;
}

.side span {
  width: 18px;
  color: var(--text-muted);
  font-size: 15px;
  text-align: center;
}

.side b {
  margin-left: auto;
  padding: 2px 7px;
  border-radius: 999px;
  background: #202a34;
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 600;
}

.side:hover,
.side.active {
  border-color: var(--border-soft);
  background: #18212b;
  color: var(--text);
}

.side.active span {
  color: var(--accent);
}

.side-foot {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
}

.mini {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px;
}

.mini-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #141d27;
  color: var(--accent);
  font-size: 9px;
  font-weight: 800;
}

.mini-icon.pp {
  color: #72aaff;
}

.mini strong,
.mini small {
  display: block;
}

.mini strong {
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
}

.mini small {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 9px;
}

.panel {
  min-width: 0;
  padding: 36px 38px 44px;
}

.panel-head {
  margin-bottom: 25px;
}

.panel-head h2,
.how h2 {
  margin: 7px 0 8px;
  color: var(--text);
  font-family: Manrope, sans-serif;
  font-size: 29px;
  line-height: 1.2;
  letter-spacing: -0.035em;
}

.panel-head p {
  max-width: 650px;
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.65;
}

/* -------------------------------------------------------------------------- */
/* Form                                                                       */
/* -------------------------------------------------------------------------- */

.brief-form {
  padding: 22px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.grid2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}

label {
  display: block;
  margin-bottom: 16px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
}

input,
textarea {
  width: 100%;
  margin-top: 7px;
  padding: 11px 12px;
  border: 1px solid #303c49;
  border-radius: var(--radius-sm);
  outline: none;
  background: #0b1219;
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: #5f9eea;
  box-shadow: 0 0 0 2px rgba(77, 156, 255, 0.12);
}

textarea {
  min-height: 150px;
}

.money {
  position: relative;
}

.money span {
  position: absolute;
  top: 18px;
  left: 12px;
  color: var(--text-muted);
}

.money input {
  padding-left: 26px;
}

.form-foot,
.approve-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.hint,
.safe {
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.5;
}

.safe {
  color: #7fcba5;
}

/* -------------------------------------------------------------------------- */
/* Proposal and project cards                                                 */
/* -------------------------------------------------------------------------- */

.result-card,
.project-card {
  margin-top: 18px;
  padding: 22px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.project-card {
  margin-top: 0;
  margin-bottom: 12px;
}

.result-top,
.project-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.result-top h3 {
  max-width: 650px;
  margin: 6px 0 0;
  font-family: Manrope, sans-serif;
  font-size: 19px;
  line-height: 1.35;
  letter-spacing: -0.025em;
}

.project-title h3 {
  margin: 0;
  font-family: Manrope, sans-serif;
  font-size: 15px;
  line-height: 1.45;
}

.project-title small {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 10px;
}

.project-budget {
  color: var(--text);
  font-family: Manrope, sans-serif;
  font-size: 17px;
  font-weight: 700;
  white-space: nowrap;
}

.badge,
.chip,
.guard {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #131c25;
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 500;
  line-height: 1;
}

.badge {
  padding: 7px 9px;
  white-space: nowrap;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 14px 0;
}

.chip {
  padding: 6px 8px;
}

.columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 22px;
  margin-top: 17px;
}

.sub {
  margin-bottom: 9px;
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.clean {
  margin: 0;
  padding: 0;
  list-style: none;
}

.clean li {
  padding: 7px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
  color: #c3ccd6;
  font-size: 12px;
  line-height: 1.45;
}

/* -------------------------------------------------------------------------- */
/* Milestone payment plan                                                     */
/* -------------------------------------------------------------------------- */

.milestones {
  margin-top: 19px;
}

.milestone {
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--border-soft);
}

.num {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 600;
}

.ms-title {
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}

.ms-desc {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 10px;
  line-height: 1.45;
}

.amount {
  color: var(--text);
  font-family: Manrope, sans-serif;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.ms-status {
  min-width: 72px;
  color: #83b8ee;
  font-size: 9px;
  font-weight: 600;
  text-align: right;
}

.pay-btn {
  min-height: 36px;
  padding: 8px 11px;
  background: var(--paypal);
  color: #101820;
  font-size: 11px;
}

.pay-btn:hover {
  background: var(--paypal-hover);
}

.approve-row {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
}

/* AI safeguards are intentionally subtle: visible to judges without turning
 * the product into an "AI-themed" interface. */
.safeguards {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 17px;
}

.safeguards .sub {
  flex-basis: 100%;
  margin-bottom: 0;
}

.guard {
  padding: 6px 8px;
  border-color: rgba(85, 201, 149, 0.22);
  background: var(--success-soft);
  color: #85d2aa;
}

/* -------------------------------------------------------------------------- */
/* Activity                                                                   */
/* -------------------------------------------------------------------------- */

.timeline {
  position: relative;
}

.event {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 11px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-soft);
}

.event-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--accent);
  font-size: 9px;
  font-weight: 700;
}

.event strong {
  font-size: 12px;
  font-weight: 600;
}

.event p {
  margin: 3px 0 0;
  color: var(--text-muted);
  font-size: 10px;
}

.event time {
  color: var(--text-muted);
  font-size: 9px;
  white-space: nowrap;
}

.empty {
  padding: 34px 20px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  text-align: center;
  font-size: 12px;
}

/* -------------------------------------------------------------------------- */
/* How it works                                                               */
/* -------------------------------------------------------------------------- */

.how {
  width: min(100% - 40px, var(--max-width));
  margin: 0 auto 115px;
}

.how > h2 {
  max-width: 570px;
  font-size: 36px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 26px;
}

.steps article {
  min-height: 178px;
  padding: 19px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.steps b {
  color: var(--accent);
  font-size: 10px;
}

.steps h3 {
  margin: 31px 0 7px;
  font-family: Manrope, sans-serif;
  font-size: 15px;
}

.steps p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.55;
}

/* -------------------------------------------------------------------------- */
/* Footer and feedback                                                        */
/* -------------------------------------------------------------------------- */

footer {
  width: min(100% - 40px, var(--max-width));
  margin: 0 auto;
  padding: 25px 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--border-soft);
  color: var(--text-muted);
  font-size: 10px;
}

.toast {
  position: fixed;
  z-index: 100;
  right: 18px;
  bottom: 18px;
  max-width: min(360px, calc(100vw - 36px));
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #17212b;
  color: var(--text);
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.hidden {
  display: none !important;
}

.spinner {
  width: 13px;
  height: 13px;
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-top-color: #06101c;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* -------------------------------------------------------------------------- */
/* Tablet                                                                     */
/* -------------------------------------------------------------------------- */

@media (max-width: 900px) {
  header {
    width: min(100% - 32px, var(--max-width));
  }

  nav {
    display: none;
  }

  .hero {
    width: min(100% - 32px, 760px);
    padding: 76px 0 62px;
  }

  .workspace {
    width: min(100% - 24px, var(--max-width));
    grid-template-columns: 1fr;
    margin-bottom: 85px;
  }

  .sidebar {
    padding: 8px;
    flex-direction: row;
    gap: 4px;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border-soft);
    scrollbar-width: none;
  }

  .sidebar::-webkit-scrollbar {
    display: none;
  }

  .side-title,
  .side-foot {
    display: none;
  }

  .side {
    width: auto;
    min-width: max-content;
    margin: 0;
    padding: 8px 11px;
  }

  .side b {
    margin-left: 2px;
  }

  .panel {
    padding: 30px 28px 38px;
  }

  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* -------------------------------------------------------------------------- */
/* Mobile                                                                     */
/* -------------------------------------------------------------------------- */

@media (max-width: 600px) {
  header {
    width: calc(100% - 28px);
    height: 62px;
  }

  .brand {
    font-size: 14px;
  }

  .mark {
    width: 28px;
    height: 28px;
  }

  .status-pill {
    max-width: 128px;
    padding: 6px 8px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .hero {
    width: calc(100% - 32px);
    padding: 54px 0 48px;
    text-align: left;
  }

  .eyebrow {
    font-size: 9px;
  }

  .hero h1 {
    margin: 13px 0 17px;
    font-size: clamp(38px, 12vw, 52px);
    line-height: 1.04;
  }

  .hero h1 br {
    display: none;
  }

  .hero > p {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
    margin: 24px 0 22px;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .trust {
    justify-content: flex-start;
    gap: 8px 14px;
    line-height: 1.4;
  }

  .workspace {
    width: calc(100% - 20px);
    min-height: 0;
    margin-bottom: 70px;
    border-radius: 12px;
  }

  .sidebar {
    padding: 7px;
    position: sticky;
    top: 0;
    z-index: 5;
    background: #0e151d;
  }

  .side {
    min-height: 38px;
    padding: 7px 9px;
    font-size: 11px;
  }

  .side span {
    width: 15px;
    font-size: 13px;
  }

  .panel {
    padding: 23px 14px 28px;
  }

  .panel-head {
    margin-bottom: 20px;
  }

  .panel-head h2 {
    margin-top: 6px;
    font-size: 24px;
  }

  .panel-head p {
    font-size: 12px;
  }

  .brief-form,
  .result-card,
  .project-card {
    padding: 15px;
    border-radius: 10px;
  }

  .grid2,
  .columns {
    grid-template-columns: 1fr;
    gap: 0;
  }

  input,
  textarea {
    min-height: 44px;
    font-size: 16px; /* Prevents iOS input zoom. */
  }

  textarea {
    min-height: 145px;
  }

  .form-foot,
  .approve-row,
  .result-top,
  .project-title {
    align-items: stretch;
    flex-direction: column;
  }

  .form-foot .btn,
  .approve-row .btn {
    width: 100%;
  }

  .result-top h3 {
    font-size: 17px;
  }

  .badge {
    align-self: flex-start;
  }

  .columns > div + div {
    margin-top: 16px;
  }

  .milestone {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 9px 10px;
    padding: 13px 0;
  }

  .num {
    grid-row: 1 / span 2;
  }

  .amount {
    grid-column: 2;
    justify-self: start;
  }

  .ms-status {
    grid-column: 2;
    min-width: 0;
    text-align: left;
  }

  .pay-btn {
    grid-column: 2;
    width: 100%;
    margin-top: 2px;
  }

  .safeguards {
    display: grid;
    grid-template-columns: 1fr;
  }

  .guard {
    width: fit-content;
    max-width: 100%;
    line-height: 1.35;
  }

  .event {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .event time {
    grid-column: 2;
  }

  .how {
    width: calc(100% - 32px);
    margin-bottom: 75px;
  }

  .how > h2 {
    font-size: 30px;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .steps article {
    min-height: 0;
  }

  .steps h3 {
    margin-top: 20px;
  }

  footer {
    width: calc(100% - 32px);
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  footer p {
    margin: 0;
  }

  .toast {
    right: 12px;
    bottom: 12px;
    max-width: calc(100vw - 24px);
  }
}

@media (max-width: 360px) {
  .status-pill {
    display: none;
  }

  .hero h1 {
    font-size: 37px;
  }

  .sidebar {
    gap: 2px;
  }

  .side {
    padding-inline: 8px;
  }
}

/* Very small phones: keep all three workspace tabs visible without scrolling. */
@media (max-width: 340px) {
  .sidebar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .side {
    min-width: 0;
    justify-content: center;
    padding-inline: 5px;
    font-size: 10px;
  }

  .side span,
  .side b {
    display: none;
  }
}


/* --------------------------------------------------------------------------
   Sidebar metrics
   -------------------------------------------------------------------------- */

.sidebar-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 1rem 0;
}

.sidebar-stat {
  padding: 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.sidebar-stat small {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sidebar-stat strong {
  font-size: 0.95rem;
  color: var(--text);
}

/* Judge preview banner: only shown through the stable /payflow-ai-preview route. */
.judge-banner {
  max-width: 1180px;
  margin: 24px auto 0;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid rgba(0, 156, 222, 0.34);
  border-radius: 16px;
  background: rgba(0, 156, 222, 0.08);
}

.judge-banner[hidden] {
  display: none;
}

.judge-banner div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: baseline;
}

.judge-banner span {
  color: var(--muted);
  font-size: 0.9rem;
}

.btn.small {
  min-height: 36px;
  padding: 8px 12px;
  font-size: 0.85rem;
}

@media (max-width: 720px) {
  .judge-banner {
    margin: 16px 16px 0;
    align-items: flex-start;
    flex-direction: column;
  }
}


/* --------------------------------------------------------------------------
   Mobile polish: compact product navigation and non-overflowing metrics
   -------------------------------------------------------------------------- */

@media (max-width: 900px) {
  .sidebar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: center;
    overflow: visible;
  }

  .side {
    min-width: 0;
    justify-content: center;
    white-space: nowrap;
  }

  .sidebar-stats {
    grid-column: 1 / -1;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
    margin: 6px 0 0;
    padding-top: 8px;
    border-top: 1px solid var(--border-soft);
  }
}

@media (max-width: 600px) {
  .workspace {
    width: calc(100% - 24px);
    border-color: #222d38;
    background: #10171f;
  }

  .sidebar {
    position: static;
    gap: 4px;
    padding: 8px;
    background: #0f161e;
  }

  .side {
    min-height: 44px;
    padding: 8px 6px;
    gap: 6px;
    border-radius: 8px;
    font-size: 12px;
  }

  .side span {
    width: auto;
    font-size: 14px;
  }

  .side b {
    margin-left: 0;
    padding: 1px 6px;
  }

  .sidebar-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin-top: 4px;
  }

  .sidebar-stat {
    min-width: 0;
    padding: 9px 10px;
    border-radius: 9px;
    background: #121b24;
  }

  .sidebar-stat small {
    margin-bottom: 2px;
    font-size: 9px;
    letter-spacing: 0.06em;
  }

  .sidebar-stat strong {
    display: block;
    overflow: hidden;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .panel {
    padding: 26px 16px 30px;
  }

  .panel-head h2 {
    max-width: 18ch;
    font-size: 28px;
    line-height: 1.08;
    letter-spacing: -0.035em;
  }

  .panel-head p {
    max-width: 34ch;
    font-size: 14px;
    line-height: 1.55;
  }

  .brief-form,
  .result-card,
  .project-card {
    padding: 16px;
    border-radius: 12px;
    background: #0e151d;
  }

  .kicker,
  .eyebrow {
    letter-spacing: 0.09em;
  }

  .trust {
    gap: 7px 12px;
    color: #8492a1;
    font-size: 10px;
  }
}

@media (max-width: 380px) {
  .side {
    font-size: 11px;
  }

  .side span {
    display: none;
  }
}
