:root {
  --hf-accent: #1d5e4d;
  --cc-ink: #132d28;
  --cc-muted: #52665f;
  --cc-paper: #f3f5ef;
  --cc-line: #dce5db;
  --cc-green: #1d5e4d;
}

[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.cc-app, .cc-login { font-family: "Inter", "Avenir Next", system-ui, sans-serif; color: var(--cc-ink); background: var(--cc-paper); }
.cc-app .main { background: var(--cc-paper); }
.cc-app .sidebar { background: #122e28; color: #e9f4e9; }
.cc-app .sidebar-brand { gap: 12px; }
.cc-app .brand-text strong { color: #fff; line-height: 1.13; font-size: 15px; }
.cc-app .brand-text small, .cc-app .sidebar-nav p { color: #a9beb4; }
.cc-app .sidebar-nav a { color: #e7f2eb; }
.cc-app .sidebar-nav a.active { color: #e0ffcf; background: #274c3e; box-shadow: inset 2px 0 #b6e796; }
.cc-app .sidebar-foot button, .cc-app .sidebar-hub { color: #d5e5dd; }
.cc-app .topbar { background: #f6f9f2e8; border-color: var(--cc-line); backdrop-filter: blur(16px); min-height: 66px; }
.cc-app .topbar-actions { margin-left: auto; gap: 8px; }
.cc-app .topbar select { width: auto; min-width: 116px; max-width: 200px; border-color: #d3ded2; padding: 8px 12px; background: #ffffffb8; color: var(--cc-ink); }
.breadcrumb { display: flex; align-items: center; gap: 11px; font-size: 13px; color: var(--cc-muted); }
.breadcrumb strong { color: var(--cc-ink); }
.cc-app .content { width: min(100%, 1350px); margin-inline: auto; padding: 28px clamp(20px, 3.2vw, 52px) 48px; }
.market {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: 224px; background: #173c32; color: #f5faee;
  border: 1px solid #2b5748; border-radius: 22px;
  padding: clamp(20px, 4vw, 38px); display: grid; align-content: space-between; gap: 22px;
}
.market-main, .market-stats { position: relative; z-index: 1; }
.market-label { display: inline-flex; gap: 9px; align-items: center; color: #d9e8d5; font-size: 13px; font-weight: 650; letter-spacing: .04em; }
.flag { width: 19px; height: 12px; border-radius: 2px; display: inline-block; background: #7eac96; }
.flag-it { background: linear-gradient(90deg, #37976b 33.333%, #fff 33.333% 66.667%, #dc665d 66.667%); }
.market h1 { margin: 3px 0 0; color: white; font-family: "Georgia", serif; font-weight: 500; font-size: clamp(52px, 7.1vw, 91px); letter-spacing: -.075em; line-height: 1; overflow-wrap: anywhere; }
.market-mark { position: absolute; z-index: 0; top: -21%; right: 4%; width: min(37%, 390px); aspect-ratio: 1; display: grid; place-items: center; border: 1px solid #76ae964a; border-radius: 50%; }
.market-mark::before, .market-mark::after { content: ""; position: absolute; inset: 12%; border: 1px solid #8cc2a754; border-radius: 50%; }
.market-mark::after { inset: -12%; border-color: #76ae9628; }
.market-mark img { width: 27%; height: auto; transform: rotate(-12deg); opacity: .8; }
.market-stats { display: flex; gap: clamp(7px, 2.4vw, 30px); width: fit-content; max-width: 100%; padding: 9px 14px; border: 1px solid #adc5b148; background: #ffffff10; border-radius: 12px; backdrop-filter: blur(12px); }
.market-stats div { display: flex; align-items: baseline; gap: 7px; }
.market-stats strong { color: #e5ffd5; font-size: 20px; font-variant-numeric: tabular-nums; line-height: 1.15; }
.market-stats span { color: #e0ecdf; font-size: 12px; }
.listing { margin-top: 29px; }
.section-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.section-header h2 { font-size: clamp(24px, 3vw, 33px); line-height: 1.14; letter-spacing: -.035em; margin: 0; }
.section-header p { color: var(--cc-muted); font-size: 13px; margin: 4px 0 0; min-height: 1em; }
.cc-app .primary, .cc-login .primary { background: #1b5143; border-color: #1b5143; color: white; gap: 8px; }
.cc-app .primary:hover, .cc-login .primary:hover { background: #12392e; border-color: #12392e; }
.plus { font-size: 19px; line-height: 1; }
.icon-button { padding: 0; min-width: 38px; min-height: 38px; font-size: 21px; justify-content: center; }
.filters-cc { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 12px; align-items: stretch; }
.filters-cc select, .filters-cc input, .sheet input:not([type=checkbox]), .sheet select, .sheet textarea { background: #fff; color: var(--cc-ink); border: 1px solid #d6e0d5; border-radius: 9px; min-height: 40px; }
.filters-cc select { flex: 0 1 auto; max-width: 220px; padding: 7px 10px; }
.search-wrap { position: relative; flex: 1; min-width: min(230px, 100%); display: flex; align-items: center; }
.search-wrap [data-icon] { position: absolute; left: 13px; color: var(--cc-muted); }
.search-wrap input { padding: 8px 12px 8px 39px; width: 100%; }
.archive { padding: 0; margin: 0; overflow: hidden; background: #fff; list-style: none; border: 1px solid var(--cc-line); border-radius: 14px; }
.archive li + li { border-top: 1px solid #e6ece4; }
.archive-row { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(90px, auto) 20px; gap: 13px; align-items: center; padding: 14px 17px; text-align: left; background: none; border: 0; color: inherit; }
button.archive-row { cursor: pointer; }
button.archive-row:hover { background: #f1f7ed; }
.archive-row strong { display: block; font-size: 15px; line-height: 1.25; overflow-wrap: anywhere; }
.archive-row small { display: block; margin-top: 4px; color: var(--cc-muted); font-size: 12px; overflow-wrap: anywhere; }
.archive-row .arrow { color: #41735f; font-size: 21px; justify-self: end; }
.archive-row .pill { justify-self: end; }
.cc-app .pill { white-space: nowrap; font-size: 11px; }
.cc-app .pill.warn { color: #785413; background: #faf0d7; }
.cc-app .pill.ok { color: #22563c; background: #def1dc; }
.cc-app .pill.neutral { color: #485c55; background: #eaf0ec; }
.empty, .loading { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 130px; padding: 24px; text-align: center; background: #ffffff8a; color: var(--cc-muted); border: 1px solid var(--cc-line); border-radius: 14px; }
.loading img { animation: cc-load 1.15s ease-in-out infinite alternate; }
@keyframes cc-load { to { transform: translateY(-4px) scale(.9); opacity: .58; } }
.sheet { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(100%, 690px); max-width: 100%; max-height: 100dvh; height: 100dvh; color: var(--cc-ink); background: #f9fbf7; border: 0; border-left: 1px solid var(--cc-line); padding: 0; box-shadow: -15px 0 70px #112c273b; overflow: auto; }
.sheet::backdrop { background: #09241c55; backdrop-filter: blur(3px); }
.sheet-head { position: sticky; z-index: 2; top: 0; display: flex; justify-content: space-between; align-items: flex-start; gap: 13px; padding: 21px 26px; background: #f9fbf7ed; backdrop-filter: blur(16px); border-bottom: 1px solid var(--cc-line); }
.sheet-head h2, .sheet-head p { margin: 0; overflow-wrap: anywhere; }
.sheet-head h2 { font-size: 25px; line-height: 1.15; letter-spacing: -.027em; }
.sheet-head p { color: var(--cc-muted); font-weight: 650; font-size: 12px; margin-bottom: 5px; }
.sheet-body { padding: 22px 26px 34px; }
.sheet-alert { margin: 14px 26px 0; padding: 11px 13px; border-radius: 8px; color: #8b332c; background: #f9e8e4; }
.sheet .field { display: grid; gap: 5px; text-align: left; }
.sheet .field > span, .sheet legend { color: var(--cc-ink); font-size: 13px; font-weight: 700; }
.sheet input:not([type=checkbox]), .sheet select, .sheet textarea { width: 100%; padding: 9px 10px; font: inherit; }
.sheet textarea { min-height: 108px; resize: vertical; }
.sheet .long-text { min-height: 210px; }
.sheet .code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.sheet .fields { display: grid; gap: 14px; }
.sheet .fields-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sheet fieldset { margin: 0; border: 1px solid var(--cc-line); border-radius: 10px; padding: 12px; display: grid; gap: 9px; }
.sheet fieldset label { display: flex; gap: 8px; font-size: 13px; align-items: center; }
.sheet input[type=checkbox] { accent-color: var(--cc-green); }
.sheet input[type=file] { min-width: 0; }
.field-note, .document-meta { color: var(--cc-muted); font-size: 13px; }
.sheet .toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-block: 16px; }
.sheet .toolbar:first-child { margin-top: 0; }
.sheet .document-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; line-height: 1.6; margin: 12px 0 0; }
.sheet .rule-data { display: grid; gap: 12px; margin: 16px 0; }
.sheet .rule-data div { margin: 0; padding: 12px; border: 1px solid var(--cc-line); border-radius: 10px; }
.sheet .rule-data dt { font-weight: 750; margin-bottom: 3px; }
.sheet .rule-data dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.sheet a.source-link { color: #155745; text-decoration: underline; text-underline-offset: 3px; }
.history { display: grid; gap: 7px; padding: 0; list-style: none; }
.history li { padding: 9px 10px; background: #eff4ed; border-radius: 8px; overflow-wrap: anywhere; }
.history button { color: #155745; font-weight: 750; cursor: pointer; border: 0; background: none; padding: 0; }
.history small { margin-left: 6px; color: var(--cc-muted); }
.history p { margin: 3px 0 0; font-size: 13px; }
.facts-grid { display: grid; gap: 8px; }
.sheet .facts-grid label { display: grid; grid-template-columns: minmax(0, 1fr) 135px; align-items: center; gap: 8px; }
.checks { display: grid; gap: 8px; padding: 0; list-style: none; }
.checks details { border: 1px solid var(--cc-line); background: white; border-radius: 9px; }
.checks summary { padding: 10px 12px; cursor: pointer; }
.checks summary .pill { margin-left: 5px; }
.checks-body { padding: 0 12px 12px; }
.checks-body p { margin: 8px 0; }
.key-value { display: block; width: 100%; overflow-wrap: anywhere; padding: 12px; border: 1px solid var(--cc-line); background: #edf4e9; border-radius: 9px; font-family: ui-monospace, monospace; }
.cc-login .login-brand { gap: 10px; color: var(--cc-ink); }
.cc-login .login-card { border: 1px solid var(--cc-line); padding: 24px; border-radius: 18px; }
.cc-login .login-card h1 { margin-top: 0; }
.cc-login .login-card .ghost { margin-top: 8px; }
@media (max-width: 720px) {
  .cc-app .content { padding: 18px 17px 30px; }
  .breadcrumb span { display: none; }
  .market { min-height: 192px; border-radius: 17px; }
  .market-mark { top: -4%; right: 8%; }
  .section-header { gap: 8px; }
  .archive-row { padding-inline: 12px; }
}
@media (max-width: 480px) {
  .cc-app .content { padding-inline: 12px; }
  .cc-app .topbar { gap: 6px; padding-inline: 10px; }
  .cc-app .topbar select { min-width: 80px; max-width: 128px; }
  .breadcrumb strong { font-size: 12px; }
  .market-stats { gap: 10px; align-items: center; }
  .market-stats div { display: grid; gap: 2px; }
  .market-stats span { font-size: 11px; }
  .section-header h2 { font-size: 22px; }
  .section-header .primary { font-size: 12px; padding-inline: 8px; }
  .search-wrap { flex-basis: 100%; }
  .filters-cc select { flex: 1 1 120px; min-width: 0; max-width: none; }
  .archive-row { grid-template-columns: minmax(0, 1fr) auto; gap: 7px; }
  .archive-row .arrow { display: none; }
  .sheet-head, .sheet-body { padding-inline: 15px; }
  .sheet-alert { margin-inline: 15px; }
  .sheet .fields-two { grid-template-columns: 1fr; }
  .sheet .facts-grid label { grid-template-columns: minmax(0, 1fr) 105px; }
}
@media (prefers-reduced-motion: reduce) {
  .loading img { animation: none; }
}
