/* Shared visual foundation. Business colours, owner borders and TCG finishes
   remain in their components. These tokens also apply to future bubbles. */
@font-face {
  font-family: Manrope;
  src: url("../vendor/manrope/Manrope-variable.946beb949095.ttf") format('truetype');
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}
:root {
  --ink: #20363d;
  --muted: #62767d;
  --blue: #167775;
  --violet: #167775;
  --line: #dfe7e9;
  --bg: #f5f7f8;
  --radius: 16px;
  --surface: #fff;
  --surface-soft: #eef4f3;
  --accent-soft: #e0efeb;
  --shadow-soft: 0 3px 12px #18393f05;
  --shadow-raised: 0 12px 32px #18393f12;
  --font-ui: Manrope, 'Segoe UI Variable', 'Segoe UI', ui-sans-serif, system-ui, sans-serif;
  --tcg-width: 280px;
  --tcg-ratio: 63 / 88;
}

/* One quiet frame, on every page. */
body.remax-theme { background: var(--bg); color: var(--ink); font-family: var(--font-ui); font-size: 14px; line-height: 1.55; }
.remax-theme .sidebar { background: #15323a; padding-top: 26px; border-right: 1px solid #ffffff0a; }
.remax-theme .sidebar .brand { margin-bottom: 34px; }
.remax-theme .brand-mark { background: #8cdeca; color: #153b39; border-radius: 11px; box-shadow: none; }
.remax-theme .main-nav { gap: 6px; }
.remax-theme .main-nav a { border-radius: 10px; color: #c3d4d7; font-size: 13px; }
.remax-theme .main-nav a:hover { background: #ffffff0a; color: #fff; }
.remax-theme .main-nav a.active { background: #284d52; color: #c5f2e4; box-shadow: inset 3px 0 #8cdeca; }
.remax-theme .nav-dot { background: #8cdeca; }
.remax-theme .nav-caption { color: #92afb5; letter-spacing: .13em; }
.remax-theme .atelier-nav { border-color: #ffffff14; }
.remax-theme .workspace-label { border-color: #ffffff14; }
.remax-theme .workspace-header { background: #ffffff; border-bottom: 1px solid var(--line); height: 72px; }
.remax-theme .avatar { background: var(--accent-soft); color: #256555; width: 34px; height: 34px; }
.remax-theme .trial-link { background: var(--surface-soft); color: #4b6769; border: 1px solid var(--line); padding: 6px 10px; border-radius: 20px; font-size: 11px; }
.remax-theme .preview-notice { background: #f8f3e8; color: #746344; border-color: #ece3d0; }
.remax-theme .container { padding-top: 32px; }
.remax-theme .public-header { background: var(--surface); border-color: var(--line); }

/* Reusable type, panels and controls. */
.remax-theme h1 { color: var(--ink); font-size: clamp(27px, 2.4vw, 36px); font-weight: 700; letter-spacing: -.045em; line-height: 1.18; }
.remax-theme .collection-heading h1 { font-size: clamp(27px, 2.4vw, 36px); }
.remax-theme h2 { font-size: 19px; font-weight: 650; letter-spacing: -.025em; }
.remax-theme .eyebrow { color: #5c7b7d; font-size: 10px; letter-spacing: .12em; }
.remax-theme .page-heading, .remax-theme .collection-heading { margin-bottom: 26px; align-items: center; }
.remax-theme :is(.panel, .auth-card, .stat-card, .catalog-tile, .comfortable-form, .v02-inline-editor) {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-soft);
}
.remax-theme :is(.panel, .comfortable-form) { padding: 24px; }
.remax-theme :is(.stat-card, .catalog-tile):hover { border-color: #a3c7be; box-shadow: var(--shadow-raised); }
.remax-theme .stat-card > strong { font-size: 32px; font-weight: 650; letter-spacing: -.04em; }
.remax-theme .stat-card.attention { background: #fffbf2; border-color: #eedfbf; }
.remax-theme :is(button, .button) { font-family: var(--font-ui); border-radius: 10px; font-weight: 600; }
.remax-theme .button:not(.secondary) { background: var(--blue); color: #fff; border-color: var(--blue); box-shadow: none; }
.remax-theme .button:not(.secondary):hover { background: #105f5e; }
.remax-theme :is(.compact-search > button, .search-form > button, .comfortable-form form > button, .business-form > button, .filter-submit, .v02-filters > button, .quick-status > button) { background: var(--blue); color: #fff; border-color: var(--blue); }
.remax-theme :is(.compact-search > button, .search-form > button, .comfortable-form form > button, .business-form > button, .filter-submit, .v02-filters > button, .quick-status > button):hover { background: #105f5e; }
.remax-theme :is(.button.secondary, button.secondary) { background: var(--surface); color: #3b5c61; border: 1px solid #d4dfe1; }
.remax-theme :is(.button.secondary, button.secondary):hover { background: var(--surface-soft); border-color: #a5c3bd; }
.remax-theme :is(input, select, textarea) { font-family: var(--font-ui); color: var(--ink); border-radius: 10px; border-color: #d4dfe1; background: #fff; box-shadow: none; }
.remax-theme :is(input, select, textarea):focus { border-color: #609e95; }
.remax-theme :focus-visible { outline: 3px solid #328c83; outline-offset: 3px; }
.remax-theme :is(.search-form, .calendar-filters, .table-toolbar, .filter-drawer) { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: none; }
.remax-theme .compact-search > input[type=search] { border-color: #d4dfe1; border-radius: 10px; }
.remax-theme .row { border-color: var(--line); }
.remax-theme .muted, .remax-theme .helptext { color: var(--muted); }
.remax-theme :is(.empty-state, .empty-pile) { background: #f8faf9; color: var(--muted); border-radius: 12px; }
.remax-theme .empty-pile { border-color: #ccdcd7; }
.remax-theme .badge { border-radius: 6px; font-size: 10px; font-weight: 650; }
.remax-theme :is(.status-DONE, .status-CLOSED, .status-READY, .status-RECEIVED) { background: #e0f0e7; color: #276747; }
.remax-theme :is(.status-BLOCKED, .status-REVIEW) { background: #fff0df; color: #8c551a; }
.remax-theme :is(.status-ACTIVE, .status-IN_PROGRESS, .status-ORDERED, .status-RESERVED) { background: #e2eef6; color: #30627d; }
.remax-theme :is(.status-NA, .status-CANCELLED, .status-OPEN, .status-TODO) { background: #edf1f2; color: #586d74; }

/* Compact selection controls use the same visual language everywhere. */
.remax-theme .view-switch { background: #e9eff0; border: 1px solid #dfe7e9; border-radius: 12px; padding: 4px; box-shadow: none; }
.remax-theme .view-switch a { border-radius: 8px; color: #526c72; }
.remax-theme .view-switch a[aria-current=page] { background: #fff; color: #226b63; box-shadow: 0 2px 5px #203c4210; }
.remax-theme .view-tabs { border-color: var(--line); gap: 8px; }
.remax-theme .view-tabs a { border-radius: 8px 8px 0 0; }
.remax-theme .v02-tool-nav { border-color: var(--line); }
.remax-theme .v02-tool-nav a[aria-current=page] { background: var(--accent-soft); color: #235b52; }
.remax-theme .v02-tool-nav > a:hover { background: #e9f1ef; }
.remax-theme .v02-tool-nav details[open] { background: #fff; border-radius: 10px; box-shadow: var(--shadow-raised); }

/* The desk keeps its newspaper character inside the shared frame. */
.remax-theme .hubert-desk { --paper: #fff; color: var(--ink); }
.remax-theme .morning-masthead { border-top: 0; border-color: var(--line); padding: 0 0 18px; color: #5c7477; }
.remax-theme .morning-masthead > span:first-child { color: var(--ink); letter-spacing: .08em; }
.remax-theme .morning-brief { padding: 32px 0; gap: 24px; }
.remax-theme .morning-brief h1 { font-family: Georgia, serif; font-size: clamp(31px, 3.1vw, 46px); font-weight: 400; }
.remax-theme .morning-brief p, .remax-theme .brief-facts a { color: var(--muted); }
.remax-theme .brief-facts { gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.remax-theme .brief-facts a { padding: 6px 11px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.remax-theme .brief-facts strong { color: #285e55; font-size: 16px; }
.remax-theme :is(.today-sheet, .news-sheet, .week-sheet, .desk-widget, .news-tile, .news-article) { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-soft); }
.remax-theme .hubert-desk h2 { font-family: var(--font-ui); font-size: 21px; font-weight: 650; letter-spacing: -.035em; }
.remax-theme .hubert-desk .eyebrow { color: #647d7e; font-size: 10px; }
.remax-theme .calm-empty { color: var(--muted); padding: 14px 0; font-size: 13px; }
.remax-theme .morning-columns, .remax-theme .desk-widgets { gap: 22px; }
.remax-theme .morning-task, .remax-theme .news-preview { border-color: var(--line); }
.remax-theme .news-preview h3, .remax-theme .news-tile h2 { font-family: var(--font-ui); font-weight: 650; }
.remax-theme .week-grid, .remax-theme .agenda-day { border-color: var(--line); }
.remax-theme .agenda-day { min-height: 210px; }
.remax-theme .agenda-day header strong { font-family: var(--font-ui); font-weight: 600; font-size: 23px; }
.remax-theme .agenda-day.is-today { background: #edf6f2; }
.remax-theme .agenda-day.is-today header strong { background: #277b6c; padding: 0; display: grid; place-items: center; font-size: 20px; }
.remax-theme .agenda-free, .remax-theme .agenda-note-edit summary { color: #697f7d; }
.remax-theme .agenda-entry { background: #e6f0ed; border-color: #6aa393; border-radius: 8px; }
.remax-theme .weather-widget { background: #edf5f6; }
.remax-theme .personal-note { background: #fff6d9; border-color: #ebdfb5; transform: none; }
.remax-theme .personal-note textarea { background: transparent; border-radius: 0; }
.remax-theme .desk-action-plan .action-plan-item { background: #fffaf0; border-color: #ebdfc8; border-radius: 12px; }

/* TCGs stay expressive; their surrounding page and typography become calmer. */
.remax-theme .collector-card.v02-collector { box-shadow: 0 6px 18px #18393f14; }
.remax-theme .collector-card.v02-collector:hover { box-shadow: 0 14px 28px #18393f24; }
.remax-theme .v02-collector-face { background: #fdfdf9; }
.remax-theme .v02-next { background: #edf3f1; }
.remax-theme .collector-card.v02-collector .person-role { color: #607c7c; }
.remax-theme .v02-affair-workspace > .affair-hero { background: #1b3c44; border-radius: 18px; border-top: 0; box-shadow: var(--shadow-soft); }
.remax-theme .affair-hero h1 { color: #f6faf9; }
.remax-theme .affair-hero .eyebrow { color: #bfd8da; }
.remax-theme .collection-hero h1 { color: #f6faf9; }
.remax-theme .v02-jalon-pile { background: #fff; border-color: #c8d9d3; box-shadow: 3px 5px 0 -1px #e4eeea, 6px 10px 0 -2px #d1e1da; }
.remax-theme .v02-jalon-pile.status-border-DONE { border-color: #72aa8c; }
.remax-theme .pile-number { background: #e2efea; color: #2d685a; font-family: var(--font-ui); font-weight: 650; font-size: 24px; }
.remax-theme .v02-jalon-pile h3 { font-size: 19px; font-weight: 650; }
.remax-theme .pile-steps li { border-color: #e4ebe8; }
.remax-theme .v02-step { background: #fff; border-color: #d7e3de; }
.remax-theme .v02-pile-back.is-empty { background: #f8faf9; border-color: #bdcfc8; color: #5f7972; }
.remax-theme .v02-event-hero { background: #fff; border: 1px solid var(--line); border-left: 4px solid #6c9d8c; border-radius: 16px; }
.remax-theme .event-pack-tabs button { border-radius: 12px; border-width: 1px; border-style: solid; box-shadow: 2px 4px 0 #dde9e3; background: #f3f7f5; color: #456b5e; border-color: #c8d9d0; padding: 16px 24px; }
.remax-theme .event-pack-tabs button[aria-pressed=true] { background: #dceee5; border-color: #8db6a4; color: #265745; }
.remax-theme .comfortable-form { margin-top: 24px; }

/* Tables and schedules use the same light working surface. Owner colours stay. */
.remax-theme .collection-table-wrap { background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-soft); border-radius: 16px; }
.remax-theme .collection-table th { color: #62787c; }
.remax-theme .collection-row td { background: #f7faf9; border-top-color: #e5ece9; border-bottom-color: #e5ece9; color: var(--ink); }
.remax-theme .collection-row:hover td { background: #edf5f1; }
.remax-theme .collection-row-title strong { color: var(--ink); }
.remax-theme .collection-seal { color: #34595d; background: linear-gradient(135deg, #eff4f2, #dbe6e2); border-color: #c3d3ce; font-weight: 650; }
.remax-theme :is(.collection-row-title small, .collection-row-title > span > span, .collection-next > span, .collection-row .collector-owner) { color: #5c797c; }
.remax-theme .collection-row :is(.collector-status, .collector-progress-label) { color: #5c7479; }
.remax-theme .collection-amount, .remax-theme .collection-row .collector-progress-label strong { color: #306e61; }
.remax-theme .collection-row button { border-color: #bfd2cb; color: #366a5d; background: #fff; }
.remax-theme .collection-row button:hover { background: #e4f0eb; }
.remax-theme .data-table th { background: #f4f7f7; color: #60767b; }
.remax-theme .calendar-table thead th { background: #f5f8f7; color: #60777a; }
.remax-theme .calendar-table .today { background: #e3f2eb; }
.remax-theme .calendar-table td { border-color: #e5eceb; }
.remax-theme .booking { box-shadow: none; border-radius: 7px; }
.remax-theme .prep-summary, .remax-theme .prep-progress-strip { border-radius: 12px; box-shadow: none; }
.remax-theme .geo-stats { background: #1b3c44; box-shadow: var(--shadow-soft); }
.remax-theme .control-checks { grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); }
.remax-theme .control-checks a { min-width: 0; overflow-wrap: anywhere; background: #fff; border-color: var(--line); border-radius: 14px; box-shadow: var(--shadow-soft); }
.remax-theme .control-checks a[aria-current=page] { background: #e8f3ee; border-color: #7aac9a; }
.remax-theme .control-check-count { color: #2c7365; font-size: 30px; }
.remax-theme .control-note { background: #fff8e4; border-color: #ebdfbd; }
.remax-theme .v02-filters { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(150px, .5fr) minmax(150px, .5fr) auto; align-items: center; gap: 10px; }
.remax-theme .v02-filters :is(input, select) { min-width: 0; width: 100%; }

/* Official Phosphor duotone SVGs share one optical size and colour family. */
.remax-theme .icon { fill: currentColor; stroke: none; }
.remax-theme .pile-symbol { display: grid; place-items: center; width: 88px; height: 88px; border-radius: 24px; background: #ffffff12; color: inherit; font-size: inherit; }
.remax-theme .pile-symbol-icon { width: 56px; height: 56px; }
.remax-theme .pile-team { --pile-accent: #327c6d; --pile-tint: #e5f2ec; }
.remax-theme .pile-equipment { --pile-accent: #426f95; --pile-tint: #e7eff7; }
.remax-theme .pile-orders { --pile-accent: #9a702d; --pile-tint: #f7efd9; }
.remax-theme .pile-events { --pile-accent: #7a659b; --pile-tint: #eee9f7; }
.remax-theme .v02-pile-back.is-empty .pile-symbol { color: var(--pile-accent); background: var(--pile-tint); }
.remax-theme .v02-pile-back h3 { font-size: 21px; font-weight: 700; margin: 20px 0 8px; }
.remax-theme .v02-pile-back > strong { font-family: var(--font-ui); font-size: 32px; font-weight: 650; font-variant-numeric: tabular-nums; }
.remax-theme .v02-pile-back small { font-size: 12px; margin-top: 22px; }
.remax-theme .resource-emblem { width: 64px; height: 64px; }
.remax-theme .event-emblem { width: 80px; height: 80px; }
.remax-theme :is(.morning-brief h1, .news-article h1, .morning-cup small, .widget-number, .weather-reading) { font-family: var(--font-ui); }
.remax-theme .morning-brief h1 { font-weight: 650; }
.remax-theme :is(.pile-number, .control-check-count, .collection-amount, .stat-card > strong, .widget-number) { font-variant-numeric: tabular-nums; }

/* One physical card size: content never stretches the grid or its neighbours. */
.remax-theme :is(.v02-milestone-grid, .v02-resource-piles, .v02-card-grid, .collector-grid, .affair-card-grid) {
  display: grid;
  grid-template-columns: repeat(auto-fill, min(100%, var(--tcg-width)));
  gap: 24px;
  align-items: start;
  max-width: none;
}
.remax-theme :is(.v02-jalon-pile, .v02-pile-back, .v02-record-card, .event-tcg, .collector-card.v02-collector, .affair-object-card) {
  box-sizing: border-box;
  aspect-ratio: var(--tcg-ratio);
  width: 100%;
  min-width: 0;
  max-width: none;
  height: auto;
  min-height: 0;
  overflow: hidden;
}
.remax-theme .v02-jalon-pile { padding: 16px; display: flex; flex-direction: column; }
.remax-theme .v02-jalon-pile .pile-top { flex: 0 0 40px; flex-wrap: nowrap; }
.remax-theme .v02-jalon-pile h3 { flex: 0 0 46px; margin: 12px 0 8px; font-size: 18px; line-height: 23px; min-height: 0; overflow: auto; }
.remax-theme .pile-steps { display: grid; grid-template-rows: repeat(4, minmax(0, 1fr)); gap: 0; flex: 1 1 0; min-height: 0; overflow: auto; }
.remax-theme .pile-steps li { min-height: 0; padding: 6px 0; gap: 8px; font-size: 11px; line-height: 15px; align-items: start; }
.remax-theme .pile-steps li > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.remax-theme .v02-jalon-pile .pile-footer { flex: 0 0 17px; margin-top: 10px; align-items: end; font-size: 10px; }
.remax-theme .v02-jalon-pile .pile-stamp { position: absolute; right: 18px; top: 75px; margin: 0; pointer-events: none; }
.remax-theme .v02-jalon-pile .pile-stamp .state-stamp { font-size: 10px; background: #f8fffcf5; }
.remax-theme .v02-pile-back { padding: 24px; }
.remax-theme .v02-record-card { overflow: auto; }
.remax-theme .event-tcg > a { min-height: 0; overflow: auto; }
.remax-theme .v02-card-grid > .empty-pile { grid-column: 1 / -1; }
.remax-theme .affair-card-grid { grid-template-columns: repeat(auto-fill, min(100%, var(--tcg-width))) !important; }

@media (max-width: 800px) {
  .remax-theme .sidebar { padding: 14px 16px 0; }
  .remax-theme .sidebar .brand { margin-bottom: 14px; }
  .remax-theme .atelier-nav .main-nav { display: flex; flex-direction: row; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 10px; }
  .remax-theme .atelier-nav .main-nav a { flex-shrink: 0; white-space: nowrap; }
  .remax-theme .workspace-header { height: 60px; gap: 8px; }
  .remax-theme .trial-link { font-size: 10px; padding: 5px 8px; }
  .remax-theme .container { padding: 24px 16px 40px; }
  .remax-theme :is(.panel, .comfortable-form) { padding: 20px; }
  .remax-theme .morning-brief { padding: 26px 0; gap: 14px; }
  .remax-theme .brief-facts { gap: 7px; }
  .remax-theme .brief-facts a { padding: 4px 8px; }
  .remax-theme .morning-masthead { font-size: 9px; letter-spacing: .03em; }
  .remax-theme .morning-masthead > span:first-child { font-size: 12px; }
  .remax-theme .control-checks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .remax-theme .v02-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .remax-theme .v02-filters > input { grid-column: 1 / -1; }
  .remax-theme .v02-filters > button { justify-self: start; }
}
@media (prefers-reduced-motion: reduce) {
  .remax-theme .main-nav a, .remax-theme .button { transition: none; }
}
@media print {
  body.remax-theme { background: #fff; }
  .remax-theme :is(.panel, .today-sheet, .news-sheet, .week-sheet, .desk-widget) { box-shadow: none; }
}
.remax-theme .activity-badges-compact { display:flex; flex-wrap:nowrap; gap:4px; height:23px; min-height:23px; margin:0; align-items:center; position:relative; z-index:2; }
.remax-theme .activity-badges-compact .activity-icon { display:inline-flex; flex:none; align-items:center; gap:3px; white-space:nowrap; font-size:9px; line-height:14px; padding:2px 5px; }
.remax-theme .activity-badges-compact .activity-icon:focus-visible { outline:2px solid #167775; outline-offset:1px; }
.remax-theme .collector-schedule-row { display:flex; align-items:center; gap:12px; min-width:0; min-height:43px; }
.remax-theme .collector-schedule-row .people-strip { flex:none; gap:8px; margin:0; padding:0; }
.remax-theme .collector-card.v02-collector .collector-art-stage { height:21%; }
.remax-theme .collector-card.v02-collector .collector-progress-label { line-height:14px; }
.remax-theme .collector-card.v02-collector .collector-progress-label strong { font-size:12px; line-height:14px; }
.remax-theme .collector-schedule-row .person-token { min-width:30px; }
.remax-theme .collector-schedule-row .person-face { width:28px; height:28px; }
.remax-theme .collector-dates { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:center; flex:1; min-width:0; gap:8px; margin:0; padding-left:10px; border-left:1px solid #d7e3df; }
.remax-theme .collector-dates>div { min-width:0; }
.remax-theme .collector-dates dt { font-size:8px; text-transform:uppercase; letter-spacing:.05em; color:#607c7c; margin:0 0 4px; }
.remax-theme .collector-dates dd { font-size:11px; font-weight:700; color:#254d4d; margin:0; white-space:nowrap; font-variant-numeric:tabular-nums; }
