:root {
    --bg: #fafafa;
    --card: #ffffff;
    --text: #0f172a;
    --muted: #475569;
    --accent: rgb(37, 99, 235);
    --accent-hover: rgb(27, 89, 225);
    --code: rgba(0, 0, 0, 0.05);
    --code-hover: rgba(0, 0, 0, 0.1);
    --radius: 10px;
}

:root.dark {
    --bg: #000000;
    --card: #111111;
    --text: #ffffff;
    --muted: #dddddd;
    --accent: rgb(0, 0, 139);
    --accent-hover: rgb(20, 20, 159);
    --code: rgba(255, 255, 255, 0.1);
    --code-hover: rgba(255, 255, 255, 0.15);
    --radius: 10px;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 0rem 2rem;
    transition: background 0.3s, color 0.3s;
}

header {
    display: flex;
    align-items: center;
    flex-direction: row;
}

h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

p {
    color: var(--muted);
}

.blueBtn {
    background: var(--accent);
    border: none;
    padding: 0.8rem 2rem;
    color: white;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 1rem;
    margin-top: 1rem;
    width: 100%;
    gap: 1rem;
}

.blueBtn:hover {
    background: var(--accent-hover);
}

.results {
    margin-top: 2rem;
    display: none;
}

.summary, .card {
    background: var(--card);
    padding: 1rem;
    border-radius: var(--radius);
}

.summary {
    margin-bottom: 1rem;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.badge {
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius);
    font-size: 0.8rem;
    margin-left: 0.5rem;
    color: white;
}

.low {
    background: #16a34a
}

.medium {
    background: #d97706;
}

.high {
    background: #dc2626;
}

strong {
    color: var(--text);
}

.explanation {
    font-size: 0.85rem;
    color: var(--muted);
}

code {
    display: inline-block;
    background: var(--code);
    color: var(--text);
    padding: 0.2rem 0.4rem;
    border-radius: var(--radius);
    font-size: 0.9rem;                
    max-width: 85%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

code {
    cursor: pointer;
    margin-left: 0;
}

p > code {
    margin-left: 5px;
}

code:hover {
    background: var(--code-hover);
}

#main-icon {
    width: 8rem;
    height: 8rem;
    overflow: visible;
    margin-left: auto;
}

.icon {
    width: 1rem;
    height: 1rem;
    overflow: visible;
    margin: 0rem 0.25rem 0rem;
    fill: var(--text);
}

a {
    color: var(--text);
    text-decoration: underline;
    cursor: pointer;
}

a:visited {
    color: var(--text);
}

a:hover {
    color: var(--muted);
}

.summary-p {
  display: flex;
  align-items: center;
}

.modal {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: var(--card);
  color: var(--text);
  padding: 1rem;
  border-radius: var(--radius);
  max-width: 600px;
  width: 90%;
  max-height: 80%;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 0 20px rgba(0,0,0,0.3);
}

.closeModal {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: var(--muted);
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* full viewport height */
}

main {
    flex: 1;
}

footer {
    text-align: center;
    padding: 0.5rem;
}