/* Ice studio polish — prototype layer for html without data-theme="nordic".
   Ships with the account theme switcher; Nordic stays in nordic.css + simple-mode nordic blocks.
   Scope: simple mode, settings chrome, connect nudge, DNA light table shell, drawer. */

@font-face {
  font-family: "Inter Variable";
  src: url("/assets/fonts/inter-latin-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F, U+2190-21FF, U+2200-22FF;
}
@font-face {
  font-family: "Inter Variable";
  src: url("/assets/fonts/inter-cyrillic-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0400-04FF, U+0500-052F;
}

html:not([data-theme="nordic"]) {
  --ice-surface: rgb(255 255 255 / 78%);
  --ice-surface-solid: #fff;
  --ice-hover: rgb(49 95 155 / 8%);
  --ice-pressed: rgb(49 95 155 / 14%);
  --ice-line: rgb(39 50 74 / 12%);
  --sm-sel: var(--ice-deep, #315f9b);
  --sm-sel-fill: var(--ice-pressed);
}

/* ── header: mode toggle matches gate pills ── */
html:not([data-theme="nordic"]) .sm-mode {
  border-color: var(--ice-line);
  border-radius: 999px;
  background: var(--ice-surface);
  backdrop-filter: blur(12px);
}

html:not([data-theme="nordic"]) .sm-mode button {
  min-height: 0;
  border: 0;
  background: transparent;
  border-radius: 999px;
  padding: 0 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--glass-body);
}

html:not([data-theme="nordic"]) .sm-mode button:hover:not(:disabled) {
  background: var(--ice-hover);
  transform: none;
}

html:not([data-theme="nordic"]) .sm-mode button[aria-pressed="true"] {
  background: var(--ice-deep);
  color: var(--ice-page);
}

html:not([data-theme="nordic"]) .utilities #btnSimpleHelp {
  font-weight: 600;
}

@media (max-width: 767px) {
  html:not([data-theme="nordic"]) .sm-mode button {
    padding: 0 8px;
    font-size: 10px;
  }
}

/* ── simple mode: same rhythm as Nordic, azure chrome ── */
html:not([data-theme="nordic"]) .sm-back {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 0;
  border: 0;
  background: transparent;
  padding: 4px 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--glass-label);
}

html:not([data-theme="nordic"]) .sm-back:hover:not(:disabled) {
  background: transparent;
  color: var(--glass-ink);
  transform: none;
}

html:not([data-theme="nordic"]) .sm-dock-alt {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

html:not([data-theme="nordic"]) .sm-cta {
  min-height: 48px;
  padding: 0 24px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 400;
  border-radius: 999px;
}

html:not([data-theme="nordic"]) .sm-link {
  min-height: 0;
  border: 0;
  background: transparent;
  padding: 4px 2px;
  text-decoration: underline;
  text-underline-offset: 3px;
  color: var(--ice-deep);
  transform: none;
}

html:not([data-theme="nordic"]) .sm-link:hover:not(:disabled) {
  background: transparent;
  color: var(--ice-strong);
}

html:not([data-theme="nordic"]) button.sm-action {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 190px;
  padding: 20px;
  text-align: left;
  border: 1px solid var(--ice-line);
  border-radius: var(--radius-card);
  background: var(--ice-surface);
  backdrop-filter: blur(14px);
  box-shadow: var(--glass-shadow, 0 12px 40px rgb(49 95 155 / 10%));
  color: var(--glass-ink);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  transition: background-color 0.12s ease, border-color 0.12s ease, transform 0.2s var(--sm-ease, ease);
}

html:not([data-theme="nordic"]) button.sm-action:hover:not(:disabled) {
  background: var(--ice-surface-solid);
  border-color: var(--ice-strong);
  transform: translateY(-2px);
}

html:not([data-theme="nordic"]) button.sm-action .glyph {
  border-color: var(--ice-line);
  background: rgb(255 255 255 / 55%);
}

html:not([data-theme="nordic"]) button.sm-action.wide {
  grid-column: 1 / -1;
  min-height: 0;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

@media (max-width: 720px) {
  html:not([data-theme="nordic"]) button.sm-action {
    min-height: 0;
  }
}

html:not([data-theme="nordic"]) .sm-work {
  background: var(--ice-surface);
  border-color: var(--ice-line);
}

html:not([data-theme="nordic"]) button.sm-work {
  min-height: 0;
  padding: 8px;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
}

html:not([data-theme="nordic"]) button.sm-work:hover:not(:disabled),
html:not([data-theme="nordic"]) a.sm-work:hover {
  background: var(--ice-hover);
  transform: none;
}

html:not([data-theme="nordic"]) .sm-choice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 52px;
  padding: 10px 12px;
  text-align: left;
  border: 1px solid var(--ice-line);
  border-radius: var(--radius-mini);
  background: var(--ice-surface);
  color: var(--glass-ink);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
}

html:not([data-theme="nordic"]) .sm-choice[hidden] {
  display: none;
}

html:not([data-theme="nordic"]) :is(.sm-choice, .sm-look)[aria-pressed="true"] {
  border-color: var(--sm-sel);
  background: var(--sm-sel-fill);
  box-shadow: inset 0 0 0 1px var(--sm-sel);
}

html:not([data-theme="nordic"]) .sm-look {
  position: relative;
  display: grid;
  gap: 8px;
  min-height: 0;
  padding: 8px 8px 12px;
  text-align: left;
  border: 1px solid var(--ice-line);
  border-radius: var(--radius-nested);
  background: var(--ice-surface);
  color: var(--glass-ink);
  font-size: 14px;
  font-weight: 500;
}

html:not([data-theme="nordic"]) .sm-look .sw.voice {
  background: var(--ice-page);
}

html:not([data-theme="nordic"]) .sm-look .sm-tick {
  background: var(--ice-surface-solid);
}

html:not([data-theme="nordic"]) .sm-hit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  align-items: center;
  min-height: 0;
  padding: 12px 14px;
  text-align: left;
  border: 1px solid var(--ice-line);
  border-radius: var(--radius-mini);
  background: var(--ice-surface);
  color: var(--glass-ink);
  font-size: 14px;
  font-weight: 500;
}

html:not([data-theme="nordic"]) .sm-hit:hover:not(:disabled) {
  background: var(--ice-hover);
  transform: none;
}

html:not([data-theme="nordic"]) .sm-main :is(textarea, input[type="email"]) {
  width: 100%;
  font: inherit;
  font-size: 15px;
  padding: 12px 14px;
}

html:not([data-theme="nordic"]) .sm-main input.sm-caption {
  width: 100%;
  font: inherit;
  font-size: 15px;
  padding: 12px 14px;
  letter-spacing: 0.04em;
}

html:not([data-theme="nordic"]) .sm-summary,
html:not([data-theme="nordic"]) .sm-print {
  background: rgb(255 255 255 / 62%);
  border: 1px solid var(--ice-line);
}

html:not([data-theme="nordic"]) .sm-skel {
  background: linear-gradient(
    90deg,
    var(--ice-page) 0%,
    var(--ice-hover) 50%,
    var(--ice-page) 100%
  );
  background-size: 200% 100%;
}

/* icon controls in wizards */
html:not([data-theme="nordic"]) .sm-ico,
html:not([data-theme="nordic"]) .sm-icon {
  min-height: 0;
  transform: none;
}

html:not([data-theme="nordic"]) .sm-ico:hover:not(:disabled),
html:not([data-theme="nordic"]) .sm-icon:hover:not(:disabled) {
  background: var(--ice-hover);
  transform: none;
}

html:not([data-theme="nordic"]) .sm-menu button:hover:not(:disabled),
html:not([data-theme="nordic"]) .sm-row-open:hover:not(:disabled) {
  background: var(--ice-hover);
  transform: none;
}

html:not([data-theme="nordic"]) .sm-onboarding {
  background: var(--ice-surface-solid);
  box-shadow: 0 24px 64px rgb(49 95 155 / 18%);
}

html:not([data-theme="nordic"]) .sm-onboarding::backdrop {
  background: rgb(39 50 74 / 42%);
}

html:not([data-theme="nordic"]) .sm-dots i.on {
  background: var(--ice-deep);
}

html:not([data-theme="nordic"]) .sm-ob-list .n {
  border-color: var(--ice-line);
  background: var(--ice-page);
}

@media (max-width: 640px) {
  html:not([data-theme="nordic"]) .sm-dock .sm-dock-alt {
    flex: none;
    width: 48px;
    min-height: 48px;
    padding: 0;
    justify-content: center;
  }

  html:not([data-theme="nordic"]) .sm-dock {
    bottom: calc(63px + env(safe-area-inset-bottom, 0px));
    padding-bottom: 12px;
    background: var(--ice-page);
  }
}

/* ── connect nudge (Nordic rules live in nordic.css only) ── */
html:not([data-theme="nordic"]) .connect-nudge {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding: 12px 14px;
  border: 1px solid var(--ice-line);
  border-radius: var(--radius-mini);
  background: var(--ice-surface);
  backdrop-filter: blur(12px);
  color: var(--glass-ink);
  box-shadow: var(--glass-shadow, 0 8px 28px rgb(49 95 155 / 8%));
}

html:not([data-theme="nordic"]) .connect-nudge[hidden] {
  display: none;
}

html:not([data-theme="nordic"]) .overview > .connect-nudge,
html:not([data-theme="nordic"]) .sm-main > .connect-nudge {
  margin-top: 0;
}

html:not([data-theme="nordic"]) .connect-nudge p {
  flex: 1 1 200px;
  margin: 0;
  font-size: 14px;
}

html:not([data-theme="nordic"]) .connect-nudge-icon {
  display: inline-grid;
  color: var(--ice-deep);
}

html:not([data-theme="nordic"]) .connect-nudge-go {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid var(--ice-line);
  border-radius: 999px;
  color: var(--ice-deep);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}

html:not([data-theme="nordic"]) .connect-nudge-go:hover {
  background: var(--ice-hover);
}

html:not([data-theme="nordic"]) .connect-nudge-close {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border-color: transparent;
  background: transparent;
  color: var(--glass-label);
}

html:not([data-theme="nordic"]) .connect-nudge-close:hover:not(:disabled) {
  background: var(--ice-hover);
  transform: none;
}

/* ── Sidebar nav (web.css still has dot marks + caps; Nordic rules are scoped away) ── */
html:not([data-theme="nordic"]) button.nav-item {
  border: 0;
  background: transparent;
  color: var(--ice-body);
  font-weight: inherit;
  text-transform: none;
  transform: none;
  box-shadow: none;
}

html:not([data-theme="nordic"]) button.nav-item:hover:not(:disabled),
html:not([data-theme="nordic"]) button.nav-item:active:not(:disabled) {
  border-color: transparent;
  transform: none;
}

html:not([data-theme="nordic"]) button.nav-item:hover:not(:disabled) {
  background: var(--ice-hover);
}

html:not([data-theme="nordic"]) button.nav-item:active:not(:disabled) {
  background: var(--ice-pressed);
}

html:not([data-theme="nordic"]) .nav-item,
html:not([data-theme="nordic"]) button.nav-item {
  min-height: 38px;
  gap: 10px;
  padding: 7px 10px;
  border-radius: var(--radius-mini);
  font-family: "Inter Variable", Inter, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  font-weight: 450;
  letter-spacing: -0.005em;
  text-transform: none;
  color: var(--ice-body);
}

html:not([data-theme="nordic"]) .nav-item:hover:not(.future) {
  background: var(--ice-hover);
}

html:not([data-theme="nordic"]) .nav-item.active {
  color: var(--ice-ink);
  background: var(--ice-pressed);
  box-shadow: none;
  font-weight: 550;
}

html:not([data-theme="nordic"]) .nav-group > p {
  margin: 0 10px 2px;
  font-family: "Inter Variable", Inter, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 11px;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--ice-muted);
}

html:not([data-theme="nordic"]) .nav-mark.nav-icon,
html:not([data-theme="nordic"]) .nav-item.active .nav-mark.nav-icon,
html:not([data-theme="nordic"]) .nav-item.nav-locked .nav-mark.nav-icon {
  display: inline-grid;
  place-items: center;
  align-self: center;
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--ice-muted);
  flex: none;
}

html:not([data-theme="nordic"]) .nav-mark.nav-icon .icon {
  display: block;
  width: 18px;
  height: 18px;
}

html:not([data-theme="nordic"]) .nav-item:hover .nav-icon,
html:not([data-theme="nordic"]) .nav-item.active .nav-icon {
  color: var(--ice-ink);
}

html:not([data-theme="nordic"]) .nav-item .nav-count {
  color: var(--ice-muted);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

html:not([data-theme="nordic"]) .nav-live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  flex-shrink: 0;
  font-family: var(--font-mono);
  color: var(--ice-muted);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

html:not([data-theme="nordic"]) .nav-live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--nordic-ok, #1a7f37);
  box-shadow: 0 0 0 3px rgb(26 127 55 / 15%);
}

html:not([data-theme="nordic"]) .nav-item.nav-locked {
  cursor: pointer;
}

html:not([data-theme="nordic"]) .nav-item.nav-locked:hover {
  background: var(--ice-hover);
}

html:not([data-theme="nordic"]) .nav-lock {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

html:not([data-theme="nordic"]) .nav-lock .icon {
  width: 12px;
  height: 12px;
}

html:not([data-theme="nordic"]) .nav-teaser {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

html:not([data-theme="nordic"]) .nav-teaser.is-open {
  grid-template-rows: 1fr;
}

html:not([data-theme="nordic"]) .nav-teaser > .nav-teaser-inner {
  min-height: 0;
  overflow: hidden;
  margin: 0 4px 0 33px;
  border-radius: var(--radius-mini);
  background: var(--ice-page);
  border: 1px solid var(--ice-line);
  color: var(--ice-body);
  font-family: "Inter Variable", Inter, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 12px;
  line-height: 1.45;
  text-transform: none;
  letter-spacing: 0;
}

html:not([data-theme="nordic"]) .nav-teaser.is-open > .nav-teaser-inner {
  margin-bottom: 6px;
}

html:not([data-theme="nordic"]) .nav-teaser p {
  margin: 10px 12px 0;
  color: var(--ice-ink);
}

html:not([data-theme="nordic"]) .nav-teaser ul {
  margin: 6px 12px 0;
  padding-left: 16px;
}

html:not([data-theme="nordic"]) .nav-teaser li {
  margin: 3px 0;
}

html:not([data-theme="nordic"]) .nav-teaser .nav-teaser-foot {
  margin: 8px 12px 10px;
  color: var(--ice-muted);
}

html:not([data-theme="nordic"]) .nav-item-wrap > span:nth-child(2) {
  white-space: normal;
  line-height: 1.25;
}

html:not([data-theme="nordic"]) .sidebar-foot {
  font-family: "Inter Variable", Inter, -apple-system, sans-serif;
  font-size: 11px;
  text-transform: none;
  letter-spacing: 0.02em;
}

html:not([data-theme="nordic"]) .sidebar-account .language {
  height: 36px;
  min-height: 36px;
}

html:not([data-theme="nordic"]) .sidebar-account .language select {
  height: 100%;
  font-size: 10px;
}

/* ── mobile drawer: readable sheet on azure page ── */
@media (max-width: 1023px) {
  html:not([data-theme="nordic"]) aside.sidebar.is-open {
    padding-top: 24px;
    background: var(--ice-surface-solid);
    border-right: 1px solid var(--ice-line);
    box-shadow: 12px 0 40px rgb(49 95 155 / 12%);
  }
}

@media (max-width: 767px) {
  html:not([data-theme="nordic"]) #appSidebar.is-open {
    background: var(--ice-surface-solid);
    border-right: 1px solid var(--ice-line);
    box-shadow: 12px 0 40px rgb(49 95 155 / 12%);
  }
}

html:not([data-theme="nordic"]) .utility-header {
  background: rgb(255 255 255 / 72%);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--ice-line);
}

/* utilities row: language pill matches role / credits chips (Ice base uses 44px). */
html:not([data-theme="nordic"]) .utilities .quota-badge,
html:not([data-theme="nordic"]) .utilities .role-badge,
html:not([data-theme="nordic"]) .utilities .language {
  height: 30px;
  min-height: 30px;
}

html:not([data-theme="nordic"]) .utilities .language {
  width: 66px;
  padding: 0;
}

html:not([data-theme="nordic"]) .utilities .language select {
  height: 100%;
  width: 100%;
  min-height: 0;
  padding: 0 22px 0 12px;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
}

html:not([data-theme="nordic"]) .utilities .language .icon {
  right: 8px;
  width: 12px;
  height: 12px;
}

/* ── DNA light table shell (advanced overview / Idea Lab) ── */
html:not([data-theme="nordic"]) .dna-lamp.is-light-table {
  border: 1px solid var(--ice-line);
  border-radius: var(--radius-nested);
  background: var(--ice-surface);
}

html:not([data-theme="nordic"]) .is-light-table .dna-lamp-tile {
  border: 1px solid var(--ice-line);
  border-radius: var(--radius-mini);
  background: var(--ice-surface-solid);
}

html:not([data-theme="nordic"]) .is-light-table .dna-lamp-tile:focus-visible {
  outline: 2px solid var(--ice-deep);
  outline-offset: 1px;
}

html:not([data-theme="nordic"]) .is-light-table .dna-lamp-kind {
  color: var(--glass-label);
}

html:not([data-theme="nordic"]) .is-light-table .dna-lamp-tile em {
  color: var(--glass-body);
}

html:not([data-theme="nordic"]) .is-light-table.has-open .dna-lamp-tile:not(.is-open):not(.is-linked):not(.is-lit) {
  opacity: 0.35;
}

html:not([data-theme="nordic"]) .is-light-table .dna-lamp-tile.is-linked:not(.is-lit) {
  border-color: color-mix(in srgb, var(--c) 55%, transparent);
  background: color-mix(in srgb, var(--c) 6%, var(--ice-surface-solid));
}
