/* Web demo workspace. Keep the packaged native demo independent of this sheet. */
.web-workspace {
  --ink:#171b1d;
  --muted:#51595d;
  --line:#cdd7e1;
  --paper:#eff3f7;
  --guide:#34485e;
  --wash:#edf3fa;
}
.web-workspace [hidden] { display:none !important; }
.web-workspace .masthead {
  background-color:#171b1d;
  background-image:linear-gradient(#272d2f 1px,transparent 1px),
    linear-gradient(90deg,#272d2f 1px,transparent 1px);
  background-size:28px 28px;
}
.web-workspace .brand { font-size:clamp(1rem,4vw,1.55rem); }
.web-workspace .sidebar { background:#fff; }
.web-workspace nav button {
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:650;
}
.web-workspace nav button::before {
  content:"";
  width:22px;
  height:22px;
  flex:none;
  background:currentColor;
  mask:var(--icon) center / contain no-repeat;
}
.web-workspace [data-view=home] { --icon:url("./assets/nav-layout-dashboard.svg"); }
.web-workspace [data-view=repair] { --icon:url("./assets/nav-thumb-up.svg"); }
.web-workspace [data-view=snippets] { --icon:url("./assets/nav-message.svg"); }
.web-workspace [data-view=tips] { --icon:url("./assets/nav-bulb.svg"); }
.web-workspace [data-view=lessons] { --icon:url("./assets/nav-book.svg"); }
.web-workspace .hero { border-top:3px solid #e39a70; }
.web-workspace .tile { border-top:1px solid var(--line); }
.web-workspace .repair-library { grid-template-columns:repeat(auto-fit,minmax(min(100%,150px),1fr)); }
.web-workspace .repair-library .tile {
  position:relative;
  padding:12px 28px 12px 12px;
  background:#f6f8fc;
  border-radius:7px;
}
.web-workspace .repair-library .tile[aria-pressed=true] { background:#e5edf6; border-color:#46678d; }
.web-workspace .repair-library .tile[aria-pressed=true]::after {
  content:"✓";
  position:absolute;
  right:10px;
  top:11px;
  color:#294a6c;
}
.selected-repairs { display:grid; gap:10px; padding:12px; background:white; border:1px solid var(--line); border-radius:9px; }
.library-search { max-width:36rem; }
.repair-steps {
  list-style:none;
  margin:0;
  padding:0;
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:6px;
}
.repair-steps li { border-top:3px solid var(--line); color:var(--muted); padding-top:6px; font-size:.875rem; }
.repair-steps [aria-current=step] { border-color:#46678d; color:#294a6c; font-weight:750; }
.snippet-toolbar { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:end; gap:8px; max-width:42rem; }
.snippet-toolbar [aria-pressed=true] { background:var(--wash); border-color:#46678d; }
.snippet-rows { background:white; border:1px solid var(--line); border-radius:9px; }
.snippet-row { display:grid; grid-template-columns:44px minmax(0,1fr) auto; gap:4px; align-items:start; padding:4px 6px 4px 0; }
.snippet-row + .snippet-row { border-top:1px solid var(--line); }
.snippet-row summary {
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:4px 10px;
  min-height:44px;
  padding:5px 6px;
  cursor:pointer;
}
.snippet-row summary::after { content:"+"; color:var(--muted); margin-left:auto; }
.snippet-row details[open] summary::after { content:"−"; }
.snippet-row details .snippet-text { padding:6px 6px 12px; }
.snippet-row .snippet-star { padding:0; background:transparent; border-color:transparent; color:#576b77; font-size:1.3rem; }
.snippet-row .snippet-star[aria-pressed=true] { color:#986718; }
.web-workspace #snippet-form textarea,.web-workspace #snippet-draft { min-height:6rem; }
.web-workspace #main:focus { outline:none; }

@media(max-width:999px) {
  .web-workspace .workspace { display:block; }
  .web-workspace .sidebar { padding:10px 12px; border-inline-end:0; border-bottom:1px solid var(--line); }
  .web-workspace .dealership { padding-bottom:0; }
  .web-workspace .access { margin-top:4px; }
  .web-workspace nav {
    position:fixed;
    inset:auto 9px 8px;
    bottom:max(8px,env(safe-area-inset-bottom));
    z-index:5;
    grid-template-columns:repeat(5,minmax(0,1fr));
    gap:2px;
    max-width:560px;
    margin-inline:auto;
    background:#171b1d;
    padding:5px;
    border-radius:13px;
    box-shadow:0 4px 14px #171b1d40;
  }
  .web-workspace nav button {
    color:white;
    flex-direction:column;
    justify-content:center;
    padding:4px 1px;
    gap:3px;
    min-height:55px;
    font-size:.75rem;
    line-height:1.2;
  }
  .web-workspace nav button:hover { background:#34485e; }
  .web-workspace nav button[aria-current=page] { color:#171b1d; background:#ff852e; border-color:#ff852e; }
  .web-workspace main { padding-bottom:100px; }
  .web-workspace .repair-library { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .snippet-row button[data-action^="copy-snippet-"] { font-size:.8rem; padding-inline:6px; }
}

/* Learning screens follow the app's centered mode artwork and chapter directory. */
.tip-heading { display:grid; justify-items:center; gap:5px; text-align:center; }
.tip-heading button { display:grid; place-items:center; padding:0; border:0; background:transparent; }
.tip-heading img { display:block; width:96px; height:96px; }
.tip-heading button:hover { background:var(--wash); }
.tip-workspace { display:grid; grid-template-columns:minmax(0,1fr) minmax(220px,32%); gap:16px; align-items:start; }
.tip-search-row { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:end; gap:8px; }
.tip-search-row [aria-pressed=true] { background:var(--wash); border-color:#46678d; }
.tip-card-heading,.library-heading { display:flex; justify-content:space-between; gap:12px; align-items:center; }
.tip-card-heading button { color:#576b77; background:transparent; border:0; font-size:1.45rem; }
.tip-card-heading button[aria-pressed=true] { color:#986718; }
.tip-pager { justify-content:center; }
.tip-pager button { min-width:44px; font-size:1.4rem; padding:0; }
.saved-tips-panel { margin-top:75px; padding:14px; }
#saved-tips { display:grid; gap:4px; }
#saved-tips button { text-align:start; }
[data-action^="open-lesson-"] { text-align:start; }
[data-action^="open-lesson-"] small,[data-action^="open-lesson-"] strong { display:block; }
.library-heading + [data-action^="open-lesson-"] { background:var(--wash); border-color:#c9d6e4; padding:12px 16px; }
.chapter-group summary { cursor:pointer; font-weight:750; }
.chapter-group ul { list-style:none; padding:0; margin:10px 0 0; }
.chapter-group li + li { border-top:1px solid var(--line); }
.chapter-group li button { width:100%; border:0; border-radius:0; }
.lesson-reader blockquote { background:var(--wash); border-color:#c9d6e4; padding:14px; }
@media(max-width:1000px) {
  .tip-workspace { grid-template-columns:1fr; }
  .saved-tips-panel { display:none; }
  .tip-heading img { width:86px; height:86px; }
}
