/* T1 Guida satellite — scorciatoie + tutorial (S-GUIDE v1) */

:root {
  --guide-accent: color-mix(in srgb, var(--t1-pearl, #e8f0fa) 42%, var(--t1-cyan, #00e5ff));
}

body[data-t1-space='guide'] {
  --t1s-shell-accent: var(--guide-accent);
}

.guide-topbar {
  grid-template-columns: minmax(0, max-content) minmax(0, 1fr) minmax(0, max-content);
}

.guide-topbar__lead {
  margin: 0;
  font-size: 0.62rem;
  letter-spacing: 0.03em;
  color: rgba(200, 214, 232, 0.62);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.guide-link {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(210, 224, 242, 0.78);
  text-decoration: none;
  padding: 0.28rem 0.55rem;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.guide-link:hover,
.guide-link:focus-visible {
  color: rgba(248, 252, 255, 0.95);
  border-color: color-mix(in srgb, var(--guide-accent) 22%, rgba(255, 255, 255, 0.08));
  background: rgba(255, 255, 255, 0.04);
  outline: none;
}

.guide-link--nav {
  white-space: nowrap;
  transition:
    color 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.guide-link--nav:hover,
.guide-link--nav:focus-visible {
  color: rgba(248, 252, 255, 0.98);
  border-color: color-mix(in srgb, var(--guide-accent) 42%, rgba(255, 255, 255, 0.1));
  background: color-mix(in srgb, var(--guide-accent) 14%, rgba(255, 255, 255, 0.05));
  box-shadow:
    0 0 20px color-mix(in srgb, var(--guide-accent) 20%, rgba(0, 0, 0, 0.2)),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  outline: none;
}

.guide-link--nav:active {
  background: color-mix(in srgb, var(--guide-accent) 20%, rgba(255, 255, 255, 0.04));
  border-color: color-mix(in srgb, var(--guide-accent) 48%, rgba(255, 255, 255, 0.12));
}

.guide-main {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.guide-shell {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(148px, 200px) minmax(0, 1fr);
  gap: 0;
  overflow: hidden;
}

.guide-facet {
  border-right: 1px solid color-mix(in srgb, var(--guide-accent) 10%, rgba(255, 255, 255, 0.06));
  background: rgba(0, 0, 0, 0.22);
  padding: 0.85rem 0.65rem;
  overflow-y: auto;
}

.guide-facet__nav .ps-facet__btn.is-active {
  border-color: color-mix(in srgb, var(--guide-accent) 35%, rgba(255, 255, 255, 0.1));
  background: color-mix(in srgb, var(--guide-accent) 8%, rgba(255, 255, 255, 0.03));
  color: rgba(248, 252, 255, 0.94);
}

.guide-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

.guide-panel__head {
  flex-shrink: 0;
  padding: 1rem 1.35rem 0.65rem;
  border-bottom: 1px solid color-mix(in srgb, var(--guide-accent) 8%, rgba(255, 255, 255, 0.05));
}

.guide-panel__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: rgba(248, 252, 255, 0.96);
}

.guide-panel__sub {
  margin: 0.35rem 0 0;
  font-size: 0.72rem;
  line-height: 1.45;
  color: rgba(188, 208, 232, 0.72);
}

.guide-panel__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 1rem 1.35rem 1.5rem;
}

.guide-note {
  margin: 0 0 1rem;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--guide-accent) 14%, rgba(255, 255, 255, 0.08));
  background: color-mix(in srgb, var(--guide-accent) 5%, rgba(0, 0, 0, 0.28));
  font-size: 0.68rem;
  line-height: 1.45;
  color: rgba(210, 224, 242, 0.82);
}

.guide-quickstart {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
  font-size: 0.72rem;
  line-height: 1.55;
  color: rgba(210, 224, 242, 0.88);
}

.guide-quickstart li + li {
  margin-top: 0.55rem;
}

.guide-table-wrap {
  overflow-x: auto;
  margin-bottom: 1.25rem;
}

.guide-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.72rem;
}

.guide-table th,
.guide-table td {
  text-align: left;
  vertical-align: top;
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.guide-table th {
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--guide-accent) 70%, rgba(200, 220, 240, 0.75));
}

.guide-table td:first-child {
  white-space: nowrap;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.68rem;
  color: rgba(248, 252, 255, 0.92);
}

.guide-table td:last-child {
  color: rgba(200, 214, 232, 0.78);
  line-height: 1.4;
}

.guide-kbd {
  display: inline-block;
  padding: 0.12rem 0.38rem;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.35);
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.66rem;
  line-height: 1.3;
  color: rgba(248, 252, 255, 0.94);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.06);
}

.guide-faq__group + .guide-faq__group {
  margin-top: 1.1rem;
}

.guide-faq__group-title {
  margin: 0 0 0.45rem;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--guide-accent) 65%, rgba(200, 220, 240, 0.72));
}

.guide-faq__list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.guide-faq__item {
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--guide-accent) 10%, rgba(255, 255, 255, 0.07));
  background: rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.guide-faq__question {
  padding: 0.65rem 0.85rem;
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.4;
  color: rgba(248, 252, 255, 0.92);
  cursor: pointer;
  list-style: none;
}

.guide-faq__question::-webkit-details-marker {
  display: none;
}

.guide-faq__question::after {
  content: '+';
  float: right;
  font-size: 0.85rem;
  font-weight: 400;
  color: rgba(188, 208, 232, 0.55);
}

.guide-faq__item[open] .guide-faq__question::after {
  content: '−';
}

.guide-faq__answer {
  padding: 0.55rem 0.85rem 0.75rem;
  font-size: 0.68rem;
  line-height: 1.5;
  color: rgba(188, 208, 232, 0.78);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.guide-tutorials {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.guide-tutorial-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--guide-accent) 12%, rgba(255, 255, 255, 0.08));
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.04), rgba(0, 0, 0, 0.24));
}

.guide-tutorial-card__title {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(248, 252, 255, 0.94);
}

.guide-tutorial-card__body {
  margin: 0;
  font-size: 0.68rem;
  line-height: 1.45;
  color: rgba(188, 208, 232, 0.78);
}

.guide-tutorial-card__link {
  align-self: flex-start;
  margin-top: 0.25rem;
  font-size: 0.68rem;
  font-weight: 500;
  color: color-mix(in srgb, var(--t1-cyan, #00e5ff) 78%, white);
  text-decoration: none;
}

.guide-tutorial-card__link:hover,
.guide-tutorial-card__link:focus-visible {
  text-decoration: underline;
  outline: none;
}

.guide-tutorial-card__badge {
  display: inline-block;
  margin-top: 0.15rem;
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(188, 208, 232, 0.55);
}

@media (max-width: 720px) and not ((hover: hover) and (pointer: fine)) {
  .guide-topbar {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .guide-topbar__lead {
    display: none;
  }

  .guide-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .guide-facet {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 0.5rem;
  }

  .guide-facet__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
  }
}

/* Tier C · Guida — laptop finestra stretta (≤1100) */
@media (hover: hover) and (pointer: fine) and (max-width: 1100px) {
  body.guide-root.t1s-root--archivio .guide-topbar {
    padding-left: 1.1rem;
    padding-right: 1.1rem;
  }

  body.guide-root.t1s-root--archivio .guide-brand {
    max-width: 11rem;
  }

  body.guide-root.t1s-root--archivio .guide-shell {
    grid-template-columns: 200px minmax(0, 1fr);
    min-width: var(--t1-coach-desktop-canvas-w);
  }
}
