:root {
  --line: rgba(119, 104, 80, 0.16);
  --accent-border: rgba(129, 99, 51, 0.22);
  --button-line: rgba(129, 99, 51, 0.22);
  --button-surface: rgba(255, 250, 240, 0.72);
  --accent-soft: rgba(234, 215, 178, 0.48);
  --surface: rgba(255, 253, 248, 0.68);
  --surface-strong: rgba(255, 253, 248, 0.76);
  --card: rgba(255, 253, 248, 0.7);
  --button-tint: rgba(251, 243, 226, 0.72);
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  background:
    linear-gradient(180deg, rgba(127, 95, 45, 0.05), transparent 26%),
    linear-gradient(180deg, #fbf8f2, #f3ecdf);
}

.shell {
  width: min(1500px, calc(100vw - 34px));
}

.app-frame,
.mast,
.pl-workspace-mast,
.workspace-tools,
.pl-workspace-tools,
.account-bar,
.pl-account-bar,
.free-delay-banner,
.top-report-filter,
.rail,
.feature,
.section,
.panel,
.command-bar,
.table-card,
.chart-card,
.support-chart,
.composite-section,
.metric,
.stat,
.setup-group,
.pick-row,
.record-card,
.summary-card,
.filter-form,
.chart-panel {
  border-color: #d8d0c2 !important;
}

.app-frame,
.mast,
.pl-workspace-mast {
  background:
    linear-gradient(135deg, rgba(255, 253, 248, 0.78), rgba(248, 243, 234, 0.64)) !important;
}

.workspace-tools,
.pl-workspace-tools,
.account-bar,
.pl-account-bar,
.free-delay-banner,
.top-report-filter,
.rail,
.feature,
.section,
.panel,
.command-bar,
.table-card,
.chart-card,
.support-chart,
.composite-section,
.setup-group,
.chart-panel {
  background: rgba(255, 253, 248, 0.68) !important;
}

.workspace-head,
.pl-workspace-head,
.section-head,
.section-bar,
.composite-section-title,
.support-chart-title,
.chart-head,
.record-head,
.topbar,
thead,
tr,
td,
th {
  border-color: rgba(119, 104, 80, 0.14) !important;
}

.workspace-tool,
.pl-workspace-tool {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.workspace-tool.active,
.pl-workspace-tool.active,
.tabs a.active,
.segment-tab.active {
  background: rgba(234, 215, 178, 0.62) !important;
  box-shadow: inset 0 0 0 1px rgba(129, 99, 51, 0.22) !important;
}

.workspace-tool.active,
.pl-workspace-tool.active {
  background: transparent !important;
  box-shadow: none !important;
}

.workspace-tool:hover,
.pl-workspace-tool:hover,
.button:hover,
.nav a:hover,
.table-link:hover,
.action-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(23, 22, 22, 0.05) !important;
}

.workspace-tool:hover,
.pl-workspace-tool:hover {
  background: transparent !important;
  box-shadow: none !important;
  transform: none;
}

.button,
.button.primary,
button,
select,
input,
.tabs a,
.nav a,
.chart-link-internal,
.chart-link-external,
.table-link,
.action-link,
.field button,
.pl-account-bar a,
.pl-account-bar button,
.pl-account-bar select {
  border: 0.5px solid rgba(119, 104, 80, 0.34) !important;
  background: rgba(255, 250, 240, 0.74) !important;
  box-shadow: none !important;
}

.tabs a {
  border: 0.5px solid rgba(119, 104, 80, 0.34) !important;
  background: #fffaf0 !important;
}

.tabs a.active {
  border-color: #c9a66a !important;
  background: #ead7b2 !important;
}

.button.primary,
.chart-link-internal,
.chart-link-external {
  background: rgba(255, 250, 240, 0.74) !important;
  border-color: rgba(129, 99, 51, 0.22) !important;
  color: #5e4212 !important;
}

.table-link,
.chart-link-external,
.action-link {
  color: #5e4212 !important;
}

.brandname,
.pl-brandname,
.brand-logo {
  filter: saturate(0.96);
}

.stat-band {
  background: transparent !important;
  gap: 20px !important;
  border: 0 !important;
}

.stat {
  background: transparent !important;
}

.metric {
  background: rgba(255, 253, 248, 0.54) !important;
}

.story,
.pick-row,
.composite-card,
.support-chart,
tbody tr {
  border-color: rgba(119, 104, 80, 0.12) !important;
}

.story-index,
.rank-box {
  background: transparent !important;
  border: 0 !important;
  color: #d9c294 !important;
  box-shadow: none !important;
}

.chart-modal-shell,
.date-picker-panel {
  border-color: rgba(119, 104, 80, 0.22) !important;
  box-shadow: 0 22px 54px rgba(23, 22, 22, 0.16) !important;
}

@media (max-width: 720px) {
  .shell {
    width: min(100vw - 18px, 1500px);
  }

  .account-bar,
  .pl-account-bar {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch !important;
    justify-content: stretch !important;
    gap: 8px !important;
    padding: 10px !important;
  }

  .account-bar > span,
  .pl-account-bar > span {
    grid-column: 1 / -1;
    justify-self: stretch;
    text-align: center;
    line-height: 1.35;
  }

  .account-bar > a,
  .pl-account-bar > a,
  .account-bar > form,
  .pl-account-bar > form {
    width: 100%;
    min-width: 0;
  }

  .account-bar a,
  .account-bar button,
  .pl-account-bar a,
  .pl-account-bar button {
    width: 100%;
    min-height: 38px;
    padding: 8px;
    text-align: center;
  }

  .account-bar select,
  .pl-account-bar select {
    width: 100%;
    min-height: 38px;
  }

  .account-bar > .plan-switcher,
  .pl-account-bar > .pl-plan-switcher,
  .account-bar > a[href="/register"],
  .pl-account-bar > a[href="/register"],
  .account-bar > form[action="/logout"],
  .pl-account-bar > form[action="/logout"] {
    grid-column: 1 / -1;
  }

  .account-bar .plan-switcher,
  .pl-account-bar .pl-plan-switcher {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(72px, auto);
    align-items: stretch;
    gap: 6px;
  }

  .free-delay-banner a {
    justify-content: center;
    text-align: center;
  }
}

@media (display-mode: standalone) and (max-width: 720px) {
  .shell {
    margin-top: max(14px, env(safe-area-inset-top));
    margin-bottom: max(34px, env(safe-area-inset-bottom));
  }
}
