@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  color-scheme: light;
  --ink: #172923;
  --muted: #687770;
  --line: #e3eae4;
  --paper: #f4f7f3;
  --white: #fff;
  --green: #27866a;
  --green-dark: #18664e;
  --green-soft: #eaf4ee;
  --gold: #e8a63e;
  --shadow: 0 14px 40px rgba(21, 55, 40, .06);
  font-family: Inter, sans-serif;
  background: var(--paper);
  color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { cursor: pointer; }

.personal-page { background: var(--paper); }
.personal-shell { width: min(760px, calc(100% - 44px)); margin: 0 auto; }
.personal-top { height: 84px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.wordmark { font: 700 20px 'DM Sans', sans-serif; letter-spacing: -.08em; }
.wordmark span, .accent-dot { color: var(--green); }
.top-note { color: var(--muted); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.intro { padding: 78px 0 56px; }
.eyebrow { margin: 0 0 12px; color: var(--green); font-size: 11px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
.intro h1 { margin: 0; font: 600 clamp(50px, 9vw, 76px)/1 'DM Sans', sans-serif; letter-spacing: -.07em; }
.intro-copy { max-width: 510px; margin: 22px 0 0; color: var(--muted); font-size: 18px; line-height: 1.65; }
.about-block { display: grid; grid-template-columns: 1fr 1.3fr; gap: 38px; padding: 30px 0 40px; border-top: 1px solid var(--line); }
.about-block h2 { margin: 0; font: 600 23px/1.25 'DM Sans', sans-serif; letter-spacing: -.04em; }
.about-copy { max-width: 360px; margin: 2px 0 0; color: var(--muted); font-size: 15px; line-height: 1.8; }
.project-block { padding: 26px 0 58px; border-top: 1px solid var(--line); }
.project-card { display: flex; align-items: center; gap: 18px; padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--white); box-shadow: var(--shadow); transition: transform .2s, border-color .2s; }
.project-card:hover { transform: translateY(-3px); border-color: #b8d5c8; }
.project-mark { display: grid; width: 48px; height: 48px; place-items: center; flex: 0 0 48px; border-radius: 14px; background: var(--green-soft); color: var(--green); font-size: 26px; }
.project-text { display: grid; gap: 5px; }
.project-kicker { color: var(--green); font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.project-text strong { font: 600 21px 'DM Sans', sans-serif; letter-spacing: -.03em; }
.project-text > span:last-child { color: var(--muted); font-size: 13px; line-height: 1.5; }
.project-arrow { margin-left: auto; align-self: flex-start; color: var(--green); font-size: 20px; }
.personal-footer { display: flex; justify-content: space-between; padding: 20px 0 28px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.personal-footer a { color: var(--green-dark); }

.app-page { background: #f6f8f5; }
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 5; display: flex; width: 248px; flex-direction: column; padding: 28px 15px 18px; border-right: 1px solid var(--line); background: #fff; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 10px 28px; font: 700 19px 'DM Sans', sans-serif; letter-spacing: -.04em; }
.brand-icon { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 12px; background: var(--green); color: #fff; font-size: 21px; }
.nav-list { display: grid; gap: 5px; }
.nav-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 13px; border: 0; border-radius: 10px; background: transparent; color: #697770; text-align: left; font-size: 13px; font-weight: 500; transition: .15s ease; }
.nav-item:hover { background: #f1f5f1; color: var(--ink); }
.nav-item.active { background: var(--green); color: #fff; box-shadow: 0 5px 14px rgba(39,134,106,.16); }
.nav-icon { display: inline-flex; width: 18px; justify-content: center; font-size: 17px; }
.daily-tip { margin-top: auto; padding: 15px; border: 1px solid #dcece2; border-radius: 13px; background: #f2f8f3; }
.daily-tip strong { display: block; margin-bottom: 6px; color: var(--green-dark); font-size: 11px; }
.daily-tip p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.app-main { margin-left: 248px; padding: 35px clamp(22px, 4vw, 56px) 50px; }
.content { width: min(1030px, 100%); margin: auto; }
.app-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 25px; }
.app-header h1 { margin: 0; font: 700 30px/1.2 'DM Sans', sans-serif; letter-spacing: -.045em; }
.app-header p { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.demo-label { display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 20px; background: #fff; color: var(--muted); font-size: 10px; }
.demo-label::before { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); content: ''; }
.grid { display: grid; gap: 16px; }
.dashboard-top { grid-template-columns: minmax(210px, .75fr) 1.6fr; }
.card { border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 4px 18px rgba(21,55,40,.025); }
.score-card { display: flex; min-height: 243px; flex-direction: column; align-items: center; justify-content: center; padding: 22px; }
.score-ring { display: grid; width: 136px; height: 136px; place-items: center; border-radius: 50%; background: conic-gradient(var(--green) 0 78%, #e7eee9 78% 100%); position: relative; }
.score-ring::after { position: absolute; inset: 10px; border-radius: 50%; background: #fff; content: ''; }
.score-number { position: relative; z-index: 1; text-align: center; }
.score-number strong { display: block; font: 700 32px 'DM Sans', sans-serif; }
.score-number span { color: var(--muted); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; }
.score-caption { margin-top: 14px; font-size: 12px; font-weight: 600; }
.score-sub { margin-top: 5px; color: var(--muted); font-size: 10px; }
.metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.metric { display: flex; min-height: 110px; flex-direction: column; justify-content: center; padding: 15px; }
.metric-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.metric-icon { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 10px; background: #edf3fb; color: #5475ac; font-size: 15px; }
.metric:nth-child(2) .metric-icon { background: #fcf3df; color: #b4842c; }
.metric:nth-child(3) .metric-icon { background: #e8f5ec; color: #41855b; }
.metric:nth-child(4) .metric-icon { background: #f8e9e7; color: #bc655d; }
.metric:nth-child(5) .metric-icon { background: #edf2f6; color: #5d7f9d; }
.metric:nth-child(6) .metric-icon { background: #e5f5f5; color: #3f9292; }
.metric-trend { color: #8a978f; font-size: 10px; }
.metric-label { color: var(--muted); font-size: 10px; }
.metric-value { margin-top: 4px; font: 700 20px 'DM Sans', sans-serif; letter-spacing: -.03em; }
.metric-value small { color: var(--muted); font: 400 10px Inter, sans-serif; }
.section-grid { grid-template-columns: .9fr 1.5fr; margin-top: 25px; align-items: start; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.section-title h2 { margin: 0; font: 600 17px 'DM Sans', sans-serif; letter-spacing: -.03em; }
.text-link { border: 0; background: none; color: var(--green); font-size: 10px; }
.quick-grid { grid-template-columns: repeat(3, 1fr); }
.quick-btn { display: flex; min-height: 78px; flex-direction: column; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line); border-radius: 13px; background: #fff; color: var(--ink); font-size: 10px; transition: .15s ease; }
.quick-btn:hover { border-color: #b9d8c8; background: #f8fbf8; transform: translateY(-2px); }
.quick-btn span { color: var(--green); font-size: 18px; }
.routine-card { padding: 16px 18px; }
.routine-row { display: grid; grid-template-columns: 18px 46px 1fr auto; align-items: start; gap: 9px; padding: 10px 0; border-bottom: 1px solid #eef2ee; }
.routine-row:last-child { border-bottom: 0; }
.routine-check { display: grid; width: 17px; height: 17px; place-items: center; border: 1.5px solid #c9d4cd; border-radius: 50%; background: white; color: #fff; font-size: 10px; }
.routine-row.done .routine-check { border-color: var(--green); background: var(--green); }
.routine-time { padding-top: 2px; color: var(--muted); font: 10px monospace; }
.routine-name { font-size: 11px; line-height: 1.5; }
.routine-tag { color: var(--muted); font-size: 9px; text-align: right; }
.routine-row.done .routine-name { color: #8a978f; text-decoration: line-through; }
.sample-note { margin: 12px 0 0; color: #85928a; font-size: 9px; line-height: 1.5; }
.page-card { padding: 21px; }
.log-form { display: grid; max-width: 600px; gap: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: grid; gap: 6px; color: var(--muted); font-size: 11px; }
.field input, .field select { width: 100%; min-height: 40px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); }
.primary-btn, .outline-btn { min-height: 39px; padding: 0 15px; border: 1px solid var(--green); border-radius: 10px; background: var(--green); color: #fff; font-size: 11px; font-weight: 600; }
.outline-btn { background: #fff; color: var(--green-dark); }
.log-list { display: grid; gap: 9px; margin-top: 17px; }
.log-item { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid #eef2ee; font-size: 11px; }
.log-item span:last-child { color: var(--muted); }
.bar-chart { display: grid; grid-template-columns: repeat(7, 1fr); align-items: end; gap: 15px; height: 188px; padding: 16px 10px 0; border-bottom: 1px solid var(--line); }
.chart-col { display: flex; height: 100%; flex-direction: column; align-items: center; justify-content: end; gap: 8px; }
.chart-bar { width: min(29px, 76%); min-height: 8px; border-radius: 7px 7px 2px 2px; background: #8ac5a8; }
.chart-col:nth-child(3n) .chart-bar { background: var(--green); }
.chart-day { color: var(--muted); font-size: 9px; }
.streak-grid { grid-template-columns: repeat(4, 1fr); }
.streak { padding: 18px; text-align: center; }
.streak strong { display: block; color: var(--green); font: 700 27px 'DM Sans', sans-serif; }
.streak span { color: var(--muted); font-size: 10px; }
.challenge-card { display: flex; align-items: center; gap: 14px; padding: 16px; }
.challenge-icon { display: grid; width: 43px; height: 43px; place-items: center; border-radius: 13px; background: var(--green-soft); color: var(--green); font-size: 20px; }
.challenge-copy { flex: 1; }
.challenge-copy strong { font: 600 13px 'DM Sans', sans-serif; }
.challenge-copy p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.challenge-progress { width: 100%; height: 5px; margin-top: 9px; border-radius: 5px; background: #edf2ed; }
.challenge-progress i { display: block; height: 100%; border-radius: inherit; background: var(--green); }
.back-link { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 20px; color: var(--green-dark); font-size: 11px; }
.mobile-top { display: none; }

@media (max-width: 900px) {
  .sidebar { width: 215px; }
  .app-main { margin-left: 215px; padding: 28px 22px 40px; }
  .dashboard-top { grid-template-columns: 1fr; }
  .score-card { min-height: 210px; }
}
@media (max-width: 660px) {
  .personal-shell { width: min(100% - 36px, 520px); }
  .personal-top { height: 68px; }
  .intro { padding: 61px 0 46px; }
  .intro-copy { font-size: 16px; }
  .about-block { grid-template-columns: 1fr; gap: 13px; }
  .project-card { padding: 17px; gap: 13px; }
  .project-mark { width: 42px; height: 42px; flex-basis: 42px; }
  .project-text strong { font-size: 19px; }
  .sidebar { position: sticky; inset: 0 0 auto; width: auto; height: auto; padding: 0 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { padding: 10px 5px 8px; font-size: 16px; }
  .brand-icon { width: 30px; height: 30px; border-radius: 10px; font-size: 17px; }
  .nav-list { display: flex; overflow-x: auto; gap: 3px; padding-bottom: 8px; scrollbar-width: none; }
  .nav-list::-webkit-scrollbar { display: none; }
  .nav-item { width: auto; flex: 0 0 auto; padding: 8px 10px; font-size: 10px; }
  .nav-icon { width: auto; font-size: 13px; }
  .daily-tip { display: none; }
  .app-main { margin-left: 0; padding: 24px 15px 38px; }
  .app-header { align-items: center; margin-bottom: 19px; }
  .app-header h1 { font-size: 25px; }
  .demo-label { padding: 7px 9px; font-size: 9px; }
  .metric-grid { gap: 9px; }
  .metric { min-height: 98px; padding: 11px; }
  .metric-value { font-size: 17px; }
  .section-grid { grid-template-columns: 1fr; gap: 22px; margin-top: 20px; }
  .quick-btn { min-height: 68px; }
  .streak-grid { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; }
}

.routine-row { width: 100%; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.routine-row:hover .routine-name { color: var(--green-dark); }
