:root {
    --ink: #1B1F2E;
    --ink-surface: #242A3D;
    --ink-surface-raised: #2C3348;
    --parchment: #EDE6D6;
    --parchment-dim: #B8AF9C;
    --saffron: #D4A017;
    --saffron-dim: #8A6B15;
    --sage: #7C9473;
    --clay: #C97B4A;
    --hairline: #38405A;

    --font-serif: 'Source Serif 4', Georgia, serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--ink);
    color: var(--parchment);
    font-family: var(--font-sans);
    line-height: 1.5;
}

#loading {
    padding: 4rem 2rem;
    text-align: center;
    color: var(--parchment-dim);
    font-family: var(--font-serif);
    font-size: 1.1rem;
}

.site-header {
    padding: 3rem 1.5rem 2rem;
    max-width: 760px;
    margin: 0 auto;
}

.header-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.site-header h1 {
    font-family: var(--font-serif);
    font-weight: 600;
    font-size: 2.25rem;
    margin: 0 0 0.5rem;
    color: var(--saffron);
    letter-spacing: -0.01em;
}

.tagline {
    color: var(--parchment-dim);
    font-size: 0.95rem;
    max-width: 60ch;
    margin: 0;
}

main {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 1.5rem 3rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.panel {
    background: var(--ink-surface);
    border: 1px solid var(--hairline);
    border-radius: 6px;
    padding: 1.5rem;
}

.panel h2 {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 1rem;
    color: var(--parchment);
}

/*
  All Profitable Trades needs real width for its 10-column table - rather
  than widen the whole app's layout (a bigger, separate decision saved for
  the future Settings/responsive-layout feature), just this one panel
  breaks out of the shared 760px column and re-centers itself on the page.
*/
#all-trades {
    width: 94vw;
    max-width: 1200px;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

.profile-fields,
.route-form-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: end;
}

.route-form {
    display: block;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.85rem;
    color: var(--parchment-dim);
    flex: 1 1 140px;
}

input[type="number"] {
    background: var(--ink-surface-raised);
    border: 1px solid var(--hairline);
    color: var(--parchment);
    padding: 0.55rem 0.65rem;
    border-radius: 4px;
    font-family: var(--font-sans);
    font-size: 0.95rem;
}

select:focus,
input:focus,
button:focus {
    outline: 2px solid var(--saffron);
    outline-offset: 1px;
}

button[type="submit"],
.primary-btn {
    background: var(--saffron);
    color: var(--ink);
    border: none;
    padding: 0.6rem 1.25rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    flex: 0 0 auto;
    align-self: end;
}

button[type="submit"]:hover,
.primary-btn:hover {
    background: #e3ac1f;
}

.field-label {
    font-size: 0.85rem;
    color: var(--parchment-dim);
    white-space: nowrap;
}

.field-hint {
    font-size: 0.72rem;
    color: var(--parchment-dim);
    font-weight: 400;
}

.empty-state {
    color: var(--parchment-dim);
    font-size: 0.9rem;
    margin: 0;
}

.site-footer {
    max-width: 760px;
    margin: 0 auto;
    padding: 1.5rem 1.5rem 3rem;
    color: var(--parchment-dim);
    font-size: 0.8rem;
}