:root{
  --bg: #fff7f0;
  --ink:#2d1b12;
  --muted:#6a4b3a;
  --card:#ffffff;
  --stroke: rgba(45,27,18,.14);
  --brand:#c46a3a;
  --brand2:#f0a65a;
  --accent:#7a5cff;
  --shadow: 0 10px 30px rgba(45,27,18,.08);
  --radius: 18px;

  /* Crafty extras */
  --paper: #f6f1ea;
  --cream: #fffaf3;
  --cocoa: rgba(45,27,18,.10);
  --cocoa2: rgba(45,27,18,.16);

  --pink: #f2c4cf;
  --peach: #f7d7b5;
  --butter: #f4e6a6;
  --sky: #cfe9f6;
  --mint: #cfeede;

  --radius-pill: 999px;
}

*{box-sizing:border-box}
html,body{height:100%}

body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--ink);

  /* Craft paper + yarny pastels + sewing grid */
  background:
    radial-gradient(900px 520px at 10% 10%, rgba(240,166,90,.18), transparent 60%),
    radial-gradient(900px 520px at 90% 15%, rgba(122,92,255,.12), transparent 60%),
    radial-gradient(900px 520px at 25% 85%, rgba(242,196,207,.20), transparent 55%),
    radial-gradient(900px 520px at 78% 78%, rgba(207,238,222,.18), transparent 58%),
    url("data:image/svg+xml,%3Csvg width='140' height='140' xmlns='http://www.w3.org/2000/svg'%3E%3Cg opacity='0.26'%3E%3Cpath d='M0 70H140M70 0V140' stroke='%23bfae9f' stroke-width='0.9'/%3E%3Cpath d='M0 35H140M35 0V140M0 105H140M105 0V140' stroke='%23d4c7bb' stroke-width='0.6'/%3E%3C/g%3E%3C/svg%3E"),
    linear-gradient(180deg, var(--paper), #fff);
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat, repeat, no-repeat;
  background-size: auto, auto, auto, auto, 140px 140px, auto;
}

a{color:var(--brand); text-decoration:none}
a:hover{text-decoration:underline}

.container{
  max-width:1100px;
  margin:0 auto;
  padding: 1.2rem 1rem 2.4rem;
}

/* ===== NAV / HEADER (EXTRA CRAFTY) ===== */
.nav{
  position:sticky; top:0; z-index:50;
  overflow:hidden;

  /* Crafty header: fabric + tools doodles + weave + paper */
  background:
    /* tool doodles pattern */
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='120'%3E%3Cg fill='none' stroke='%238a6a56' stroke-width='1.2' opacity='0.18' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 34c7 6 14 12 21 18'/%3E%3Cpath d='M41 34c-7 6-14 12-21 18'/%3E%3Ccircle cx='18' cy='32' r='4'/%3E%3Ccircle cx='44' cy='32' r='4'/%3E%3Cpath d='M78 26c10 8 10 20 0 28'/%3E%3Cpath d='M78 26c-10 8-10 20 0 28'/%3E%3Cpath d='M76 40h14'/%3E%3Cpath d='M124 30c8-6 18 6 10 12s-18-6-10-12Z'/%3E%3Cpath d='M134 42c10 6 12 12 6 18'/%3E%3Cpath d='M186 28h18'/%3E%3Cpath d='M195 20v28'/%3E%3Cpath d='M176 54c10-8 22-8 32 0'/%3E%3C/g%3E%3C/svg%3E"),

    /* fabric weave */
    repeating-linear-gradient(45deg, rgba(120,80,40,.06) 0 6px, transparent 6px 12px),
    repeating-linear-gradient(-45deg, rgba(255,255,255,.35) 0 7px, transparent 7px 14px),

    /* paper/fabric base */
    linear-gradient(to bottom, rgba(255,250,243,.97), rgba(248,240,230,.90)),

    /* faint grid (pattern paper) */
    url("data:image/svg+xml,%3Csvg width='180' height='180' xmlns='http://www.w3.org/2000/svg'%3E%3Cg opacity='0.10'%3E%3Cpath d='M0 90H180M90 0V180' stroke='%23cbb9aa' stroke-width='1'/%3E%3Cpath d='M0 30H180M30 0V180M0 150H180M150 0V180' stroke='%23dfd2c7' stroke-width='0.7'/%3E%3C/g%3E%3C/svg%3E");

  background-repeat: repeat, repeat, repeat, no-repeat, repeat;
  background-size: 220px 120px, auto, auto, auto, 180px 180px;

  backdrop-filter: blur(10px);
  border-bottom: 2px dashed rgba(120,80,40,.38);
  box-shadow:
    0 10px 26px rgba(120,80,40,.16),
    inset 0 -1px 0 rgba(120,80,40,.18);
}

/* Washi-tape corners */
.nav::before{
  content:"";
  position:absolute;
  left: -22px;
  top: 18px;
  width: 90px;
  height: 26px;
  transform: rotate(-8deg);
  background: rgba(242,196,207,.55);
  border: 1px dashed rgba(120,80,40,.25);
  box-shadow: 0 6px 14px rgba(120,80,40,.10);
  border-radius: 8px;
  pointer-events:none;
}
.nav::after{
  content:"";
  position:absolute;
  right: -22px;
  top: 18px;
  width: 90px;
  height: 26px;
  transform: rotate(8deg);
  background: rgba(207,233,246,.55);
  border: 1px dashed rgba(120,80,40,.25);
  box-shadow: 0 6px 14px rgba(120,80,40,.10);
  border-radius: 8px;
  pointer-events:none;
}

/* Ribbon strip */
.nav-ribbon{
  height: 14px;
  background:
    repeating-linear-gradient(
      45deg,
      rgba(242,196,207,.95) 0 12px,
      rgba(207,233,246,.95) 12px 24px,
      rgba(244,230,166,.95) 24px 36px,
      rgba(207,238,222,.95) 36px 48px
    );
  box-shadow:
    inset 0 -2px 0 rgba(120,80,40,.22),
    inset 0 2px 0 rgba(255,255,255,.65);
}

/* Stitched “thread” line under header (uses real element to avoid conflict with tape corners) */
.stitchline{
  height: 7px;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(120,80,40,.34) 0 8px,
      transparent 8px 16px
    );
  opacity:.42;
}

.nav-inner{
  position: relative;
  z-index: 2;

  max-width:1100px;
  margin:0 auto;
  padding:.85rem 1rem;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
}

.brand{
  display:flex; align-items:center; gap:.6rem;
  font-weight:900; letter-spacing:.2px;
  color: var(--ink);
}

.brand-mark{
  width:44px;height:44px;border-radius:14px;
  display:grid; place-items:center;

  /* sewn-on patch */
  background: linear-gradient(135deg, rgba(255,255,255,.92), rgba(243,230,216,.88));
  border: 2px dashed rgba(120,80,40,.45);
  box-shadow:
    0 7px 16px rgba(120,80,40,.18),
    inset 0 0 0 2px rgba(255,255,255,.7);

  color: var(--ink);
  font-weight: 900;
}

.nav-links{
  display:flex; align-items:center; gap:.35rem; flex-wrap:wrap;
}

.nav-links a, .nav-links button{
  font: inherit;
  border:1px solid transparent;
  background: transparent;
  color: var(--ink);
  padding:.48rem .7rem;
  border-radius: var(--radius-pill);
  cursor:pointer;
}

.nav-links a:hover{
  background: rgba(45,27,18,.06);
  text-decoration:none;
  transform: translateY(-1px);
}

.nav-chip{
  display:inline-flex; align-items:center; gap:.45rem;
  padding:.38rem .68rem;
  border: 1px dashed rgba(45,27,18,.22);
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,.70);
  color: var(--muted);
  font-size:.9rem;
}

/* ===== Buttons ===== */
.button{
  display:inline-flex; align-items:center; justify-content:center;
  gap:.5rem;
  padding:.6rem .9rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(120,80,40,.25);
  background: linear-gradient(135deg, rgba(247,215,181,.95), rgba(255,255,255,.55));
  color: var(--ink);
  cursor:pointer;
  box-shadow: 0 2px 0 rgba(120,80,40,.20), 0 10px 20px rgba(45,27,18,.06);
  text-decoration:none;
}

.button:hover{ text-decoration:none; transform: translateY(-1px); }
.button:active{ transform: translateY(0); box-shadow: 0 10px 20px rgba(45,27,18,.06); }

.button.primary{
  border-color: transparent;
  color: white;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
}

.button.ghost{
  background: rgba(255,255,255,.55);
  box-shadow:none;
}

.button.danger{
  border-color: rgba(186, 31, 31,.25);
  background: linear-gradient(135deg, rgba(224,122,122,.88), rgba(255,255,255,.55));
}

/* ===== Layout / components ===== */
.grid{
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap:1rem;
}

.card{
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(120,80,40,.10);
  border-radius: var(--radius);
  box-shadow:
    0 10px 26px rgba(120,80,40,.14),
    inset 0 0 0 1px rgba(120,80,40,.08);
  backdrop-filter: blur(2px);
}

.card-pad{ padding:1.1rem; }
.muted{ color: var(--muted); opacity:.95 }

.hero{ padding: 1.6rem 0 1.2rem; }
.hero h1{
  margin:0;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height:1.05;
  letter-spacing:-.02em;
}
.hero p{ margin:.6rem 0 1.2rem; max-width: 62ch; }

.kicker{
  display:inline-flex; align-items:center; gap:.5rem;
  padding:.35rem .6rem;
  border-radius: var(--radius-pill);
  border:1px dashed rgba(45,27,18,.22);
  background: rgba(255,255,255,.55);
  color: var(--muted);
  font-size:.92rem;
}

.form{
  display:grid;
  gap:.9rem;
  max-width: 760px;
}

label{ display:grid; gap:.45rem; font-weight:600; }

input, textarea, select{
  font: inherit;
  border-radius: 14px;
  border: 1px solid rgba(45,27,18,.18);
  background: rgba(255,255,255,.86);
  padding:.65rem .8rem;
  outline:none;
}

input:focus, textarea:focus, select:focus{
  border-color: rgba(196,106,58,.55);
  box-shadow: 0 0 0 4px rgba(196,106,58,.12);
}

.table{
  width:100%;
  border-collapse: collapse;
  overflow:hidden;
  border-radius: 14px;
}

.table th, .table td{
  padding:.55rem .6rem;
  text-align:left;
  border-bottom:1px solid rgba(45,27,18,.08);
  font-size:.96rem;
}

.table th{ color: var(--muted); font-weight:800; letter-spacing:.01em; }

.badge{
  display:inline-flex; align-items:center; gap:.4rem;
  padding:.25rem .6rem;
  border-radius: var(--radius-pill);
  border: 1px dashed rgba(120,80,40,.35);
  background: rgba(255,247,236,.78);
  color: #5a3b2a;
  font-size:.85rem;
  font-weight: 700;
}

.bar{
  height: 12px;
  border-radius: var(--radius-pill);
  background: rgba(45,27,18,.10);
  overflow:hidden;
}

.bar > div{
  height:100%;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
}

.footer{
  border-top:1px solid rgba(45,27,18,.10);
  margin-top: 2rem;
  padding-top: 1.2rem;
  color: var(--muted);
  font-size:.95rem;
}

.split{
  display:flex; gap:1rem; flex-wrap:wrap; align-items:center; justify-content:space-between;
}

@media (max-width: 860px){
  .grid{ grid-template-columns: 1fr; }
}
