/* styrkeberegning.css (v1.1)
   Base layout + typografi for siden.
   Note: Dark theme overrides ligger i dampkedler.theme-dark.css
*/

:root{
  --bg: #ffffff;
  --text: #111111;
  --muted: rgba(17,17,17,0.65);
  --card: #ffffff;
  --border: rgba(0,0,0,0.12);
  --shadow: 0 10px 22px rgba(0,0,0,0.06);
  --radius: 14px;
}

/* Reset-ish */
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

/* Layout */
.wrap{
  max-width: 980px;
  margin: 0 auto;
  padding: 0 1rem;
}

.top{
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.top .wrap{ padding: 1.1rem 1rem; }
.top h1{ margin:0; line-height:1.15; font-size: clamp(1.6rem, 2.2vw, 2.1rem); }
.sub{ margin:.25rem 0 0; color: var(--muted); }

.meta{
  margin-top: .75rem;
  display:flex;
  align-items:center;
  gap:.5rem;
  flex-wrap: wrap;
}
.crumbs{ color: var(--muted); font-size:.95rem; }
.crumbs a{ color: inherit; text-decoration:none; border-bottom: 1px dashed rgba(0,0,0,0.25); }
.crumbs a:hover{ border-bottom-style: solid; }

.pill{
  display:inline-flex;
  align-items: baseline;
  gap:.45rem;
  padding:.25rem .6rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size:.9rem;
  background: rgba(255,255,255,0.75);
}
.pill span{ color: var(--muted); font-size:.85em; }
.pill.status b{ text-transform: lowercase; }

.theme-toggle{
  margin-left:auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width: 40px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.75);
  cursor:pointer;
}
.theme-toggle:hover{ filter: brightness(0.98); }
.theme-toggle:active{ transform: translateY(1px); }

/* Content cards */
main.wrap{ padding: 1.25rem 1rem 2rem; }
.card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.1rem;
  margin: 1rem 0;
}
h2,h3{ line-height:1.25; margin: .2rem 0 .6rem; }
h2{ font-size: 1.25rem; }
h3{ font-size: 1.05rem; color: var(--text); }

.equations{
  display:grid;
  gap:.85rem;
  margin-top:.65rem;
}
.eq .label{
  font-weight: 650;
  margin-bottom: .15rem;
}
.muted{ color: var(--muted); margin:.25rem 0; }

table{
  border-collapse: collapse;
  width: 100%;
  margin: .75rem 0;
  font-size: 0.95rem;
}
th, td{
  border: 1px solid rgba(0,0,0,0.18);
  padding: 0.45rem 0.6rem;
  text-align: left;
  vertical-align: top;
}
th{ background: rgba(0,0,0,0.03); }

code, pre{
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.95em;
}
pre{
  padding: 0.75rem;
  border: 1px solid rgba(0,0,0,0.12);
  overflow: auto;
  border-radius: 12px;
  background: rgba(0,0,0,0.03);
}

img{ max-width:100%; height:auto; }

/* Foldouts */
details.fold{
  border: 1px dashed rgba(0,0,0,0.18);
  border-radius: 12px;
  padding: .65rem .75rem;
  background: rgba(0,0,0,0.02);
}
details.fold + details.fold{ margin-top: .75rem; }
details.fold summary{
  cursor: pointer;
  font-weight: 650;
}
details.fold ul{ margin: .6rem 0 0 1.2rem; }

/* Footer */
.foot{
  border-top: 1px solid var(--border);
  padding: 1rem 0 2rem;
  color: var(--muted);
}
.foot p{ margin: 0; }


/* --- Kompatibilitet (auto) --- */

/* Placeholder-tabeller */
.site-header, .content, .header-inner, .meta-row, .status-badge { display:none; }

/* Table wrap helper */
.table-wrap{ overflow:auto; border:1px solid var(--line); border-radius: 14px; background: var(--card); }
.table-wrap table{ margin:0; border-collapse: collapse; width:100%; }
.table-wrap th, .table-wrap td{ border:1px solid var(--line); padding:.5rem .6rem; vertical-align:top; text-align:left; }
