/* Craft Yarn Project Tracker - styles */
:root {
    --bg: #faf6f2;
    --surface: #ffffff;
    --text: #2c2a28;
    --muted: #6b6259;
    --accent: #b5651d;
    --accent-light: #f4e3d7;
    --border: #e0d5cc;
    --shadow: 0 2px 8px rgba(0,0,0,0.06);
    --radius: 10px;
    --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    padding-top: 60px;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--accent);
    color: #fff;
    padding: 8px 12px;
    z-index: 100;
    transition: top 0.2s;
}
.skip-link:focus { top: 0; }

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    z-index: 50;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 1.2rem;
    color: var(--accent);
}
.logo { flex-shrink: 0; }
.nav-list {
    list-style: none;
    display: flex;
    gap: 20px;
}
.nav-list a {
    text-decoration: none;
    color: var(--text);
    font-size: 0.95rem;
    padding: 6px 8px;
    border-radius: 6px;
}
.nav-list a:hover,
.nav-list a.active {
    background: var(--accent-light);
    color: var(--accent);
}

.hero {
    background: linear-gradient(135deg, #fdf6f0 0%, #f4e3d7 100%);
    padding: 50px 0 30px;
    text-align: center;
}
.hero h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
    color: #3a2c20;
}
.hero-sub {
    font-size: 1.1rem;
    color: var(--muted);
    max-width: 600px;
    margin: 0 auto 20px;
}
.hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: background 0.2s, border-color 0.2s;
}
.btn-primary {
    background: var(--accent);
    color: #fff;
}
.btn-primary:hover { background: #9a4e14; }
.btn-secondary {
    background: var(--accent-light);
    color: var(--accent);
    border-color: var(--accent);
}
.btn-secondary:hover { background: #e8cfbd; }
.btn-outline {
    background: transparent;
    border-color: var(--accent);
    color: var(--accent);
}
.btn-outline:hover { background: var(--accent-light); }

.tracker-section {
    padding: 40px 0;
}
.tracker-section h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #3a2c20;
}
.tracker-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 25px;
}
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}
.card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--accent);
}
.field-group {
    margin-bottom: 15px;
}
.field-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 4px;
    font-size: 0.9rem;
    color: var(--muted);
}
.field-group input[type="text"],
.field-group input[type="date"] {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
    background: #fff;
}
.progress-control {
    margin: 15px 0;
}
.progress-control label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    font-size: 0.9rem;
    color: var(--muted);
}
.progress-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}
.btn-icon {
    background: var(--accent-light);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-icon:hover { background: #e8cfbd; }
input[type="range"] {
    flex: 1;
    accent-color: var(--accent);
}
.progress-bar {
    height: 12px;
    background: #eee;
    border-radius: 6px;
    overflow: hidden;
    margin: 10px 0;
}
.progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 6px;
    transition: width 0.3s;
}
.project-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--muted);
}

.table-wrapper {
    overflow-x: auto;
    margin-bottom: 15px;
}
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
th, td {
    padding: 8px 6px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
th {
    background: #faf6f2;
    font-weight: 600;
    color: var(--muted);
}
td input, td select {
    width: 100%;
    padding: 4px 6px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.85rem;
}
td button {
    background: none;
    border: none;
    cursor: pointer;
    color: #c0392b;
    font-size: 1.1rem;
}
td button:hover { color: #a93226; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

.guide-section {
    background: #fff;
    padding: 40px 0;
    border-top: 1px solid var(--border);
}
.guide-section h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #3a2c20;
}
.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}
.guide-block h3 {
    font-size: 1.2rem;
    color: var(--accent);
    margin-bottom: 8px;
}
.guide-block p, .guide-block li {
    font-size: 0.95rem;
    color: var(--text);
}
.guide-block ul {
    padding-left: 20px;
}
.guide-faq details {
    margin-bottom: 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 10px;
}
.guide-faq summary {
    font-weight: 600;
    cursor: pointer;
    color: var(--accent);
}
.guide-faq p {
    margin-top: 8px;
    font-size: 0.9rem;
}

.about-note {
    padding: 30px 0 50px;
    background: var(--bg);
}
.about-note h2 {
    font-size: 1.6rem;
    margin-bottom: 15px;
    color: #3a2c20;
}
.about-note p {
    margin-bottom: 10px;
    max-width: 700px;
}

.site-footer {
    background: #2c2a28;
    color: #ddd;
    padding: 25px 0;
    font-size: 0.9rem;
}
.site-footer a {
    color: #f4e3d7;
    text-decoration: none;
}
.site-footer a:hover { text-decoration: underline; }
.site-footer p {
    margin-bottom: 5px;
}

/* Responsive */
@media (max-width: 768px) {
    .tracker-grid {
        grid-template-columns: 1fr;
    }
    .header-inner {
        flex-direction: column;
        height: auto;
        padding: 10px 0;
        gap: 8px;
    }
    .nav-list {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    .hero h1 { font-size: 1.8rem; }
    .guide-grid { grid-template-columns: 1fr; }
}



/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
