@font-face {
  font-family: "Vazirmatn";
  src: url("/assets/fonts/Vazirmatn.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
:root {
  color-scheme: light;
  --ink: #20343d;
  --muted: #75838a;
  --muted-strong: #53656d;
  --canvas: #f2f5f4;
  --surface: #ffffff;
  --surface-soft: #f7f9f8;
  --line: #e3e9e7;
  --line-strong: #d4dfdc;
  --rail: #172b35;
  --rail-muted: #a9b9bd;
  --teal: #287e73;
  --teal-pale: #e4f2ef;
  --amber: #b87927;
  --amber-pale: #faf0dd;
  --coral: #b65d4b;
  --coral-pale: #f8e9e5;
  --blue: #536f89;
  --blue-pale: #eaf0f5;
  --shadow: 0 18px 42px rgba(25, 49, 57, .09);
  --radius-sm: 9px;
  --radius-md: 15px;
  --radius-lg: 20px;
  --font-body: "Vazirmatn", Tahoma, "Segoe UI", system-ui, sans-serif;
  --font-display: "Vazirmatn", Tahoma, "Segoe UI", system-ui, sans-serif;
  --font-data: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-family: var(--font-body);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  background: var(--canvas);
  color: var(--ink);
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--canvas); }
button, input, select { font: inherit; }
button { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #d6923b; outline-offset: 3px; }
::selection { background: #cbe5df; color: #132b33; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 20; top: 12px; inset-inline-start: 12px; padding: 10px 14px; transform: translateY(-160%); border-radius: 8px; background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.skip-link:focus { transform: translateY(0); }

.app-shell { min-height: 100vh; }
.side-rail { position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 5; display: flex; width: 248px; flex-direction: column; padding: 27px 18px 20px; background: var(--rail); color: #f4f7f5; }
.brand { display: flex; align-items: center; gap: 12px; width: fit-content; color: inherit; text-decoration: none; }
.brand-mark { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid rgba(207, 230, 217, .18); border-radius: 12px; color: #b4d2c3; background: rgba(226, 242, 235, .06); }
.brand-mark svg { width: 31px; height: 31px; }
.brand-copy { display: grid; gap: 3px; }
.brand-copy strong { font-size: 13px; letter-spacing: .17em; font-weight: 750; }
.brand-copy span { color: #8ea5ab; font: 11px var(--font-data); letter-spacing: .12em; }
.workspace-label { margin: 53px 10px 13px; color: #769097; font: 11px var(--font-data); letter-spacing: .12em; }
.rail-nav { display: grid; gap: 7px; }
.rail-link { display: flex; min-height: 45px; align-items: center; gap: 12px; padding: 0 11px; border: 1px solid transparent; border-radius: 10px; color: #b8c5c7; font-size: 13px; font-weight: 550; text-decoration: none; transition: background-color .16s ease, color .16s ease, border-color .16s ease; }
.rail-link svg { width: 17px; height: 17px; flex: 0 0 auto; fill: currentColor; }
.rail-link svg circle { fill: var(--rail); stroke: currentColor; stroke-width: 1.5; }
.rail-link:hover { color: #fff; background: rgba(255,255,255,.06); }
.rail-link.is-active { color: #f8fbf8; border-color: rgba(160, 204, 187, .15); background: #263d45; box-shadow: inset -3px 0 #d6923b; }
.rail-link.is-active svg { color: #a9d1be; }
.nav-count { margin-inline-start: auto; padding: 3px 7px; border-radius: 20px; color: #c4d7cc; background: rgba(197, 224, 209, .12); font: 12px var(--font-data); }
.rail-bottom { margin-top: auto; }
.connection-note { display: flex; align-items: flex-start; gap: 10px; padding: 13px 11px; border: 1px solid rgba(216, 231, 225, .12); border-radius: 12px; background: rgba(244, 249, 247, .045); }
.connection-dot, .freshness-dot, .sort-dot { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: #72b897; box-shadow: 0 0 0 3px rgba(114,184,151,.12); }
.connection-dot { margin-top: 4px; }
.connection-note div { display: grid; gap: 4px; }
.connection-note strong { font-size: 11px; font-weight: 650; }
.connection-note span:last-child { color: #92a7aa; font-size: 12px; }
.rail-foot { margin: 15px 10px 0; color: #6e858c; font: 11px var(--font-data); letter-spacing: .1em; }

.main-content { min-height: 100vh; margin-inline-start: 248px; }
.topbar { position: sticky; top: 0; z-index: 4; display: flex; height: 64px; align-items: center; justify-content: space-between; padding: 0 clamp(24px, 4vw, 68px); border-bottom: 1px solid rgba(216, 225, 223, .8); background: rgba(242, 245, 244, .9); backdrop-filter: blur(12px); }
.crumb { display: flex; align-items: center; gap: 10px; color: #738188; font-size: 11px; }
.crumb-mark { color: var(--amber); font: 17px var(--font-display); }
.crumb-divider { color: #b0babc; }
.crumb strong { color: #374b53; font-weight: 650; }
.topbar-right { display: flex; align-items: center; gap: 14px; color: #75838a; font-size: 12px; }
.timezone-label { font-family: var(--font-data); font-size: 11px; }
.topbar-separator { width: 1px; height: 15px; background: #d8e0de; }
.freshness { display: flex; align-items: center; gap: 8px; }
.freshness-dot { width: 6px; height: 6px; }
.icon-button { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: #63767d; cursor: pointer; transition: border-color .15s ease, color .15s ease, background .15s ease; }
.icon-button:hover { border-color: #a9c5bc; color: var(--teal); background: #f7fbf9; }
.icon-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; }
.refresh-button.is-refreshing svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.page-wrap { width: min(1320px, 100%); margin: 0 auto; padding: 36px clamp(24px, 4vw, 68px) 26px; }
.hero { display: flex; min-height: 142px; align-items: center; justify-content: space-between; gap: 28px; padding: 4px 0 25px; }
.eyebrow, .section-kicker { color: #7d8b8f; font: 11px var(--font-data); letter-spacing: .14em; }
.eyebrow { display: flex; align-items: center; gap: 9px; color: #6d807e; }
.eyebrow-rule { width: 22px; height: 1px; background: var(--amber); }
h1, h2, p { margin-top: 0; }
.hero h1 { margin: 12px 0 7px; color: #1a3039; font: 500 clamp(34px, 4vw, 47px)/1.05 var(--font-display); letter-spacing: -.035em; }
.title-period { color: var(--amber); }
.hero p { margin: 0; color: #748188; font-size: 12px; line-height: 1.6; }
.hero-stamp { display: flex; align-items: center; gap: 12px; padding: 12px 15px; border: 1px solid #dce6e2; border-radius: 13px; background: rgba(255,255,255,.58); }
.stamp-icon { display: grid; width: 35px; height: 35px; place-items: center; border-radius: 10px; color: #4c7e70; background: #e8f1ec; }
.stamp-icon svg { width: 23px; height: 23px; }
.hero-stamp span:last-child { display: grid; gap: 4px; }
.hero-stamp strong { color: #425a61; font-size: 12px; font-weight: 650; }
.hero-stamp small { color: #8a989b; font-size: 11px; }

.summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.metric-card { min-height: 122px; padding: 17px 19px 14px; border: 1px solid #e1e8e6; border-radius: var(--radius-md); background: var(--surface); box-shadow: 0 3px 12px rgba(33, 57, 63, .025); }
.metric-primary { background: #eaf3ef; border-color: #d8e8e0; }
.metric-top { display: flex; align-items: center; justify-content: space-between; color: #728087; font-size: 12px; font-weight: 550; }
.metric-mark { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 8px; font-size: 12px; font-weight: 700; }
.mark-teal { color: #287e73; background: #d9ece5; }
.mark-blue { color: var(--blue); background: var(--blue-pale); }
.mark-amber { color: var(--amber); background: var(--amber-pale); }
.metric-value { margin: 10px 0 5px; color: #203941; font: 500 29px/1 var(--font-display); font-variant-numeric: tabular-nums; }
.metric-foot { display: flex; align-items: center; justify-content: space-between; }
.metric-caption { color: #8a969a; font-size: 11px; }

.activity-panel { margin-top: 16px; padding: 19px 21px 15px; border: 1px solid #e1e8e6; border-radius: var(--radius-md); background: var(--surface); }
.activity-heading { display: flex; align-items: flex-start; justify-content: space-between; }
.activity-heading h2, .ledger-heading h2 { margin: 6px 0 0; color: #2b424a; font-size: 14px; letter-spacing: -.015em; font-weight: 650; }
.activity-total { display: flex; align-items: baseline; gap: 7px; color: #8a969a; font-size: 11px; }
.activity-total strong { color: #3b5f5e; font: 500 19px var(--font-display); }
.activity-bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: clamp(8px, 2vw, 22px); height: 58px; align-items: end; margin: 16px 0 0; padding: 0; list-style: none; }
.activity-day { display: grid; height: 100%; grid-template-rows: 1fr auto; align-items: end; gap: 7px; min-width: 0; }
.activity-bar { display: block; width: 100%; height: var(--bar-height, 3%); align-self: end; border-radius: 5px 5px 2px 2px; background: #8bbbaa; transition: height .25s ease; }
.activity-day.is-today .activity-bar { background: #3e8878; }
.activity-day-label { color: #919da0; font: 11px var(--font-data); text-align: center; }
.bar-track { display: flex; width: 100%; height: 100%; align-items: end; overflow: hidden; border-radius: 5px 5px 2px 2px; background: linear-gradient(to top, #f5f8f7 0%, #f5f8f7 100%); }
.bar-fill { width: 100%; min-height: 3px; border-radius: 5px 5px 2px 2px; background: #8bbbaa; transition: height .25s ease; }
.activity-day:nth-child(7) .bar-fill { background: #3e8878; }
.activity-label { display: flex; justify-content: space-between; gap: 4px; color: #919da0; font: 11px var(--font-data); }
.activity-label strong { color: #64777b; font-weight: 500; }

.ledger-section { margin-top: 34px; }
.ledger-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 17px; }
.ledger-title-line { display: flex; align-items: baseline; gap: 11px; }
.ledger-heading h2 { margin-top: 6px; font-size: 20px; font-weight: 650; }
.result-count { color: #98a3a4; font: 12px var(--font-data); }
.time-filter { display: flex; gap: 3px; padding: 3px; border: 1px solid #e0e7e5; border-radius: 10px; background: #e9eeec; }
.time-filter button { min-height: 29px; padding: 0 10px; border: 1px solid transparent; border-radius: 7px; color: #77858a; background: transparent; font-size: 11px; font-weight: 550; cursor: pointer; white-space: nowrap; }
.time-filter button:hover { color: #334f53; }
.time-filter button[aria-pressed="true"] { color: #28434a; border-color: #e6ece9; background: #fff; box-shadow: 0 1px 3px rgba(23,43,53,.06); }
.filter-bar { display: flex; gap: 8px; margin-bottom: 12px; }
.search-field { display: flex; min-width: 180px; height: 39px; flex: 1; align-items: center; gap: 9px; padding: 0 11px; border: 1px solid #dfe7e4; border-radius: 10px; background: #fff; transition: border-color .15s ease, box-shadow .15s ease; }
.search-field:focus-within { border-color: #83b3a2; box-shadow: 0 0 0 3px rgba(40,126,115,.1); }
.search-field svg { width: 16px; height: 16px; flex: 0 0 auto; fill: none; stroke: #839297; stroke-width: 1.5; stroke-linecap: round; }
.search-field input { width: 100%; min-width: 0; height: 100%; border: 0; outline: 0; color: #334951; background: transparent; font-size: 12px; }
.search-field input::placeholder { color: #9ca8aa; }
.clear-search { display: grid; width: 23px; height: 23px; flex: 0 0 auto; place-items: center; border: 0; border-radius: 6px; color: #718186; background: #eff3f2; font-size: 17px; line-height: 1; cursor: pointer; }
.clear-search[hidden] { display: none; }
.type-filter { position: relative; display: flex; width: 164px; height: 39px; flex: 0 0 auto; align-items: center; }
.type-filter select { width: 100%; height: 100%; appearance: none; padding-block: 0; padding-inline: 11px 34px; border: 1px solid #dfe7e4; border-radius: 10px; color: #5e7077; background: #fff; font-size: 12px; cursor: pointer; }
.type-filter svg { position: absolute; inset-inline-end: 11px; width: 13px; height: 13px; fill: none; stroke: #7f8e92; stroke-width: 1.5; pointer-events: none; }
.list-meta { display: flex; justify-content: space-between; gap: 12px; padding: 0 2px 9px; color: #8c989b; font-size: 11px; }
.sort-label { display: flex; align-items: center; gap: 7px; }
.sort-dot { width: 5px; height: 5px; background: #8bbbaa; box-shadow: none; }
.event-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.event-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; gap: 0; overflow: hidden; border: 1px solid #e0e7e5; border-radius: 12px; background: #fff; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.event-row:hover { border-color: #c7d9d2; box-shadow: 0 7px 19px rgba(32, 59, 63, .055); transform: translateY(-1px); }
.event-time { display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 12px 9px 12px 14px; border-inline-end: 1px solid #edf1ef; background: #fafcfb; }
.event-date { color: #65777d; font: 11px var(--font-data); }
.event-clock { color: #a0abad; font: 11px var(--font-data); }
.event-main { min-width: 0; padding: 12px 15px; }
.event-open { display: grid; width: 100%; grid-template-columns: 88px minmax(0,1fr); padding: 0; border: 0; text-align: start; background: none; cursor: pointer; }
.event-open:focus-visible { position: relative; z-index: 1; outline-offset: -3px; }
.event-product { display: flex; align-items: center; gap: 8px; min-width: 0; }
.event-product strong { overflow: hidden; color: #30474e; font-size: 11px; line-height: 1.45; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.event-id { flex: 0 0 auto; color: #9ca8aa; font: 11px var(--font-data); }
.event-detail-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.event-kind { display: inline-flex; align-items: center; width: fit-content; padding: 4px 7px; border: 1px solid transparent; border-radius: 20px; font-size: 11px; line-height: 1.1; font-weight: 650; white-space: nowrap; }
.kind-changed { color: #3d6e66; border-color: #e0eee8; background: #eff6f2; }
.kind-newly_observed { color: #94682d; border-color: #f3e6cc; background: #fcf5e8; }
.kind-no_longer_present { color: #a15748; border-color: #f1ded9; background: #fbefec; }
.field-chip { display: inline-flex; max-width: 100%; align-items: center; gap: 5px; padding: 4px 7px; border-radius: 6px; color: #59756f; background: #eef5f1; font-size: 11px; line-height: 1.1; }
.field-chip::before { content: ""; width: 4px; height: 4px; flex: 0 0 auto; border-radius: 1px; background: #78a994; }
.field-overflow { color: #8d9c9b; font: 11px var(--font-data); }
.event-chevron { display: grid; width: 32px; place-items: center; color: #9eaeaa; font-size: 12px; }
.event-excerpt { overflow: hidden; max-width: min(100%, 490px); color: #9aa5a6; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.type-badge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 7px; border: 1px solid transparent; border-radius: 20px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.type-badge.changed { color: #3d6e66; border-color: #e0eee8; background: #eff6f2; }
.type-badge.newly_observed { color: #94682d; border-color: #f3e6cc; background: #fcf5e8; }
.type-badge.no_longer_present { color: #a15748; border-color: #f1ded9; background: #fbefec; }
.load-state { min-height: 0; color: #879598; font-size: 12px; }
.load-state:not(:empty) { padding: 4px 1px 10px; }
.load-state.is-error { color: var(--coral); }
.load-copy { margin-inline-end: 8px; }
.inline-retry { padding: 5px 8px; border: 1px solid #dfe7e4; border-radius: 7px; color: #3e776b; background: #fff; font-size: 11px; cursor: pointer; }
.event-list:empty { display: none; }
.empty-state { display: grid; min-height: 225px; place-items: center; padding: 28px; border: 1px dashed #cedbd6; border-radius: 14px; background: rgba(255,255,255,.45); text-align: center; }
.empty-mark { display: grid; width: 48px; height: 48px; place-items: center; margin: 0 auto 12px; border: 1px solid #dce8e2; border-radius: 14px; color: #73998a; background: #eef5f1; }
.empty-mark svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.empty-state h3 { margin: 0 0 6px; color: #3d555b; font: 500 20px var(--font-display); }
.empty-state p { max-width: 330px; margin: 0; color: #859294; font-size: 12px; line-height: 1.6; }
.empty-action { margin-top: 12px; padding: 7px 10px; border: 1px solid #d7e4df; border-radius: 8px; color: #3d7166; background: #fff; font-size: 11px; font-weight: 600; cursor: pointer; }
.load-more-wrap { display: flex; justify-content: center; padding: 18px 0 2px; }
.load-more { min-height: 35px; padding: 0 14px; border: 1px solid #dfe7e4; border-radius: 9px; color: #64787e; background: #fff; font-size: 12px; font-weight: 600; cursor: pointer; }
.load-more:hover { border-color: #afcbc0; color: #34796e; }
.load-more[hidden] { display: none; }
.page-footer { display: flex; justify-content: space-between; gap: 15px; margin-top: 29px; padding-top: 14px; border-top: 1px solid #e1e7e5; color: #95a0a2; font-size: 11px; }
.page-footer span:last-child { flex: 0 0 auto; font: 11px var(--font-data); letter-spacing: .05em; }

.detail-dialog { width: min(660px, calc(100vw - 24px)); max-width: none; height: min(100dvh - 24px, 860px); max-height: calc(100dvh - 24px); margin-block: 12px; margin-inline: auto 12px; padding: 0; overflow: hidden; border: 1px solid #d9e2df; border-radius: 18px; color: var(--ink); background: #f8faf9; box-shadow: 0 24px 80px rgba(13,33,41,.25); }
.detail-dialog::backdrop { background: rgba(16, 34, 41, .44); backdrop-filter: blur(2px); }
.detail-shell { display: grid; height: 100%; grid-template-rows: auto minmax(0, 1fr) auto; }
.detail-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 22px 24px 17px; border-bottom: 1px solid var(--line); background: #fff; }
.detail-detected { margin: 7px 0 0; color: #869396; font: 12px var(--font-data); }
.close-detail { width: 32px; height: 32px; font-size: 21px; line-height: 1; }
.detail-body { overflow: auto; padding: 23px 24px; overscroll-behavior: contain; }
.detail-loading { color: #879598; font-size: 11px; }
.detail-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.detail-title-row h2 { margin: 0; color: #263d45; font: 500 26px/1.2 var(--font-display); overflow-wrap: anywhere; }
.detail-heading { min-width: 0; }
.detail-heading h2 { margin-top: 10px; }
.detail-heading .detail-product-id { margin-bottom: 0; }
.product-link { display: inline-flex; flex: 0 0 auto; align-items: center; padding: 8px 10px; border: 1px solid #d8e6df; border-radius: 8px; color: #3e776b; background: #fff; font-size: 11px; font-weight: 600; text-decoration: none; }
.product-link:hover { background: #eff7f3; }
.detail-section-title { margin: 21px 0 10px; color: #607278; font: 11px var(--font-data); letter-spacing: .12em; text-transform: uppercase; }
.absence-note, .detail-note { margin: 16px 0 0; padding: 11px 13px; border-inline-start: 2px solid var(--amber); border-radius: 0 8px 8px 0; color: #7c683e; background: #fbf5e9; font-size: 12px; line-height: 1.6; }
.snapshot-list { display: grid; gap: 7px; }
.snapshot-field { display: grid; grid-template-columns: minmax(115px, .32fr) minmax(0,1fr); gap: 12px; padding: 10px 12px; border: 1px solid #e0e7e5; border-radius: 9px; background: #fff; }
.snapshot-label { color: #718187; font-size: 11px; font-weight: 650; }
.snapshot-field .diff-value-content { max-height: 130px; }
.detail-empty, .detail-error { color: #75838a; font-size: 11px; line-height: 1.6; }
.detail-product-id { margin-top: 7px; color: #8a989b; font: 11px var(--font-data); }
.detail-open-link { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; padding: 8px 10px; border: 1px solid #d8e6df; border-radius: 8px; color: #3e776b; background: #fff; font-size: 11px; font-weight: 600; text-decoration: none; }
.detail-open-link:hover { background: #eff7f3; }
.detail-summary { display: flex; flex-wrap: wrap; gap: 7px; margin: 17px 0 21px; }
.detail-summary .type-badge { font-size: 11px; }
.detail-note { margin: 14px 0 0; padding: 10px 12px; border-inline-start: 2px solid var(--amber); border-radius: 0 8px 8px 0; color: #7c683e; background: #fbf5e9; font-size: 12px; line-height: 1.55; }
.diff-heading { display: flex; align-items: center; justify-content: space-between; margin: 18px 0 10px; }
.diff-heading h3 { margin: 0; color: #607278; font: 11px var(--font-data); letter-spacing: .12em; }
.diff-count { color: #94a0a2; font-size: 11px; }
.diff-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.diff-card { overflow: hidden; border: 1px solid #e0e7e5; border-radius: 11px; background: #fff; }
.diff-field { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; padding: 9px 12px; border-bottom: 1px solid #edf1ef; color: #465d63; font-size: 12px; font-weight: 650; }
.diff-values { display: grid; grid-template-columns: minmax(0,1fr) 22px minmax(0,1fr); align-items: stretch; }
.diff-value { min-width: 0; padding: 11px 12px 13px; }
.diff-before { background: #fcf6f3; }
.diff-after { background: #f1f7f3; }
.diff-label { display: block; margin-bottom: 7px; color: #9a8c85; font: 11px var(--font-data); letter-spacing: .08em; text-transform: uppercase; }
.diff-after .diff-label { color: #719283; }
.diff-value-content { max-height: 190px; overflow: auto; color: #55676b; font: 12px/1.55 var(--font-body); overflow-wrap: anywhere; white-space: pre-wrap; }
.diff-value-content.is-empty { color: #a6b0ae; font-style: italic; }
.full-value summary { margin-bottom: 6px; color: #65867a; font-size: 11px; cursor: pointer; }
.full-value pre { max-height: 280px; margin: 0; overflow: auto; color: #55676b; font: 11px/1.5 var(--font-data); white-space: pre-wrap; overflow-wrap: anywhere; }
.diff-arrow { display: grid; place-items: center; color: #a2b2ac; background: linear-gradient(90deg, #fcf6f3 0%, #f1f7f3 100%); font-size: 11px; }
.detail-footer { min-height: 57px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 24px; border-top: 1px solid var(--line); color: #8b989a; background: #fff; font-size: 11px; }
.noscript-message { position: fixed; inset: auto 12px 12px; padding: 12px; border: 1px solid #e1bcb3; border-radius: 10px; color: #8c4639; background: #fff7f5; }

@media (max-width: 980px) {
  .side-rail { width: 212px; }
  .main-content { margin-inline-start: 212px; }
  .page-wrap { padding-right: 28px; padding-left: 28px; }
  .topbar { padding-right: 28px; padding-left: 28px; }
  .hero-stamp { display: none; }
  .event-open { grid-template-columns: 78px minmax(0,1fr); }
}
@media (max-width: 720px) {
  .side-rail { position: static; width: 100%; height: auto; flex-direction: row; align-items: center; justify-content: space-between; padding: 11px 16px; }
  .brand-mark { width: 36px; height: 36px; border-radius: 10px; }
  .brand-mark svg { width: 27px; height: 27px; }
  .workspace-label, .rail-bottom { display: none; }
  .rail-nav { display: flex; gap: 4px; }
  .rail-link { min-height: 37px; gap: 7px; padding: 0 9px; font-size: 12px; }
  .rail-link svg { width: 15px; height: 15px; }
  .nav-count { display: none; }
  .main-content { margin-inline-start: 0; }
  .topbar { height: 50px; padding: 0 16px; }
  .timezone-label, .topbar-separator { display: none; }
  .topbar-right { gap: 10px; }
  .page-wrap { padding: 24px 16px 20px; }
  .hero { min-height: 0; padding: 5px 0 20px; }
  .hero h1 { font-size: 36px; }
  .hero p { max-width: 410px; font-size: 11px; }
  .summary-grid { gap: 8px; }
  .metric-card { min-height: 101px; padding: 12px 11px; }
  .metric-top { align-items: flex-start; gap: 5px; font-size: 11px; line-height: 1.35; }
  .metric-mark { width: 20px; height: 20px; border-radius: 7px; font-size: 12px; }
  .metric-value { margin: 9px 0 4px; font-size: 24px; }
  .metric-caption { font-size: 11px; }
  .activity-panel { margin-top: 11px; padding: 15px 13px 12px; }
  .activity-bars { gap: 7px; height: 52px; }
  .ledger-section { margin-top: 27px; }
  .ledger-heading { align-items: flex-start; flex-direction: column; gap: 12px; margin-bottom: 12px; }
  .time-filter { width: 100%; justify-content: space-between; }
  .time-filter button { flex: 1; padding: 0 5px; font-size: 11px; }
  .filter-bar { flex-direction: column; }
  .type-filter { width: 100%; }
  .event-open { grid-template-columns: 61px minmax(0,1fr); }
  .event-time { padding: 10px 5px 10px 9px; }
  .event-date { font-size: 11px; }
  .event-main { padding: 10px 10px 8px; }
  .event-product { flex-wrap: wrap; gap: 4px 7px; }
  .event-product strong { max-width: 100%; white-space: normal; }
  .event-detail-line { gap: 4px; margin-top: 6px; }
  .field-chip { font-size: 11px; }
  .event-row { grid-template-columns: minmax(0,1fr); }
  .event-open { grid-column: 1; }
  .event-chevron { display: none; }
  .page-footer { flex-direction: column; gap: 7px; }
  .detail-dialog { width: 100%; height: min(90dvh, 850px); max-height: 90dvh; margin: auto 0 0; border-radius: 18px 18px 0 0; }
  .detail-header { padding: 18px 17px 13px; }
  .detail-body { padding: 19px 16px; }
  .detail-title-row { flex-direction: column; }
  .detail-title-row h2 { font-size: 23px; }
  .detail-footer { padding: 11px 16px; }
}
@media (max-width: 390px) {
  .brand-copy strong { font-size: 11px; }
  .brand-copy span { font-size: 11px; }
  .rail-link { gap: 5px; padding: 0 7px; }
  .rail-link span { font-size: 11px; }
  .hero h1 { font-size: 32px; }
  .metric-top { font-size: 11px; }
  .diff-values { grid-template-columns: minmax(0,1fr) 16px minmax(0,1fr); }
  .diff-value { padding: 9px 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media print {
  .side-rail, .topbar, .summary-grid, .activity-panel, .filter-bar, .time-filter, .load-more-wrap, .detail-dialog { display: none !important; }
  .main-content { margin: 0; }
  .page-wrap { width: 100%; padding: 0; }
  .event-row { break-inside: avoid; box-shadow: none; }
  body { background: #fff; }
}

/* Persian interface: readable joined glyphs and isolated technical identifiers. */
.brand-copy strong, .brand-copy span, .workspace-label, .rail-foot, .eyebrow, .section-kicker,
.detail-section-title, .diff-label, .page-footer span:last-child { letter-spacing: normal; font-family: var(--font-body); }
.hero h1 { line-height: 1.55; letter-spacing: normal; font-size: clamp(30px, 4vw, 42px); }
.hero p { line-height: 1.9; }
.event-product strong { line-height: 1.9; }
.event-id { direction: ltr; unicode-bidi: isolate; }
.event-date, .event-clock, .metric-value { font-family: var(--font-body); }
.event-time { padding-inline: 12px 9px; }
.event-open { grid-template-columns: 100px minmax(0, 1fr); }
.diff-value-content, .full-value pre { line-height: 1.9; }
.absence-note, .detail-note { border-radius: 8px 0 0 8px; }
@media (max-width: 720px) {
  .event-open { grid-template-columns: 80px minmax(0, 1fr); }
  .hero h1 { font-size: 30px; }
  .brand { gap: 7px; }
  .rail-link { padding-inline: 7px; }
  .activity-total { flex-wrap: wrap; justify-content: end; max-width: 120px; }
  .summary-grid { grid-template-columns: 1fr; }
  .metric-card { min-height: 100px; }
  .metric-top { font-size: 12px; }
  .detail-title-row h2 { line-height: 1.7; }
}

.diff-removed { background: #f6d6ce; color: #743b30; text-decoration: line-through; text-decoration-thickness: 1px; border-radius: 2px; }
.diff-added { background: #cdebdc; color: #205d46; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; border-radius: 2px; }
.diff-path { direction: ltr; unicode-bidi: isolate; font: 12px var(--font-data); overflow-wrap: anywhere; }
.diff-type { display: block; margin-bottom: 8px; color: var(--muted-strong); font-size: 11px; }
.diff-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-block: 18px 10px; font-size: 12px; }
.diff-source { margin-top: 12px; }
.diff-source > summary { cursor: pointer; padding: 10px 0; color: var(--teal); font-size: 12px; }
.diff-source .diff-value-content { direction: ltr; text-align: left; font-family: var(--font-data); }
.diff-value-content { font-size: 13px; max-height: 320px; scrollbar-gutter: stable; }
.full-value .diff-value-content { max-height: 480px; }
@media (max-width: 720px) {
  .diff-values { grid-template-columns: minmax(0, 1fr); }
  .diff-arrow { display: none; }
  .diff-after { border-top: 1px solid var(--line); }
}
.detail-detected, .result-count, .nav-count, .timezone-label,
.detail-product-id, .activity-day-label { font-family: var(--font-body); }
.diff-edits { display: grid; gap: 10px; padding: 14px; }
.diff-edit { font-size: 14px; line-height: 2; overflow-wrap: anywhere; white-space: pre-wrap; }
.diff-edit strong { font-weight: 600; margin-inline-end: 6px; }
.diff-context { border-top: 1px solid var(--line); }
.diff-context > summary { padding: 10px 14px; color: var(--muted-strong); font-size: 12px; cursor: pointer; }
.html-change-list .diff-path { color: var(--teal); }
