:root {
    --bg: #000000;
    --card-bg: #111111;
    --text: #ffffff;
    --accent-red: #ff4d4d;
    --accent-green: #00e676;
    --border: #1a1a1a;
    --muted: #888888;
    --link: #58a6ff;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    padding: 60px 20px;
    display: flex;
    justify-content: center;
}

.container {
    max-width: 680px;
    width: 100%;
}

.card {
    background: var(--card-bg);
    padding: 32px;
    border-radius: 12px;
    border: 1px solid var(--border);
    margin-bottom: 32px;
}

h1 {
    margin: 0 0 24px 0;
    font-weight: 300;
    font-size: 1.8rem;
    letter-spacing: -0.5px;
}

.input-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 140px;
}

.field.narrow {
    flex: 0 0 128px;
    min-width: 128px;
}

label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--muted);
}

input {
    background: #000;
    border: 1px solid var(--border);
    color: white;
    padding: 10px;
    border-radius: 6px;
    font-size: 0.95rem;
    outline: none;
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.summary {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    font-size: 1.1rem;
}

#lifeRemaining { font-weight: 700; }


h2 {
    font-size: 20px;    
    margin: 16px 0;     
    font-weight: 700;   
    color: var(--text); 
    text-transform: none;
    letter-spacing: normal;
}


.sub-text {
    font-size: 14px;
    color: #666;
    margin: 0 0 20px 4px;
    line-height: 1.4;
}

.formula-hint {
    font-size: 14px;
    color: #666;
    margin-top: 0px;
    margin-bottom: 10px;
    font-weight: 400;
}

.table-card {
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
    margin-bottom: 8px;
}

.plot-container {
    width: 100%;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border);
    margin-bottom: 12px;
    overflow: hidden;
    min-height: 400px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: #181818;
    text-align: left;
    padding: 14px 20px;
    font-size: 10px;
    text-transform: uppercase;
    color: var(--muted);
    border-bottom: 1px solid var(--border);
}

td {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    color: #ccc;
}

tr:last-child td { border-bottom: none; }

.val-red { color: var(--accent-red); font-weight: 600; }
.val-green { color: var(--accent-green); font-weight: 600; }
.num-col { text-align: right; white-space: nowrap; }

sup a {
    color: inherit;
    text-decoration: none;
    font-size: 10px;
    padding-left: 2px;
}

.footnotes {
    margin-top: 60px;
    font-size: 12px;
    color: var(--muted);
}

.footnotes h3 {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.footnotes ol {
    padding-left: 18px;
}

.footnotes li {
    margin-bottom: 10px;
    line-height: 1.4;
}

.footnotes li:target {
    color: #fff;
    background: #222;
}

.footnotes a {
    color: inherit;
    text-decoration: underline;
}

footer {
    text-align: center;
    padding: 40px 0;
    display: flex;
    justify-content: center;
    gap: 24px;
}

footer a {
    color: var(--muted);
    text-decoration: underline;
    font-size: 10px;
    text-transform: uppercase;
}

a {
    color: inherit;
    text-decoration: underline;
}
a:hover {
    color: #fff;
}