:root{
  --bg:#f8f6f1;
  --card:#ffffff;
  --text:#222;
  --muted:#666;
  --accent:#2a6fdb;
  --border:#e5e1d8;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background:var(--bg);
  color:var(--text);
}

.container{
  width:min(1100px, 92vw);
  margin:0 auto;
}

.site-header{
  background:var(--card);
  border-bottom:1px solid var(--border);
}

.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:14px 0;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  text-decoration:none;
  color:inherit;
  min-width:0;
}

.brand-logo{
  max-height:64px;   /* FIXES huge logo */
  width:auto;
  height:auto;
  display:block;
}

.brand-text{line-height:1.05; min-width:0}
.brand-title{font-size:20px; font-weight:700; letter-spacing:0.2px}
.brand-sub{font-size:13px; color:var(--muted); text-transform:uppercase; letter-spacing:2px; margin-top:4px}

.lang-links{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.lang-links a{
  text-decoration:none;
  color:var(--accent);
  font-weight:700;
  padding:6px 10px;
  border:1px solid var(--border);
  border-radius:10px;
  background:transparent;
}

.lang-links a.active{
  background:rgba(42, 111, 219, 0.10);
  border-color:rgba(42, 111, 219, 0.35);
}

.site-main{
  padding:22px 0 40px;
}

.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:16px;
  padding:18px;
  box-shadow:0 6px 20px rgba(0,0,0,.05);
}

h1{margin:0 0 8px;font-size:28px}
h2{margin:0 0 6px;font-size:18px}
p{margin:0 0 10px}
.muted{color:var(--muted)}

.grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:14px;
  margin-top:14px;
}

.panel{
  border:1px solid var(--border);
  border-radius:14px;
  padding:14px;
  background:#fff;
}

.btn{
  display:inline-block;
  margin-top:8px;
  padding:10px 12px;
  border-radius:12px;
  background:var(--accent);
  color:#fff;
  text-decoration:none;
  font-weight:700;
}

.btn.secondary{
  background:transparent;
  color:var(--accent);
  border:1px solid var(--border);
}

@media (max-width: 720px){
  .header-inner{flex-direction:column; align-items:flex-start}
  .grid{grid-template-columns:1fr}
}
/* ===== Reading form (nice on desktop + mobile) ===== */
.page-title{
  margin:0 0 10px 0;
  font-size:1.6rem;
}

.reading-form{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.field .label{
  display:block;
  font-weight:700;
  margin:2px 0 8px;
}

.input{
  width:100%;
  padding:12px 14px;
  border-radius:12px;
  border:1px solid var(--border);
  background:#fff;
  font-size:1rem;
  line-height:1.4;
}

textarea.input{
  min-height:96px;
  resize:vertical;
}

.btn-wide{
  width:100%;
  max-width:320px;
}

.help{
  margin:6px 0 0;
  color:var(--muted);
  font-size:.95rem;
}


/* --- Hero layout improvements + coin image --- */
.hero{
  min-height:70vh;
  display:flex;
  align-items:center;
  background-image:
    linear-gradient(rgba(255,255,255,.88), rgba(255,255,255,.88)),
    url("/assets/images/coins.png");
  background-position:center;
  background-size:cover;
  background-repeat:no-repeat;
}


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


/* --- Hexagram drawing --- */
.hex{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin:14px 0;
}
.line{
  height:14px;
  display:flex;
  align-items:center;
  gap:10px;
}
.line span{
  display:block;
  height:14px;
  background:#111;
  border-radius:4px;
}
.line.yang span{ width:100%; }
.line.yin span{ width:calc(50% - 6px); }
.line.changing span{
  outline:2px solid rgba(42,111,219,.35);
  outline-offset:2px;
}
/* ===== How it works (horizontal layout) ===== */
.how-it-works{
  margin-top: 28px;
}

.how-it-works .grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.how-it-works .panel{
  text-align: center;
}

.how-it-works .panel h3{
  margin-bottom: 6px;
  font-size: 1.1rem;
}

@media (max-width: 720px){
  .how-it-works .grid{
    grid-template-columns: 1fr;
  }
}
