:root,
:root.light {
    --color-border: #888;
    --text-color: #333;
    --cta-color: #3f51b5;
    --bg-color: #f3f3f3;
}

:root.dark {
    --color-border: #888;
    --text-color: #fff;
    --cta-color: #3f51b5;
    --bg-color: #333;
}
@media (prefers-color-scheme: dark) {
    :root {
        --color-border: #888;
        --text-color: #fff;
        --cta-color: #3f51b5;
        --bg-color: #333;
    }
}

body {
    font-family: "Courier New", Courier, monospace;
    letter-spacing: -0.3pc;
    margin: 0;
    padding: 1rem;
    box-sizing: border-box;
    color: var(--text-color);
    background-color: var(--bg-color);
    color-scheme: dark;
}

button {
    outline: none;
    background-color: unset;
    border: unset;
    font: inherit;
    color: var(--text-color);
}

.container {
    max-width: 800px;
    margin: auto;
}

a {
    color: #000;
    text-decoration: none;
    font-weight: bold;
    background-color: #f3f3f3;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    padding: 0.5rem 1rem;
    display: inline-block;
}

.estimation__heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    padding-top: 1rem;
    border-bottom: 1px solid var(--color-border);
}

.estimation__heading h1 {
    margin: 0;
    font-size: 2em;
    letter-spacing: -0.3pc;
}

.estimation__table {
    margin-top: 1rem;
    width: 100%;
    border-collapse: collapse;
}

.estimation__row {
    display: flex;
    border-bottom: 1px solid var(--color-border);
    align-items: center;
}

.estimation__cell {
    padding: 0.5rem;
    flex: 1;
    display: flex;
    align-items: center;
}

.estimation__header .estimation__cell {
    font-weight: bold;
}

.sub-task .estimation__cell:first-child {
    padding-left: 2rem;
}

input[type="text"],
input[type="number"] {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--color-border);
    background-color: transparent;
    color: var(--text-color);
    font-family: inherit;
    font-size: inherit;
}

.estimation__add-task,
.estimation__copy,
.add-sub-task {
    border: 1px solid var(--color-border);
    background-color: transparent;
    color: var(--text-color);
    border-radius: 4px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    margin-top: 1rem;
    transition: opacity 0.2s;
}

.estimation__add-task:hover,
.estimation__copy:hover,
.add-sub-task:hover {
    opacity: 0.7;
}

.add-sub-task {
    margin-left: 1rem;
    padding: 0.2rem 0.5rem;
    margin-top: 0;
}

.estimation__summary {
    margin-top: 1rem;
    text-align: right;
}
