:root {
  --bg: #f4f0e8;
  --bg-soft: #fffaf1;
  --panel: rgba(255, 250, 241, 0.7);
  --panel-strong: rgba(255, 248, 238, 0.74);
  --text: #211b16;
  --muted: #675d55;
  --line: rgba(33, 27, 22, 0.12);
  --line-strong: rgba(33, 27, 22, 0.22);
  --accent: #e56d3b;
  --accent-deep: #ba4d21;
  --accent-soft: rgba(229, 109, 59, 0.12);
  --teal: #127d75;
  --gold: #f0b75f;
  --shadow: 0 20px 55px rgba(64, 42, 18, 0.14);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: "IBM Plex Sans", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(240, 183, 95, 0.28), transparent 30%),
    radial-gradient(circle at top right, rgba(18, 125, 117, 0.18), transparent 25%),
    linear-gradient(180deg, #f9f3e7 0%, #f4efe8 50%, #efe6d7 100%);
  color: var(--text);
}

.ambient-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 1;
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(1440px, calc(100% - 36px));
  margin: 0 auto;
  padding: 26px 0 46px;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding: 16px 18px;
  border: 1px solid rgba(33, 27, 22, 0.08);
  border-radius: calc(var(--radius-lg) + 2px);
  background: rgba(255, 252, 247, 0.7);
  backdrop-filter: blur(10px);
  box-shadow: 0 14px 30px rgba(64, 42, 18, 0.08);
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar-brand strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.08rem, 1rem + 0.35vw, 1.32rem);
}

.brand-copy {
  display: grid;
  gap: 4px;
}

.brand-logo {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  border-radius: 18px;
  box-shadow: 0 14px 28px rgba(64, 42, 18, 0.12);
}

.topbar-brand span,
.topbar-note {
  color: var(--muted);
  font-size: 0.92rem;
}

.site-nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: end;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--text);
  border: 1px solid rgba(33, 27, 22, 0.08);
  background: rgba(255, 255, 255, 0.62);
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.nav-link:hover {
  transform: translateY(-2px);
}

.nav-link.active {
  border-color: rgba(229, 109, 59, 0.36);
  background: rgba(229, 109, 59, 0.12);
  color: var(--accent-deep);
}

.toolbot-dock {
  position: fixed;
  top: 24px;
  left: 24px;
  z-index: 25;
  width: min(360px, calc(100vw - 48px));
  display: grid;
  gap: 12px;
}

.toolbot-toggle {
  justify-self: start;
  border: 1px solid rgba(18, 125, 117, 0.16);
  border-radius: 999px;
  background: rgba(255, 250, 241, 0.72);
  box-shadow: 0 16px 34px rgba(35, 23, 12, 0.16);
  padding: 12px 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}

.toolbot-toggle-mark {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(229, 109, 59, 0.16), rgba(18, 125, 117, 0.18));
  color: var(--accent-deep);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.toolbot-panel {
  display: none;
  gap: 14px;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(33, 27, 22, 0.12);
  background:
    radial-gradient(circle at top left, rgba(229, 109, 59, 0.14), transparent 38%),
    radial-gradient(circle at top right, rgba(18, 125, 117, 0.12), transparent 34%),
    rgba(255, 249, 241, 0.72);
  box-shadow: 0 26px 56px rgba(33, 22, 10, 0.22);
  backdrop-filter: blur(12px);
}

.toolbot-panel.open {
  display: grid;
}

body[data-page="dashboard"] .toolbot-dock {
  position: static;
  top: auto;
  left: auto;
  transform: none;
  z-index: 3;
  width: min(420px, 100%);
  margin: 0 auto 22px;
}

body[data-page="dashboard"] .toolbot-toggle {
  justify-self: center;
}

.toolbot-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.toolbot-header h2 {
  margin: 6px 0 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.55rem;
}

.toolbot-close {
  min-height: 42px;
}

.toolbot-messages {
  display: grid;
  gap: 10px;
  max-height: 340px;
  overflow-y: auto;
  padding-right: 4px;
}

.toolbot-message {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(33, 27, 22, 0.08);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 10px 20px rgba(33, 22, 10, 0.06);
}

.toolbot-message.user {
  margin-left: 28px;
  background: rgba(229, 109, 59, 0.12);
}

.toolbot-message.assistant {
  margin-right: 28px;
}

.toolbot-message strong,
.toolbot-tool-card strong {
  display: block;
  margin-bottom: 6px;
}

.toolbot-message p,
.toolbot-message ul,
.toolbot-tool-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.toolbot-message ul {
  padding-left: 18px;
  margin-top: 10px;
}

.toolbot-tool-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.toolbot-tool-card {
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(33, 27, 22, 0.08);
}

.toolbot-tool-card p + p {
  margin-top: 6px;
}

.toolbot-card-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.toolbot-field textarea {
  min-height: 90px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(360px, 0.82fr);
  gap: 24px;
  align-items: stretch;
}

.page-header,
.info-panel,
.settings-card {
  border: 1px solid var(--line);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  border-radius: var(--radius-xl);
  background: var(--panel);
}

.page-header {
  margin-top: 12px;
  padding: 26px 28px;
  display: grid;
  gap: 12px;
}

.page-header h1,
.settings-card h2,
.info-panel h2 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
}

.page-header h1 {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
}

.page-header p,
.info-panel p,
.settings-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.dashboard-layout,
.settings-layout {
  display: grid;
  gap: 22px;
  margin-top: 22px;
}

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

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

.settings-card.full-span,
.info-panel.full-span {
  grid-column: 1 / -1;
}

.info-panel,
.settings-card {
  padding: 24px;
}

.section-heading {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.section-heading h3 {
  font-size: 1.45rem;
}

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

.support-preview-grid,
.guide-list,
.guide-columns {
  display: grid;
  gap: 14px;
}

.support-preview-grid,
.guide-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.dashboard-card {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(33, 27, 22, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 252, 246, 0.68));
}

.dashboard-card h3 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
}

.dashboard-card p {
  margin: 0;
}

.dashboard-link {
  text-decoration: none;
  color: inherit;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.dashboard-link:hover {
  transform: translateY(-2px);
  border-color: rgba(229, 109, 59, 0.42);
  box-shadow: 0 18px 30px rgba(229, 109, 59, 0.12);
}

.dashboard-tool-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.support-preview-panel .workspace-header {
  margin-bottom: 18px;
}

.support-preview-card,
.guide-card {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(33, 27, 22, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(255, 252, 246, 0.68));
}

.support-preview-card strong,
.guide-card strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.02rem;
}

.support-preview-card p,
.guide-card p {
  margin: 0;
  line-height: 1.7;
  color: var(--muted);
}

.support-preview-card a,
.guide-card a {
  color: var(--accent-deep);
  font-weight: 600;
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
}

.history-list,
.history-preview-list {
  display: grid;
  gap: 14px;
}

.history-item {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(33, 27, 22, 0.08);
  background: rgba(255, 255, 255, 0.66);
}

.history-item-preview {
  align-items: start;
}

.history-item strong,
.history-item-copy strong {
  display: block;
  margin-bottom: 6px;
}

.history-item p,
.history-item-copy p {
  margin: 0;
  color: var(--muted);
}

.history-item-copy {
  display: grid;
  gap: 6px;
}

.history-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: end;
}

.settings-stack {
  display: grid;
  gap: 18px;
}

.compact-empty {
  min-height: 200px;
}

.brand-block,
.hero-panel,
.tool-browser,
.workspace {
  border: 1px solid var(--line);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

.brand-block {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  padding: 34px;
  background:
    linear-gradient(135deg, rgba(255, 248, 238, 0.76), rgba(255, 244, 225, 0.62)),
    linear-gradient(160deg, rgba(229, 109, 59, 0.14), rgba(18, 125, 117, 0.1));
}

.brand-block::after {
  content: "";
  position: absolute;
  inset: auto -40px -40px auto;
  width: 180px;
  height: 180px;
  border-radius: 40px;
  background: linear-gradient(135deg, rgba(229, 109, 59, 0.18), rgba(240, 183, 95, 0.26));
  transform: rotate(18deg);
}

.brand-chip,
.pill,
.workspace-badges span,
.tool-card .category-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  line-height: 1;
}

.brand-chip {
  border: 1px solid rgba(18, 125, 117, 0.24);
  background: rgba(18, 125, 117, 0.1);
  color: var(--teal);
}

.brand-block h1 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(3rem, 9vw, 6rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.hero-title-lockup {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 16px 0 14px;
}

.hero-logo {
  width: clamp(72px, 10vw, 94px);
  height: clamp(72px, 10vw, 94px);
  border-radius: 28px;
  box-shadow: 0 22px 40px rgba(64, 42, 18, 0.16);
  flex: 0 0 auto;
}

.brand-block p,
.hero-note p,
.feature-item span,
.workspace-body p,
.tool-card p,
.field small,
.note-box p,
.output-card p,
.status-banner p,
.metric-list li,
.list-result li,
.empty-state p {
  color: var(--muted);
}

.brand-block > p {
  max-width: 58ch;
  font-size: 1.03rem;
  line-height: 1.7;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.stat-card {
  padding: 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.54);
  border: 1px solid rgba(33, 27, 22, 0.08);
}

.stat-kicker,
.workspace-kicker,
.tool-meta {
  display: block;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.74rem;
}

.stat-card strong {
  display: block;
  margin-top: 10px;
  font-size: 1.1rem;
}

.hero-panel {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(27, 23, 18, 0.8), rgba(39, 30, 20, 0.72)),
    linear-gradient(145deg, rgba(229, 109, 59, 0.26), transparent 50%);
  color: #fdf5ea;
}

.hero-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(255, 245, 234, 0.08);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.74rem;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #80efb8;
  box-shadow: 0 0 0 8px rgba(128, 239, 184, 0.1);
}

.hero-panel-body {
  padding: 24px 22px 26px;
  display: grid;
  gap: 20px;
}

.hero-note h2 {
  margin: 0 0 8px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.7rem;
}

.hero-note p,
.feature-item span {
  color: rgba(253, 245, 234, 0.76);
}

.feature-list {
  display: grid;
  gap: 12px;
}

.feature-item {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.feature-item strong {
  display: block;
  margin-bottom: 6px;
}

.main-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.98fr) minmax(0, 1.02fr);
  gap: 22px;
  margin-top: 22px;
  align-items: start;
}

.mobile-tools-switcher,
.mobile-workspace-back {
  display: none;
}

.mobile-tools-switcher {
  margin-top: 18px;
  padding: 8px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 250, 241, 0.74);
  box-shadow: 0 16px 30px rgba(64, 42, 18, 0.08);
  backdrop-filter: blur(10px);
}

.mobile-tools-tab {
  border: none;
  min-height: 46px;
  border-radius: 999px;
  padding: 12px 14px;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.mobile-tools-tab.active {
  background: rgba(229, 109, 59, 0.14);
  color: var(--accent-deep);
  box-shadow: inset 0 0 0 1px rgba(229, 109, 59, 0.18);
}

.ad-strip {
  margin-top: 22px;
}

.ad-strip-footer {
  margin-top: 24px;
}

.ad-slot {
  display: grid;
  gap: 10px;
}

.ad-slot-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(18, 125, 117, 0.2);
  background: rgba(18, 125, 117, 0.08);
  color: var(--teal);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ad-slot-card {
  border-radius: var(--radius-xl);
  border: 1px dashed rgba(33, 27, 22, 0.16);
  background:
    radial-gradient(circle at top left, rgba(229, 109, 59, 0.12), transparent 28%),
    radial-gradient(circle at top right, rgba(18, 125, 117, 0.1), transparent 25%),
    rgba(255, 249, 241, 0.7);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.ad-slot-card-live {
  border-style: solid;
  background: rgba(255, 255, 255, 0.68);
}

.ad-slot-banner .ad-slot-card,
.ad-slot-banner .adsbygoogle {
  min-height: 128px;
}

.ad-slot-inline .ad-slot-card,
.ad-slot-inline .adsbygoogle {
  min-height: 300px;
}

.ad-slot-card-fallback {
  display: grid;
  place-items: center;
  text-align: center;
  padding: 26px 22px;
}

.ad-slot-card-fallback strong {
  display: block;
  margin-bottom: 8px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.2rem;
}

.ad-slot-card-fallback p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  max-width: 58ch;
}

.ad-slot-card-fallback .small-text {
  margin-top: 10px;
}

.tool-browser,
.workspace {
  border-radius: var(--radius-xl);
  background: var(--panel);
  padding: 24px;
  min-width: 0;
}

.browser-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: end;
}

.search-field,
.field,
.split-field {
  display: grid;
  gap: 8px;
}

.search-field span,
.field span,
.section-heading span {
  font-weight: 600;
}

.search-field input,
.field input,
.field select,
.field textarea,
.inline-input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(33, 27, 22, 0.12);
  background: rgba(255, 255, 255, 0.74);
  border-radius: var(--radius-md);
  color: var(--text);
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.search-field input:focus,
.field input:focus,
.field select:focus,
.field textarea:focus,
.inline-input:focus {
  border-color: rgba(229, 109, 59, 0.64);
  box-shadow: 0 0 0 4px rgba(229, 109, 59, 0.12);
  transform: translateY(-1px);
}

.field textarea {
  min-height: 138px;
  resize: vertical;
}

.toolbar-note {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: rgba(18, 125, 117, 0.08);
  color: var(--teal);
  min-height: 54px;
  display: inline-flex;
  align-items: center;
}

.category-chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 18px 0 22px;
}

.chip {
  padding: 11px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.62);
  color: var(--text);
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.chip:hover,
.tool-card:hover,
.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover {
  transform: translateY(-2px);
}

.chip.active {
  border-color: rgba(229, 109, 59, 0.42);
  background: rgba(229, 109, 59, 0.14);
  color: var(--accent-deep);
}

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

.tool-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(33, 27, 22, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(255, 252, 246, 0.66));
  text-align: left;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.tool-card.active {
  border-color: rgba(229, 109, 59, 0.42);
  box-shadow: 0 18px 30px rgba(229, 109, 59, 0.12);
}

.tool-card-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.tool-icon {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(229, 109, 59, 0.18), rgba(240, 183, 95, 0.32));
  color: var(--accent-deep);
  display: grid;
  place-items: center;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.tool-card h3,
.workspace-header h2,
.section-heading h3,
.output-card h4,
.empty-state h3 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
}

.tool-card h3 {
  font-size: 1.14rem;
}

.tool-card p {
  margin: 0;
  line-height: 1.55;
}

.category-label {
  background: rgba(18, 125, 117, 0.08);
  color: var(--teal);
}

.workspace-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.workspace-header h2 {
  margin-top: 6px;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
}

.workspace-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: end;
}

.workspace-badges span {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.58);
}

.workspace-body {
  padding-top: 22px;
}

.tool-shell {
  display: grid;
  gap: 20px;
}

.tool-intro {
  display: grid;
  gap: 8px;
}

.tool-intro p {
  margin: 0;
  line-height: 1.7;
}

.note-box,
.status-banner,
.output-card,
.metric-card,
.resume-preview {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.66);
}

.note-box,
.status-banner {
  padding: 16px 18px;
}

.note-box strong,
.status-banner strong {
  display: block;
  margin-bottom: 6px;
}

.status-banner.success {
  border-color: rgba(18, 125, 117, 0.24);
  background: rgba(18, 125, 117, 0.08);
}

.status-banner.warn {
  border-color: rgba(229, 109, 59, 0.28);
  background: rgba(229, 109, 59, 0.08);
}

.status-banner.info {
  border-color: rgba(103, 93, 85, 0.18);
}

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

.field-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field-grid.single {
  grid-template-columns: minmax(0, 1fr);
}

.toggle-row,
.action-row,
.output-actions,
.metric-row,
.thumb-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
}

.primary-button,
.secondary-button,
.ghost-button {
  appearance: none;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 13px 18px;
  text-decoration: none;
  transition: transform 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

.primary-button {
  background: linear-gradient(135deg, var(--accent), #ff934d);
  color: #fff7ef;
  box-shadow: 0 14px 24px rgba(229, 109, 59, 0.24);
}

.secondary-button {
  background: rgba(18, 125, 117, 0.1);
  color: var(--teal);
}

.ghost-button {
  background: rgba(33, 27, 22, 0.06);
  color: var(--text);
}

.primary-button:disabled,
.secondary-button:disabled,
.ghost-button:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

.output-card {
  padding: 18px;
  display: grid;
  gap: 14px;
}

.output-card pre,
.text-output {
  margin: 0;
  padding: 16px;
  border-radius: var(--radius-md);
  background: rgba(33, 27, 22, 0.05);
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.preview-grid,
.metric-grid,
.thumb-grid {
  display: grid;
  gap: 14px;
}

.preview-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.thumb-grid {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.preview-pane,
.thumb-card,
.scan-preview {
  padding: 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid var(--line);
}

.preview-pane canvas,
.preview-pane img,
.thumb-card img,
.scan-preview canvas {
  width: 100%;
  border-radius: 12px;
  background: #fff;
}

.editor-preview-pane {
  display: grid;
  gap: 10px;
}

.editor-preview-pane h5 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.06rem;
}

.editor-preview-subtitle {
  margin: 0;
  color: var(--muted);
}

.editor-preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.editor-meta-chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(229, 109, 59, 0.1);
  color: var(--accent-deep);
  border: 1px solid rgba(229, 109, 59, 0.14);
  font-size: 0.84rem;
}

.editor-preview-copy {
  display: grid;
  gap: 10px;
}

.editor-preview-copy p,
.editor-preview-list {
  margin: 0;
}

.editor-slide-pane {
  align-content: start;
}

.file-editor-studio {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 18px;
  align-items: start;
}

.file-editor-canvas,
.file-editor-sidebar {
  display: grid;
  gap: 14px;
}

.file-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.62);
}

.file-editor-tool-button {
  min-height: 40px;
  padding-inline: 14px;
  font-size: 0.92rem;
}

.file-editor-page {
  display: grid;
  gap: 16px;
  min-height: 720px;
  padding: 24px;
  border-radius: 26px;
  border: 1px solid rgba(33, 27, 22, 0.09);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 253, 249, 0.76));
  box-shadow: 0 22px 40px rgba(33, 27, 22, 0.08);
}

.editor-page-header,
.editor-page-meta {
  display: grid;
  gap: 14px;
}

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

.editor-page-header.single,
.editor-page-meta {
  grid-template-columns: minmax(0, 1fr);
}

.editor-body-field {
  gap: 10px;
}

.editor-surface-shell {
  min-height: 420px;
  border-radius: 22px;
  border: 1px solid rgba(33, 27, 22, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 252, 248, 0.9));
  padding: 26px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.editor-surface {
  min-height: 360px;
  outline: none;
  line-height: 1.75;
  font-size: 1rem;
  position: relative;
}

.editor-surface[data-empty="true"]::before {
  content: attr(data-placeholder);
  color: rgba(103, 93, 85, 0.7);
  pointer-events: none;
  position: absolute;
  inset: 0 auto auto 0;
}

.editor-surface p,
.editor-surface ul,
.editor-surface ol,
.editor-surface blockquote,
.editor-surface h1,
.editor-surface h2 {
  margin: 0 0 14px;
}

.editor-surface h1,
.editor-surface h2 {
  font-family: "Space Grotesk", sans-serif;
  line-height: 1.24;
}

.editor-surface h1 {
  font-size: 1.85rem;
}

.editor-surface h2 {
  font-size: 1.35rem;
}

.editor-surface ul,
.editor-surface ol {
  padding-left: 22px;
}

.editor-surface blockquote {
  padding: 12px 16px;
  border-left: 4px solid rgba(229, 109, 59, 0.45);
  background: rgba(229, 109, 59, 0.08);
  border-radius: 12px;
}

.editor-surface hr {
  border: none;
  border-top: 1px solid rgba(33, 27, 22, 0.12);
  margin: 18px 0;
}

.editor-source-field {
  display: none;
}

.editor-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.editor-status-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.editor-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(18, 125, 117, 0.16);
  background: rgba(18, 125, 117, 0.08);
  color: var(--teal);
  font-size: 0.88rem;
  font-weight: 600;
}

.compact-note {
  padding: 14px 16px;
}

.metric-grid {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.metric-card {
  padding: 18px;
}

.metric-card strong {
  display: block;
  margin-top: 10px;
  font-size: 1.35rem;
}

.metric-list,
.list-result {
  margin: 0;
  padding-left: 18px;
}

.resume-preview {
  padding: 24px;
  display: grid;
  gap: 14px;
}

.resume-header {
  display: grid;
  gap: 8px;
}

.resume-header h3 {
  margin: 0;
  font-size: 1.8rem;
}

.resume-header p {
  margin: 0;
}

.resume-section {
  display: grid;
  gap: 8px;
}

.resume-section h4 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
}

.resume-section ul {
  margin: 0;
  padding-left: 18px;
}

.qr-preview {
  display: inline-flex;
  padding: 14px;
  border-radius: var(--radius-md);
  background: #fff;
  border: 1px solid var(--line);
}

.empty-state {
  min-height: 340px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 32px;
  border-radius: var(--radius-lg);
  border: 1px dashed var(--line-strong);
  background: rgba(255, 255, 255, 0.48);
}

.footer-copy,
.small-text {
  font-size: 0.9rem;
  color: var(--muted);
}

.helper-inline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

@media (min-width: 1280px) {
  .page-shell {
    width: min(1500px, calc(100% - 48px));
  }

  .hero {
    grid-template-columns: minmax(0, 1.12fr) minmax(420px, 0.88fr);
    gap: 28px;
  }

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

  .dashboard-tool-grid,
  .tool-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .main-layout {
    grid-template-columns: minmax(360px, 0.92fr) minmax(420px, 1.08fr);
    gap: 26px;
  }

  .workspace {
    position: sticky;
    top: 24px;
    max-height: calc(100vh - 48px);
    overflow: auto;
  }
}

@media (max-width: 1180px) {
  .page-shell {
    width: min(100% - 28px, 1380px);
  }

  .hero {
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  }

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

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

  .toolbot-dock {
    left: 18px;
    width: min(320px, calc(100vw - 36px));
  }

  body[data-page="dashboard"] .toolbot-dock {
    left: auto;
    width: min(420px, 100%);
  }
}

@media (max-width: 1024px) {
  .hero,
  .main-layout,
  .dashboard-layout,
  .settings-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .toolbot-dock {
    left: 14px;
    width: min(320px, calc(100vw - 28px));
  }
}

@media (max-width: 820px) {
  .page-shell {
    width: min(100% - 20px, 1380px);
    padding-top: 12px;
  }

  body[data-page="tools"] .mobile-tools-switcher {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  body[data-page="tools"] .mobile-workspace-back {
    display: inline-flex;
  }

  body[data-page="tools"][data-mobile-tools-view="browser"] .workspace {
    display: none;
  }

  body[data-page="tools"][data-mobile-tools-view="workspace"] .tool-browser {
    display: none;
  }

  .page-header,
  .info-panel {
    padding: 22px 20px;
  }

  .brand-block,
  .hero-panel,
  .tool-browser,
  .workspace {
    padding: 20px;
  }

  .hero-stats,
  .dashboard-grid,
  .dashboard-tool-grid,
  .support-preview-grid,
  .guide-list,
  .guide-columns,
  .tool-grid,
  .field-grid,
  .field-grid.three {
    grid-template-columns: minmax(0, 1fr);
  }

  .browser-toolbar,
  .workspace-header {
    grid-template-columns: minmax(0, 1fr);
    display: grid;
  }

  .main-layout {
    margin-top: 18px;
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .topbar-brand {
    gap: 12px;
  }

  .brand-logo {
    width: 46px;
    height: 46px;
    border-radius: 16px;
  }

  .hero-title-lockup {
    align-items: start;
  }

  .site-nav {
    justify-content: start;
    width: 100%;
  }

  .workspace-badges {
    justify-content: start;
  }

  .toolbot-dock {
    position: sticky;
    top: 12px;
    left: 0;
    width: 100%;
    margin-bottom: 14px;
  }

  body[data-page="dashboard"] .toolbot-dock {
    position: static;
    width: 100%;
    margin: 0 auto 16px;
  }

  .toolbot-toggle {
    width: 100%;
    justify-content: center;
  }

  .toolbot-panel {
    max-height: min(72vh, 620px);
    overflow-y: auto;
  }

  .toolbot-message.user,
  .toolbot-message.assistant {
    margin-left: 0;
    margin-right: 0;
  }

  .history-item {
    display: grid;
    justify-content: stretch;
  }

  .history-actions {
    justify-content: start;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: calc(100% - 16px);
    padding: 10px 0 28px;
  }

  .topbar,
  .page-header,
  .info-panel,
  .brand-block,
  .hero-panel,
  .tool-browser,
  .workspace {
    border-radius: 22px;
  }

  .topbar {
    padding: 14px;
  }

  .topbar-brand {
    align-items: start;
  }

  .site-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .nav-link {
    width: 100%;
    padding: 10px 12px;
  }

  .page-header {
    gap: 10px;
  }

  .page-header h1,
  .brand-block h1,
  .hero-note h2,
  .workspace-header h2 {
    line-height: 1.08;
  }

  .hero-title-lockup {
    gap: 14px;
    margin: 14px 0 12px;
  }

  .hero-logo {
    width: 62px;
    height: 62px;
    border-radius: 20px;
  }

  .hero-stats {
    gap: 10px;
  }

  .stat-card,
  .tool-card,
  .dashboard-card,
  .history-item,
  .output-card {
    padding: 15px;
  }

  .toolbot-header {
    display: grid;
    gap: 10px;
  }

  .toolbot-close,
  .primary-button,
  .secondary-button,
  .ghost-button {
    width: 100%;
  }

  .action-row,
  .output-actions,
  .metric-row,
  .thumb-row,
  .history-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .workspace-header {
    gap: 14px;
    padding-bottom: 16px;
  }

  .toolbar-note {
    min-height: 0;
  }

  .ad-slot-banner .ad-slot-card,
  .ad-slot-banner .adsbygoogle {
    min-height: 110px;
  }

  .ad-slot-inline .ad-slot-card,
  .ad-slot-inline .adsbygoogle {
    min-height: 220px;
  }
}

@media (max-width: 980px) {
  .file-editor-studio {
    grid-template-columns: minmax(0, 1fr);
  }

  .file-editor-page {
    min-height: 620px;
  }
}

@media (max-width: 720px) {
  .file-editor-toolbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .file-editor-page {
    min-height: 0;
    padding: 18px;
    border-radius: 22px;
  }

  .editor-page-header {
    grid-template-columns: minmax(0, 1fr);
  }

  .editor-surface-shell {
    min-height: 300px;
    padding: 18px;
    border-radius: 18px;
  }

  .editor-surface {
    min-height: 260px;
  }

  .editor-status-row {
    align-items: start;
  }
}

body[data-page="file-editor"] .page-shell {
  gap: 24px;
}

.file-editor-page-header {
  max-width: 960px;
}

.file-editor-flow,
.file-editor-launchpad,
.file-editor-shell {
  display: grid;
  gap: 18px;
}

.file-editor-tool-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.file-editor-tool-pill {
  appearance: none;
  border: 1px solid rgba(33, 27, 22, 0.08);
  background: rgba(255, 255, 255, 0.68);
  color: var(--text);
  border-radius: 999px;
  padding: 11px 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.file-editor-tool-pill.active {
  background: linear-gradient(135deg, rgba(229, 109, 59, 0.18), rgba(18, 125, 117, 0.12));
  border-color: rgba(229, 109, 59, 0.26);
  color: var(--accent-deep);
}

.file-editor-tool-pill-mark {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: rgba(229, 109, 59, 0.12);
  color: var(--accent-deep);
  font-weight: 700;
}

.file-editor-launch-card,
.file-editor-shell {
  border-radius: 30px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 24px 45px rgba(33, 27, 22, 0.08);
  padding: 20px;
}

.file-editor-dropzone {
  padding: 34px 22px;
  border-radius: 26px;
  border: 1.5px dashed rgba(18, 125, 117, 0.22);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.68), rgba(239, 249, 247, 0.78));
  display: grid;
  gap: 14px;
  justify-items: center;
  text-align: center;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.file-editor-dropzone.dragover,
.file-editor-shell.dragover {
  border-color: rgba(229, 109, 59, 0.45);
  background: linear-gradient(135deg, rgba(255, 243, 236, 0.82), rgba(239, 249, 247, 0.82));
}

.file-editor-drop-icon {
  width: 74px;
  height: 74px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  background: linear-gradient(135deg, rgba(229, 109, 59, 0.2), rgba(18, 125, 117, 0.14));
  color: var(--accent-deep);
}

.centered-row {
  justify-content: center;
}

.file-editor-supported-note {
  max-width: 720px;
}

.file-editor-launch-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.file-editor-system-overview {
  display: grid;
  gap: 16px;
}

.file-editor-system-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.file-editor-system-card {
  border-radius: 28px;
  border: 1px solid rgba(33, 27, 22, 0.08);
  background: rgba(255, 255, 255, 0.66);
  box-shadow: 0 18px 34px rgba(33, 27, 22, 0.06);
  padding: 18px;
  display: grid;
  gap: 14px;
}

.file-editor-system-hero {
  background:
    radial-gradient(circle at top left, rgba(229, 109, 59, 0.12), transparent 32%),
    linear-gradient(135deg, rgba(255, 250, 244, 0.9), rgba(241, 250, 248, 0.82));
}

.file-editor-system-hero h2,
.file-editor-system-entry strong {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
}

.file-editor-system-hero p,
.file-editor-system-entry p {
  margin: 0;
}

.file-editor-system-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.file-editor-system-tag,
.file-editor-system-state {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 0.82rem;
  border: 1px solid rgba(18, 125, 117, 0.14);
  background: rgba(18, 125, 117, 0.08);
  color: var(--teal);
}

.file-editor-system-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.file-editor-system-step,
.file-editor-system-focus-item,
.file-editor-system-entry {
  border-radius: 22px;
  border: 1px solid rgba(33, 27, 22, 0.07);
  background: rgba(255, 255, 255, 0.72);
  padding: 14px;
}

.file-editor-system-step strong,
.file-editor-system-focus-item p {
  display: block;
}

.file-editor-system-step p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.file-editor-system-focus {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.file-editor-system-focus-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.file-editor-system-focus-mark {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: rgba(229, 109, 59, 0.12);
  color: var(--accent-deep);
  font-weight: 700;
}

.file-editor-system-list {
  display: grid;
  gap: 10px;
}

.file-editor-system-entry {
  display: grid;
  gap: 10px;
}

.file-editor-system-entry-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.file-editor-template-card,
.file-editor-panel-card,
.file-editor-rail,
.file-editor-stage-host,
.file-editor-inspector {
  border-radius: 24px;
  border: 1px solid rgba(33, 27, 22, 0.08);
  background: rgba(255, 255, 255, 0.62);
}

.file-editor-template-card,
.file-editor-panel-card {
  padding: 16px;
  display: grid;
  gap: 12px;
}

.file-editor-template-card h3,
.file-editor-rail-header h3,
.file-editor-stage-header h3 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
}

.file-editor-template-card p,
.file-editor-panel-card p,
.file-editor-rail-item p {
  margin: 0;
}

.file-editor-template-tags,
.file-editor-inline-metrics,
.file-editor-stage-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.file-editor-template-tag,
.file-editor-stat-pill,
.file-editor-stage-footer span,
.file-editor-stage-theme,
.file-editor-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 8px 11px;
  font-size: 0.84rem;
  border: 1px solid rgba(18, 125, 117, 0.14);
  background: rgba(18, 125, 117, 0.08);
  color: var(--teal);
}

.file-editor-shell-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: end;
}

.file-editor-shell-statuses,
.file-editor-shell-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.file-editor-badge.dirty {
  color: #8d3b1e;
  border-color: rgba(229, 109, 59, 0.22);
  background: rgba(229, 109, 59, 0.12);
}

.file-editor-export-select {
  min-width: 180px;
}

.file-editor-ribbon-tabs,
.file-editor-ribbon-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.file-editor-ribbon-tab,
.file-editor-ribbon-toolbar .ghost-button {
  border-radius: 16px;
}

.file-editor-ribbon-tab {
  appearance: none;
  border: 1px solid rgba(33, 27, 22, 0.08);
  background: rgba(255, 255, 255, 0.62);
  color: var(--text);
  padding: 10px 14px;
}

.file-editor-ribbon-tab.active {
  background: rgba(33, 27, 22, 0.06);
  color: var(--accent-deep);
}

.file-editor-ribbon-toolbar {
  padding: 12px;
  border-radius: 20px;
  border: 1px solid rgba(33, 27, 22, 0.08);
  background: rgba(255, 255, 255, 0.56);
}

.file-editor-toolbar-select {
  min-width: 108px;
  border-radius: 14px;
}

.file-editor-color-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid rgba(33, 27, 22, 0.08);
  background: rgba(255, 255, 255, 0.74);
  font-size: 0.86rem;
}

.file-editor-color-chip input {
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: transparent;
}

.file-editor-workbench {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}

.file-editor-rail,
.file-editor-stage-host,
.file-editor-inspector {
  padding: 16px;
}

.file-editor-rail,
.file-editor-inspector {
  position: sticky;
  top: 18px;
}

.file-editor-rail {
  display: grid;
  gap: 14px;
}

.file-editor-rail-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.file-editor-rail-list {
  display: grid;
  gap: 10px;
  max-height: 760px;
  overflow: auto;
}

.file-editor-rail-item {
  appearance: none;
  border: 1px solid rgba(33, 27, 22, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  text-align: left;
  padding: 13px;
  display: grid;
  gap: 7px;
}

.file-editor-rail-item.active {
  border-color: rgba(229, 109, 59, 0.28);
  background: linear-gradient(135deg, rgba(255, 244, 238, 0.86), rgba(255, 255, 255, 0.78));
}

.file-editor-rail-count {
  font-size: 0.82rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.file-editor-stage-host {
  min-height: 760px;
  display: grid;
  gap: 14px;
}

.file-editor-stage-tip {
  font-size: 0.94rem;
  color: var(--muted);
}

.file-editor-stage {
  display: grid;
}

.file-editor-page-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.file-editor-page-controls .ghost-button {
  padding: 9px 13px;
}

.file-editor-pdf-stage {
  display: grid;
  gap: 12px;
}

.file-editor-pdf-stage-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.file-editor-stage-canvas {
  min-height: 620px;
  padding: 26px;
  border-radius: 28px;
  border: 1px solid rgba(33, 27, 22, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 250, 246, 0.78));
  box-shadow: 0 18px 34px rgba(33, 27, 22, 0.08);
  display: grid;
  gap: 16px;
}

.file-editor-stage-canvas.presentation {
  min-height: 0;
  aspect-ratio: 16 / 9;
}

.file-editor-stage-canvas.pdf-document {
  gap: 18px;
}

.file-editor-stage-header,
.file-editor-stage-topline,
.file-editor-stage-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.file-editor-stage-header {
  display: grid;
  gap: 8px;
}

.file-editor-stage-meta-line {
  color: var(--muted);
  font-size: 0.92rem;
}

.file-editor-page-preview {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 22px;
  border: 1px solid rgba(33, 27, 22, 0.08);
  background: rgba(252, 249, 244, 0.88);
}

.file-editor-page-preview-copy {
  display: grid;
  gap: 4px;
}

.file-editor-page-preview-copy strong,
.file-editor-page-preview-copy p {
  margin: 0;
}

.file-editor-page-preview img,
.file-editor-rail-thumbnail {
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(33, 27, 22, 0.08);
  background: #fff;
  object-fit: cover;
}

.file-editor-rail-thumbnail {
  max-height: 148px;
}

.compact-field input,
.compact-field textarea {
  background: rgba(255, 255, 255, 0.82);
}

.file-editor-editable {
  min-height: 320px;
  padding: 20px;
  border-radius: 22px;
  border: 1px solid rgba(33, 27, 22, 0.08);
  background: rgba(255, 255, 255, 0.84);
  outline: none;
  line-height: 1.75;
  position: relative;
}

.file-editor-stage-canvas.presentation .file-editor-editable {
  min-height: 240px;
}

.file-editor-pdf-sheet,
.file-editor-export-pdf-sheet {
  position: relative;
  width: min(100%, calc(var(--pdf-sheet-width) * 1px));
  margin: 0 auto;
  aspect-ratio: var(--pdf-sheet-width) / var(--pdf-sheet-height);
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid rgba(33, 27, 22, 0.12);
  background: #ffffff;
  box-shadow: 0 20px 42px rgba(33, 27, 22, 0.12);
}

.file-editor-pdf-sheet-image,
.file-editor-export-pdf-background {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.file-editor-pdf-sheet-placeholder,
.file-editor-export-pdf-background.blank {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at top left, rgba(229, 109, 59, 0.12), transparent 36%),
    linear-gradient(180deg, rgba(255, 251, 247, 1), rgba(255, 255, 255, 1));
  color: rgba(103, 93, 85, 0.78);
  font-size: 0.88rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.file-editor-pdf-editable,
.file-editor-export-pdf-overlay {
  position: absolute;
  inset: clamp(16px, 4vw, 38px) clamp(14px, 3.8vw, 34px) clamp(24px, 5vw, 54px);
  border-radius: 22px;
  padding: clamp(14px, 3vw, 20px);
  background: rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(5px);
  box-shadow: inset 0 0 0 1px rgba(33, 27, 22, 0.08);
  overflow: auto;
}

.file-editor-pdf-sheet.blank .file-editor-pdf-editable,
.file-editor-export-pdf-sheet.blank .file-editor-export-pdf-overlay {
  background: rgba(255, 255, 255, 0.92);
}

.file-editor-pdf-editable .file-editor-media-block,
.file-editor-export-pdf-overlay .file-editor-media-block {
  background: rgba(255, 255, 255, 0.96);
}

.file-editor-editable[data-empty="true"]::before {
  content: attr(data-placeholder);
  position: absolute;
  inset: 20px auto auto 20px;
  color: rgba(103, 93, 85, 0.68);
  pointer-events: none;
}

.file-editor-editable p,
.file-editor-editable ul,
.file-editor-editable ol,
.file-editor-editable blockquote,
.file-editor-editable h1,
.file-editor-editable h2 {
  margin: 0 0 14px;
}

.file-editor-editable h1,
.file-editor-editable h2 {
  font-family: "Space Grotesk", sans-serif;
}

.file-editor-editable ul,
.file-editor-editable ol {
  padding-left: 22px;
}

.file-editor-editable table,
.file-editor-export-content table,
.file-editor-export-pdf-overlay table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 18px;
  overflow: hidden;
  border-radius: 16px;
}

.file-editor-editable th,
.file-editor-editable td,
.file-editor-export-content th,
.file-editor-export-content td,
.file-editor-export-pdf-overlay th,
.file-editor-export-pdf-overlay td {
  border: 1px solid rgba(33, 27, 22, 0.1);
  padding: 10px 12px;
  vertical-align: top;
  background: rgba(255, 255, 255, 0.94);
}

.file-editor-editable th,
.file-editor-export-content th,
.file-editor-export-pdf-overlay th {
  background: rgba(247, 243, 236, 0.96);
  font-family: "Space Grotesk", sans-serif;
  text-align: left;
}

.file-editor-editable img {
  max-width: 100%;
  height: auto;
  border-radius: 16px;
}

.file-editor-editable blockquote {
  padding: 12px 14px;
  border-left: 4px solid rgba(229, 109, 59, 0.35);
  background: rgba(229, 109, 59, 0.08);
  border-radius: 14px;
}

.file-editor-media-block {
  margin: 0 0 18px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(33, 27, 22, 0.08);
  background: rgba(255, 255, 255, 0.88);
  position: relative;
}

.file-editor-media-block.selected {
  border-color: rgba(229, 109, 59, 0.38);
  box-shadow: 0 0 0 3px rgba(229, 109, 59, 0.12);
}

.file-editor-media-image {
  display: block;
  width: 100%;
}

.file-editor-media-block figcaption {
  margin-top: 10px;
  color: var(--muted);
}

.file-editor-media-remove {
  position: absolute;
  top: 10px;
  right: 10px;
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 7px 11px;
  background: rgba(33, 27, 22, 0.72);
  color: #fff;
}

.file-editor-draw-canvas {
  width: 100%;
  min-height: 180px;
  border-radius: 18px;
  border: 1px solid rgba(33, 27, 22, 0.08);
  background: #fffdf9;
  touch-action: none;
}

.file-editor-draw-controls {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.file-editor-export-host {
  opacity: 0;
  pointer-events: none;
}

.file-editor-export-page {
  width: 860px;
  min-height: 1180px;
  margin-bottom: 24px;
  padding: 40px;
  background: #fffdf9;
  color: var(--text);
  border: 1px solid rgba(33, 27, 22, 0.08);
  display: grid;
  gap: 18px;
}

.file-editor-export-page.cover {
  background: linear-gradient(180deg, rgba(255, 250, 244, 0.94), rgba(255, 255, 255, 1));
}

.file-editor-export-band {
  height: 10px;
  border-radius: 999px;
  background: var(--snapshot-accent);
}

.file-editor-export-inner,
.file-editor-export-page-header {
  display: grid;
  gap: 10px;
}

.file-editor-export-kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--snapshot-accent);
  font-size: 0.82rem;
}

.file-editor-export-page h1,
.file-editor-export-page h2 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  color: var(--snapshot-ink);
}

.file-editor-export-lead {
  margin: 0;
  color: var(--snapshot-muted);
}

.file-editor-export-meta,
.file-editor-export-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  color: var(--snapshot-muted);
}

.file-editor-export-meta span {
  display: inline-flex;
  border: 1px solid rgba(33, 27, 22, 0.08);
  border-radius: 999px;
  padding: 8px 10px;
}

.file-editor-export-preview {
  padding: 14px;
  border-radius: 22px;
  background: rgba(247, 243, 236, 0.9);
}

.file-editor-export-preview img {
  width: 100%;
  display: block;
  border-radius: 18px;
}

.file-editor-export-content,
.file-editor-export-pdf-overlay {
  display: grid;
  gap: 14px;
}

.file-editor-export-content p,
.file-editor-export-content ul,
.file-editor-export-content ol,
.file-editor-export-content blockquote,
.file-editor-export-content figure,
.file-editor-export-pdf-overlay p,
.file-editor-export-pdf-overlay ul,
.file-editor-export-pdf-overlay ol,
.file-editor-export-pdf-overlay blockquote,
.file-editor-export-pdf-overlay figure {
  margin: 0;
}

.file-editor-export-content ul,
.file-editor-export-content ol,
.file-editor-export-pdf-overlay ul,
.file-editor-export-pdf-overlay ol {
  padding-left: 22px;
}

.file-editor-export-content img,
.file-editor-export-pdf-overlay img {
  max-width: 100%;
  height: auto;
  border-radius: 16px;
}

.file-editor-export-content blockquote,
.file-editor-export-pdf-overlay blockquote {
  padding: 12px 14px;
  border-left: 4px solid var(--snapshot-accent);
  background: rgba(229, 109, 59, 0.08);
}

.file-editor-workflow-list {
  margin: 0;
  padding-left: 18px;
}

@media (max-width: 1240px) {
  .file-editor-workbench {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .file-editor-inspector {
    grid-column: 1 / -1;
    position: static;
  }
}

@media (max-width: 980px) {
  .file-editor-launch-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .file-editor-system-grid,
  .file-editor-system-flow,
  .file-editor-system-focus {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .file-editor-shell-top {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .file-editor-workbench {
    grid-template-columns: minmax(0, 1fr);
  }

  .file-editor-rail {
    position: static;
  }

  .file-editor-rail-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: none;
  }

  .file-editor-stage-host {
    min-height: 0;
  }
}

@media (max-width: 720px) {
  .file-editor-launch-card,
  .file-editor-shell,
  .file-editor-stage-canvas {
    padding: 16px;
    border-radius: 22px;
  }

  .file-editor-tool-switcher {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .file-editor-tool-pill {
    justify-content: center;
  }

  .file-editor-launch-grid,
  .file-editor-rail-list,
  .file-editor-system-grid,
  .file-editor-system-flow,
  .file-editor-system-focus {
    grid-template-columns: minmax(0, 1fr);
  }

  .file-editor-ribbon-toolbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .file-editor-shell-actions,
  .file-editor-shell-statuses,
  .file-editor-inline-metrics,
  .file-editor-stage-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .file-editor-shell-actions .primary-button,
  .file-editor-shell-actions .ghost-button,
  .file-editor-shell-actions .inline-input,
  .file-editor-rail-header .secondary-button {
    width: 100%;
  }

  .file-editor-stage-canvas {
    min-height: 0;
  }

  .file-editor-stage-canvas.presentation {
    aspect-ratio: auto;
  }

  .file-editor-editable,
  .file-editor-stage-canvas.presentation .file-editor-editable {
    min-height: 240px;
  }
}
