/* =========================================================
   7H Engineering & Prototyping — materialsidan
   Bygger vidare på assets/css/style.css. Inga egna färger
   definieras här; allt utgår från variablerna i stilmallen.
   ========================================================= */

/* ---------- Undermeny ---------- */
.matnav {
  position: sticky;
  top: 71px;
  z-index: 40;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.matnav .wrap { display: flex; gap: 4px; overflow-x: auto; padding-top: 9px; padding-bottom: 9px; }
.matnav a {
  white-space: nowrap;
  font-size: .89rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 8px 13px;
  border-radius: 8px;
}
.matnav a:hover { background: var(--bg-alt); color: var(--accent-dark); }

/* ---------- Hero ---------- */
.hero h1 { max-width: 21ch; }

/* ---------- Hero-specifikation ---------- */
.spec {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr));
  gap: 24px;
  margin-top: 52px;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, .14);
}
.spec dt {
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #9fb0be;
  margin-bottom: 7px;
}
.spec dd { margin: 0; color: #fff; font-weight: 600; font-size: .99rem; line-height: 1.4; }

/* ---------- Rutnät ---------- */
/* Materialkorten innehåller egenskapstabell och behöver mer bredd än
   stilmallens grid--2 ger på stora skärmar. */
.grid--mat2 { grid-template-columns: repeat(auto-fit, minmax(min(430px, 100%), 1fr)); }
@media (max-width: 520px) { .grid--mat2 { grid-template-columns: 1fr; } }

/* ---------- Materialkort ---------- */
.matcard { display: flex; flex-direction: column; }
.matcard h3 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: .25em; }
.matcard__sub {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 16px;
}
.matcard p { margin-bottom: 1em; }
.matcard > :last-child { margin-bottom: 0; }

.badge {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 100px;
  white-space: nowrap;
}
.badge--ams { background: #e8f2ec; color: #1c6b4d; border: 1px solid #c3ddd0; }
.badge--feed { background: var(--accent-soft); color: var(--accent-dark); border: 1px solid #c4dbf1; }

/* Egenskapsrader med prickskala */
.props { margin: 4px 0 18px; border-top: 1px solid var(--line); }
.prop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: .9rem;
}
.prop span:first-child { color: var(--ink-soft); }
.dots { letter-spacing: .18em; color: var(--accent); white-space: nowrap; font-size: 1.02rem; line-height: 1; }
.dots .off { color: #c5d0d9; }

.uses { margin-bottom: 16px; }
.uses h4 {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 8px;
}
.uses ul { margin: 0; padding-left: 1.15em; color: var(--ink-soft); font-size: .95rem; }
.uses li { margin-bottom: .3em; }

.pick {
  margin: auto 0 0;
  padding: 13px 15px;
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  font-size: .94rem;
  color: #6b3a10;
}
.pick b { color: #4d2a0b; }

/* ---------- Jämförelsetabell ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  margin-top: 40px;
  box-shadow: var(--shadow);
}
.table-wrap table { border-collapse: collapse; width: 100%; min-width: 900px; font-size: .93rem; }
.table-wrap th, .table-wrap td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table-wrap thead th {
  position: sticky;
  top: 0;
  background: var(--bg-deep);
  color: #fff;
  font-size: .76rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 700;
}
.table-wrap tbody tr:nth-child(even) { background: #fafbfc; }
.table-wrap tbody th { font-weight: 700; white-space: nowrap; }
.table-wrap td.usecol { color: var(--ink-soft); min-width: 270px; }
.table-wrap .rowgroup td {
  background: var(--bg-alt);
  font-size: .75rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--ink-soft);
}
.legend { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 16px; font-size: .88rem; color: var(--ink-soft); }

/* ---------- Val-/rekommendationskort ---------- */
.chooser { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(310px, 100%), 1fr)); margin-top: 42px; }
.choice { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); }
.choice__q { display: block; font-weight: 700; font-size: 1rem; margin-bottom: 6px; }
.choice__a { display: block; font-weight: 700; color: var(--accent-dark); font-size: .97rem; margin-bottom: 8px; }
.choice p { margin: 0; color: var(--ink-soft); font-size: .91rem; }

/* ---------- Etiketter ---------- */
.pills { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 26px; }
.pill {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 8px 16px;
  font-size: .92rem;
  font-weight: 600;
  color: var(--ink-soft);
}

/* ---------- Notrutor ---------- */
.note {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--ink-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 22px 24px;
  margin-top: 30px;
}
.note--accent { border-left-color: var(--accent); }
.note h3 { font-size: 1.02rem; margin-bottom: .5em; }
.note p, .note li { color: var(--ink-soft); font-size: .96rem; }
.note > :last-child { margin-bottom: 0; }

/* ---------- Påverkansfaktorer ---------- */
.factors { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr)); gap: 12px; margin-top: 30px; }
.factor { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; font-weight: 700; font-size: .93rem; }
.factor span { display: block; font-weight: 400; font-size: .84rem; color: var(--ink-soft); margin-top: 3px; }

/* ---------- FAQ ---------- */
.faq { margin-top: 42px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer;
  padding: 18px 48px 18px 4px;
  font-weight: 700;
  font-size: 1.02rem;
  position: relative;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: translateY(-70%) rotate(45deg);
  transition: transform .15s ease;
}
.faq details[open] summary { color: var(--accent-dark); }
.faq details[open] summary::after { transform: translateY(-20%) rotate(-135deg); }
.faq summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.faq__body { padding: 0 4px 22px; color: var(--ink-soft); max-width: 80ch; }
.faq__body > :last-child { margin-bottom: 0; }

.fineprint { font-size: .89rem; color: var(--ink-soft); margin-top: 16px; max-width: 80ch; }

@media (max-width: 640px) {
  .matnav { top: 71px; }
  .pick { margin-top: 4px; }
}

/* ---------- Tillgänglighet ---------- */
.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;
}
